From 5bc95921916138ef920073ed4780c4bc45d3630f Mon Sep 17 00:00:00 2001 From: Jesus Vallejo Date: Wed, 17 Jul 2019 17:17:30 +0200 Subject: [PATCH 001/567] Add caps support --- keyboards/anne_pro/anne_pro_lighting.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/keyboards/anne_pro/anne_pro_lighting.h b/keyboards/anne_pro/anne_pro_lighting.h index 29b93b74a83b..dfb10580b321 100644 --- a/keyboards/anne_pro/anne_pro_lighting.h +++ b/keyboards/anne_pro/anne_pro_lighting.h @@ -52,3 +52,6 @@ void anne_pro_lighting_mode(uint8_t mode); void anne_pro_lighting_mode_last(void); void anne_pro_lighting_rate_brightness(uint8_t speed, uint8_t brightness); void anne_pro_lighting_set_keys(uint8_t keys, uint8_t *payload); +void anne_pro_lighting_caps_lock_on(void); +void anne_pro_lighting_caps_lock_off(void); +void anne_pro_caps_lock_update(bool state); From ddc0d204a45d9f40756c6ecf14f64147fb8f1c43 Mon Sep 17 00:00:00 2001 From: Jesus Vallejo Date: Wed, 17 Jul 2019 17:19:00 +0200 Subject: [PATCH 002/567] Add caps lock support --- keyboards/anne_pro/anne_pro_lighting.c | 32 ++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/keyboards/anne_pro/anne_pro_lighting.c b/keyboards/anne_pro/anne_pro_lighting.c index 886350bf0921..f54629931cad 100644 --- a/keyboards/anne_pro/anne_pro_lighting.c +++ b/keyboards/anne_pro/anne_pro_lighting.c @@ -192,3 +192,35 @@ void anne_pro_lighting_set_keys(uint8_t keys, uint8_t *payload) { uart_tx_ringbuf_write(&led_uart_ringbuf, 5, buf); uart_tx_ringbuf_write(&led_uart_ringbuf, 5 * keys, payload); } + +/* Set Caps Lock red led on */ +void anne_pro_lighting_caps_lock_on(){ + if(!leds_enabled && !not_init){ + /* Wake up the LED controller if off */ + writePinHigh(C15); + chThdSleepMilliseconds(50); + not_init=true; + } + if(leds_enabled) // solves problems when LT(1,KC_CAPS) is used in keymap(Tap = caps, Hold = MO(1)) + anne_pro_lighting_update(); + uart_tx_ringbuf_write(&led_uart_ringbuf,4,"\x09\x0c\x0c\x01"); + uart_tx_ringbuf_start_transmission(&led_uart_ringbuf); + prev_state_caps_lock = true; +} +/* Set Caps Lock red led off */ +void anne_pro_lighting_caps_lock_off(){ + if(leds_enabled) // solves problems when LT(1,KC_CAPS) is used in keymap(Tap = caps, Hold = MO(1)) + anne_pro_lighting_update(); + uart_tx_ringbuf_write(&led_uart_ringbuf,4,"\x09\x0c\x0c\x00"); + uart_tx_ringbuf_start_transmission(&led_uart_ringbuf); + prev_state_caps_lock = false; +} +/* Handle state of caps lock to avoid using the uart for unnecessary led changes*/ +void anne_pro_caps_lock_update(bool state){ + if (state && prev_state_caps_lock==false){ + anne_pro_lighting_caps_lock_on(); + } + else if(!state && prev_state_caps_lock==true){ + anne_pro_lighting_caps_lock_off(); + } +} From 650713ce1a9d5184b80e34f254e7ac3dee22734d Mon Sep 17 00:00:00 2001 From: Jesus Vallejo Date: Wed, 17 Jul 2019 17:19:56 +0200 Subject: [PATCH 003/567] Update anne_pro.c --- keyboards/anne_pro/anne_pro.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/keyboards/anne_pro/anne_pro.c b/keyboards/anne_pro/anne_pro.c index 36f21b119516..2c70e0f94bf5 100644 --- a/keyboards/anne_pro/anne_pro.c +++ b/keyboards/anne_pro/anne_pro.c @@ -180,6 +180,13 @@ void keyboard_post_init_kb(void) { /* Start transmissions when the flag is set */ void matrix_scan_kb(void) { + /* Check changes in Caps Lock, and set led */ + if (host_keyboard_leds() & (1< Date: Wed, 17 Jul 2019 17:21:04 +0200 Subject: [PATCH 004/567] Update anne_pro_lighting.c --- keyboards/anne_pro/anne_pro_lighting.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/keyboards/anne_pro/anne_pro_lighting.c b/keyboards/anne_pro/anne_pro_lighting.c index f54629931cad..b7e5bcd15f15 100644 --- a/keyboards/anne_pro/anne_pro_lighting.c +++ b/keyboards/anne_pro/anne_pro_lighting.c @@ -52,6 +52,10 @@ static UARTConfig led_uart_cfg = { /* State of the leds on the keyboard */ static volatile bool leds_enabled = false; +/* Previous state of caps, this offloads when there has been no changes on Caps Lock*/ +static volatile bool prev_state_caps_lock = false; +/* Checks if light mcu has already been woke up, needed for lighting= off + CapsLock=on*/ +static volatile bool not_init = false; void anne_pro_lighting_init(void) { /* Turn on lighting controller */ From 18e6217e2ba8d182e74c1e2974a0eddc57719745 Mon Sep 17 00:00:00 2001 From: Jesus Vallejo Date: Fri, 19 Jul 2019 17:36:42 +0200 Subject: [PATCH 005/567] Add files via upload --- keyboards/anne_pro/anne_pro.c | 8 ---- keyboards/anne_pro/anne_pro_lighting.c | 59 ++++++++++++++------------ keyboards/anne_pro/anne_pro_lighting.h | 3 +- 3 files changed, 34 insertions(+), 36 deletions(-) diff --git a/keyboards/anne_pro/anne_pro.c b/keyboards/anne_pro/anne_pro.c index 2c70e0f94bf5..5455ad88cdc1 100644 --- a/keyboards/anne_pro/anne_pro.c +++ b/keyboards/anne_pro/anne_pro.c @@ -180,18 +180,10 @@ void keyboard_post_init_kb(void) { /* Start transmissions when the flag is set */ void matrix_scan_kb(void) { - /* Check changes in Caps Lock, and set led */ - if (host_keyboard_leds() & (1< Date: Fri, 19 Jul 2019 17:41:09 +0200 Subject: [PATCH 006/567] moved everything to lighting, made it simpler --- keyboards/anne_pro/anne_pro_lighting.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/anne_pro/anne_pro_lighting.c b/keyboards/anne_pro/anne_pro_lighting.c index c8822edd6bf5..ca15535fd4fd 100644 --- a/keyboards/anne_pro/anne_pro_lighting.c +++ b/keyboards/anne_pro/anne_pro_lighting.c @@ -105,14 +105,14 @@ void anne_pro_lighting_update(void) { /* Check changes in Caps Lock, and set led */ if (host_keyboard_leds() & (1< Date: Sat, 20 Jul 2019 14:05:50 +0200 Subject: [PATCH 007/567] Update anne_pro.c --- keyboards/anne_pro/anne_pro.c | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/anne_pro/anne_pro.c b/keyboards/anne_pro/anne_pro.c index 5455ad88cdc1..ea6c4a1e254d 100644 --- a/keyboards/anne_pro/anne_pro.c +++ b/keyboards/anne_pro/anne_pro.c @@ -184,6 +184,7 @@ void matrix_scan_kb(void) { anne_pro_lighting_update(); /* Run some update code for the bluetooth */ anne_pro_bluetooth_update(); + /* Run matrix_scan_user code */ matrix_scan_user(); } From 1146027e9066a01f0f1dfbc142d1c5e3bf902056 Mon Sep 17 00:00:00 2001 From: Jesus Vallejo Date: Sat, 20 Jul 2019 14:09:00 +0200 Subject: [PATCH 008/567] Update anne_pro.c --- keyboards/anne_pro/anne_pro.c | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/anne_pro/anne_pro.c b/keyboards/anne_pro/anne_pro.c index ea6c4a1e254d..5455ad88cdc1 100644 --- a/keyboards/anne_pro/anne_pro.c +++ b/keyboards/anne_pro/anne_pro.c @@ -184,7 +184,6 @@ void matrix_scan_kb(void) { anne_pro_lighting_update(); /* Run some update code for the bluetooth */ anne_pro_bluetooth_update(); - /* Run matrix_scan_user code */ matrix_scan_user(); } From 81eca01c7052d16c913539d4d6122284dd8c10f2 Mon Sep 17 00:00:00 2001 From: Jesus Vallejo Date: Sat, 20 Jul 2019 14:11:10 +0200 Subject: [PATCH 009/567] Update anne_pro.c --- keyboards/anne_pro/anne_pro.c | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/anne_pro/anne_pro.c b/keyboards/anne_pro/anne_pro.c index 5455ad88cdc1..36f21b119516 100644 --- a/keyboards/anne_pro/anne_pro.c +++ b/keyboards/anne_pro/anne_pro.c @@ -184,6 +184,7 @@ void matrix_scan_kb(void) { anne_pro_lighting_update(); /* Run some update code for the bluetooth */ anne_pro_bluetooth_update(); + /* Run matrix_scan_user code */ matrix_scan_user(); } From 5823b80b21cf87f723755e132cc309493e77754e Mon Sep 17 00:00:00 2001 From: Jesus Vallejo Date: Tue, 23 Jul 2019 16:46:52 +0200 Subject: [PATCH 010/567] updated stability Solved bug that was making led go off when back lighting is set to off, more stable. --- keyboards/anne_pro/anne_pro_lighting.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/keyboards/anne_pro/anne_pro_lighting.c b/keyboards/anne_pro/anne_pro_lighting.c index ca15535fd4fd..a5cfd2088e98 100644 --- a/keyboards/anne_pro/anne_pro_lighting.c +++ b/keyboards/anne_pro/anne_pro_lighting.c @@ -55,7 +55,7 @@ static volatile bool leds_enabled = false; /* Previous state of caps, this offloads when there has been no changes on Caps Lock*/ static volatile bool prev_state_caps_lock = false; /* Checks if light mcu has already been woke up, needed for lighting= off + CapsLock=on*/ -static volatile bool not_init = false; +static volatile bool is_init = false; void anne_pro_lighting_init(void) { /* Turn on lighting controller */ @@ -137,6 +137,7 @@ void anne_pro_lighting_on(void) { uart_tx_ringbuf_write(&led_uart_ringbuf, 3, "\x09\x01\x01"); uart_tx_ringbuf_start_transmission(&led_uart_ringbuf); leds_enabled = true; + is_init=true; /* Wait for the message to be sent */ chThdSleepMilliseconds(10); } @@ -144,12 +145,14 @@ void anne_pro_lighting_on(void) { /* Turn the lighting off */ void anne_pro_lighting_off(void) { /* Send turn light off command */ - uart_tx_ringbuf_write(&led_uart_ringbuf, 4, "\x09\x02\x01\x00"); + uart_tx_ringbuf_write(&led_uart_ringbuf, 4, "\x09\x02\x01\x00"); uart_tx_ringbuf_start_transmission(&led_uart_ringbuf); leds_enabled = false; - not_init=false; + if(!prev_state_caps_lock){// only sleep if caps is not beeing used /* Sleep the LED controller */ writePinLow(C15); + is_init=false; + } } /* Is the lighting enabled? */ @@ -216,21 +219,21 @@ void anne_pro_lighting_set_keys(uint8_t keys, uint8_t *payload) { /* Set Caps Lock red led on */ void anne_pro_lighting_caps_lock_on(){ /* If leds disabled, and not already initiated*/ - if(!leds_enabled && !not_init){ + if(!leds_enabled && !is_init){ /* Wake up the LED controller if off */ writePinHigh(C15); /* Wait till its woke up */ chThdSleepMilliseconds(50); - not_init=true; + is_init=true; } - uart_tx_ringbuf_write(&led_uart_ringbuf,4,"\x09\x0c\x0c\x01"); + uart_tx_ringbuf_write(&led_uart_ringbuf,4,"\x09\x02\x0c\x01"); /* Sends command right away, cant wait till buffer is full as need the led on now */ uart_tx_ringbuf_start_transmission(&led_uart_ringbuf); } /* Set Caps Lock red led off */ void anne_pro_lighting_caps_lock_off(){ - uart_tx_ringbuf_write(&led_uart_ringbuf,4,"\x09\x0c\x0c\x00"); + uart_tx_ringbuf_write(&led_uart_ringbuf,4,"\x09\x02\x0c\x00"); /* Sends command right away, cant wait till buffer is full as need the led off now */ uart_tx_ringbuf_start_transmission(&led_uart_ringbuf); } From 176c06fc1296e237884c70a2fdbf0f2ab563b496 Mon Sep 17 00:00:00 2001 From: Jesus Vallejo Date: Fri, 1 Nov 2019 23:30:59 +0100 Subject: [PATCH 011/567] Add Magic TAP --- .../anne_pro/keymaps/anne-pro-2-win/keymap.c | 2 +- .../anne_pro/keymaps/anne-pro-2-win/readme.md | 93 ++++++++++--------- 2 files changed, 49 insertions(+), 46 deletions(-) diff --git a/keyboards/anne_pro/keymaps/anne-pro-2-win/keymap.c b/keyboards/anne_pro/keymaps/anne-pro-2-win/keymap.c index 698febe779d7..90b4488b868b 100644 --- a/keyboards/anne_pro/keymaps/anne-pro-2-win/keymap.c +++ b/keyboards/anne_pro/keymaps/anne-pro-2-win/keymap.c @@ -25,7 +25,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_CAPS, KC_A, KC_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_SPACE, KC_RALT, LT(1,KC_LEFT), LT(2,KC_DOWN), MT(MOD_RCTL, KC_RGHT) + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_LALT, LT(1,KC_LEFT), LT(2,KC_DOWN), MT(MOD_RCTL, 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, XXXXXXX, diff --git a/keyboards/anne_pro/keymaps/anne-pro-2-win/readme.md b/keyboards/anne_pro/keymaps/anne-pro-2-win/readme.md index 9aa90526259a..71d5af1f5c08 100644 --- a/keyboards/anne_pro/keymaps/anne-pro-2-win/readme.md +++ b/keyboards/anne_pro/keymaps/anne-pro-2-win/readme.md @@ -1,45 +1,48 @@ -# Anne Pro 2 Windows keymap - -### This keymap adds TAP, Media Keys features and AP2-like backlight control. -### Maintainer: [angelokofficial](https://github.com/angelokofficial) - - -__Keys:__ - -ANNE+0 - off/on the backlight -ANNE+9 - switch the backlight profile -ANNE + =/+ - increases brightness -ANNE + - -/_ - changes backlight speed -ANNE+ESC - reset the keyboard (instead of button on the back side) -ANNE+ESC+hold ESC - enter to the bootloader (DFU) mode - -__TAP:__ - -Right Shift - up arrow -ANNE - down arrow -FN - left arrow -Right CTRL - right arrow - - -__Bluetooth:__ - -Fn+B - enter BT mode -=/+ - turn ON BT --/_ - turn OFF BT -0 - enter legacy BT mode -1,2,3,4 - should work as bt profiles for switch among connected devices - - -**Media keys:** - -ANNE+1 - stop -ANNE+2 - volume down -ANNE+3 - volume up -ANNE+4 - previous track -ANNE+5 - pause/play -ANNE+6 - next track -ANNE+7 - mute/unmute volume - - -All other keys remain on their own places. -To compile: `make anne_pro:` +# Anne Pro 2 Windows keymap + +### This keymap adds TAP ,AP2-like Magic TAP, Media Keys features and AP2-like backlight control. +### Maintainer: [angelokofficial](https://github.com/angelokofficial) + + +__Keys:__ + +ANNE+0 - off/on the backlight +ANNE+9 - switch the backlight profile +ANNE + =/+ - increases brightness +ANNE + - -/_ - changes backlight speed +ANNE+ESC - reset the keyboard (instead of button on the back side) +ANNE+ESC+hold ESC - enter to the bootloader (DFU) mode + +__TAP:__ + +Right Shift - up arrow +ANNE - down arrow +FN - left arrow +Right CTRL - right arrow + +__Magic TAP:__ + +Caps lock - FN + +__Bluetooth:__ + +Fn+B - enter BT mode +=/+ - turn ON BT +-/_ - turn OFF BT +0 - enter legacy BT mode +1,2,3,4 - should work as bt profiles for switch among connected devices + + +**Media keys:** + +ANNE+1 - stop +ANNE+2 - volume down +ANNE+3 - volume up +ANNE+4 - previous track +ANNE+5 - pause/play +ANNE+6 - next track +ANNE+7 - mute/unmute volume + + +All other keys remain on their own places. +To compile: `make anne_pro:` \ No newline at end of file From 532d0c314b4d2d9cd3cc5a429c76396552ed244d Mon Sep 17 00:00:00 2001 From: Jesus Vallejo Date: Fri, 1 Nov 2019 23:32:11 +0100 Subject: [PATCH 012/567] Add Magic TAP --- .../anne_pro/keymaps/anne-pro-2-win/keymap.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/keyboards/anne_pro/keymaps/anne-pro-2-win/keymap.c b/keyboards/anne_pro/keymaps/anne-pro-2-win/keymap.c index 90b4488b868b..6c5d761f3997 100644 --- a/keyboards/anne_pro/keymaps/anne-pro-2-win/keymap.c +++ b/keyboards/anne_pro/keymaps/anne-pro-2-win/keymap.c @@ -16,22 +16,20 @@ #include QMK_KEYBOARD_H -/* Anne Pro 2 default layout -Includes Media Keys and TAP features, see readme.md */ - +/* Default Anne Pro layout with Magic tap function, windows style */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_UP), - KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_LALT, LT(1,KC_LEFT), LT(2,KC_DOWN), MT(MOD_RCTL, KC_RGHT) + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_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_LWIN, KC_LALT, KC_SPACE, KC_RALT, LT(1,KC_LEFT), LT(2,KC_DOWN), MT(MOD_RCTL, 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, XXXXXXX, - XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, KC_SLCK, KC_PAUS, KC_HOME, KC_END, KC_PSCR, + XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, APL_RGB, APL_RAT, APL_BRT, APL_MOD, KC_UP, KC_SLCK, KC_PAUS, KC_HOME, KC_END, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGUP, KC_PGDN, XXXXXXX, - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TG(3), XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, KC_DEL, _______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TG(3), XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, KC_DEL, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______ ), [2] = LAYOUT( From dc30ffcd81f403a3fcaf6080a01de7bdf8118d2d Mon Sep 17 00:00:00 2001 From: Jesus Vallejo Date: Fri, 1 Nov 2019 23:34:39 +0100 Subject: [PATCH 013/567] Add magic tap on mac --- keyboards/anne_pro/keymaps/anne-pro-2-mac/keymap.c | 4 ++-- keyboards/anne_pro/keymaps/anne-pro-2-mac/readme.md | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/keyboards/anne_pro/keymaps/anne-pro-2-mac/keymap.c b/keyboards/anne_pro/keymaps/anne-pro-2-mac/keymap.c index 5879660ad7b1..7aeaac52c93f 100644 --- a/keyboards/anne_pro/keymaps/anne-pro-2-mac/keymap.c +++ b/keyboards/anne_pro/keymaps/anne-pro-2-mac/keymap.c @@ -17,13 +17,13 @@ #include QMK_KEYBOARD_H /* Anne Pro 2 MacOS layout -Includes Media Keys and TAP features, see readme.md */ +Includes Media Keys, TAP features and Magic TAP, see readme.md */ 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, + 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_LALT, KC_LGUI, KC_SPACE, KC_LALT, LT(1,KC_LEFT), LT(2,KC_DOWN), MT(MOD_RCTL, KC_RGHT) ), diff --git a/keyboards/anne_pro/keymaps/anne-pro-2-mac/readme.md b/keyboards/anne_pro/keymaps/anne-pro-2-mac/readme.md index 9c96f871415f..f1debc77fc68 100644 --- a/keyboards/anne_pro/keymaps/anne-pro-2-mac/readme.md +++ b/keyboards/anne_pro/keymaps/anne-pro-2-mac/readme.md @@ -20,6 +20,9 @@ ANNE - down arrow FN - left arrow Right CTRL - right arrow +__Magic TAP:__ + +Caps lock - FN __Bluetooth:__ From 934d3a6c237adeb97031df3b1ebd6f736ff5e20c Mon Sep 17 00:00:00 2001 From: Jesus Vallejo Date: Thu, 28 Nov 2019 18:35:58 +0100 Subject: [PATCH 014/567] back to commit --- .../anne_pro/keymaps/anne-pro-2-mac/keymap.c | 4 +- .../anne_pro/keymaps/anne-pro-2-mac/readme.md | 3 - .../anne_pro/keymaps/anne-pro-2-win/keymap.c | 18 ++-- .../anne_pro/keymaps/anne-pro-2-win/readme.md | 93 +++++++++---------- keyboards/anne_pro/keymaps/arrow/readme.md | 22 +++++ keyboards/anne_pro/keymaps/default/readme.md | 22 +++++ keyboards/anne_pro/keymaps/macos/readme.md | 22 +++++ 7 files changed, 123 insertions(+), 61 deletions(-) create mode 100644 keyboards/anne_pro/keymaps/arrow/readme.md create mode 100644 keyboards/anne_pro/keymaps/default/readme.md create mode 100644 keyboards/anne_pro/keymaps/macos/readme.md diff --git a/keyboards/anne_pro/keymaps/anne-pro-2-mac/keymap.c b/keyboards/anne_pro/keymaps/anne-pro-2-mac/keymap.c index 7aeaac52c93f..5879660ad7b1 100644 --- a/keyboards/anne_pro/keymaps/anne-pro-2-mac/keymap.c +++ b/keyboards/anne_pro/keymaps/anne-pro-2-mac/keymap.c @@ -17,13 +17,13 @@ #include QMK_KEYBOARD_H /* Anne Pro 2 MacOS layout -Includes Media Keys, TAP features and Magic TAP, see readme.md */ +Includes Media Keys and TAP features, see readme.md */ 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, - 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_CAPS, KC_A, KC_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_LALT, KC_LGUI, KC_SPACE, KC_LALT, LT(1,KC_LEFT), LT(2,KC_DOWN), MT(MOD_RCTL, KC_RGHT) ), diff --git a/keyboards/anne_pro/keymaps/anne-pro-2-mac/readme.md b/keyboards/anne_pro/keymaps/anne-pro-2-mac/readme.md index f1debc77fc68..9c96f871415f 100644 --- a/keyboards/anne_pro/keymaps/anne-pro-2-mac/readme.md +++ b/keyboards/anne_pro/keymaps/anne-pro-2-mac/readme.md @@ -20,9 +20,6 @@ ANNE - down arrow FN - left arrow Right CTRL - right arrow -__Magic TAP:__ - -Caps lock - FN __Bluetooth:__ diff --git a/keyboards/anne_pro/keymaps/anne-pro-2-win/keymap.c b/keyboards/anne_pro/keymaps/anne-pro-2-win/keymap.c index 6c5d761f3997..698febe779d7 100644 --- a/keyboards/anne_pro/keymaps/anne-pro-2-win/keymap.c +++ b/keyboards/anne_pro/keymaps/anne-pro-2-win/keymap.c @@ -16,20 +16,22 @@ #include QMK_KEYBOARD_H -/* Default Anne Pro layout with Magic tap function, windows style */ +/* Anne Pro 2 default layout +Includes Media Keys and TAP features, see readme.md */ + 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, - 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_LWIN, KC_LALT, KC_SPACE, KC_RALT, LT(1,KC_LEFT), LT(2,KC_DOWN), MT(MOD_RCTL, KC_RGHT) + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_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, MT(MOD_RSFT, KC_UP), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, LT(1,KC_LEFT), LT(2,KC_DOWN), MT(MOD_RCTL, 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, XXXXXXX, - XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, APL_RGB, APL_RAT, APL_BRT, APL_MOD, KC_UP, KC_SLCK, KC_PAUS, KC_HOME, KC_END, KC_PSCR, + XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, KC_SLCK, KC_PAUS, KC_HOME, KC_END, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGUP, KC_PGDN, XXXXXXX, - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TG(3), XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, KC_DEL, _______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TG(3), XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, KC_DEL, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______ ), [2] = LAYOUT( diff --git a/keyboards/anne_pro/keymaps/anne-pro-2-win/readme.md b/keyboards/anne_pro/keymaps/anne-pro-2-win/readme.md index 71d5af1f5c08..b471d6d019d3 100644 --- a/keyboards/anne_pro/keymaps/anne-pro-2-win/readme.md +++ b/keyboards/anne_pro/keymaps/anne-pro-2-win/readme.md @@ -1,48 +1,45 @@ -# Anne Pro 2 Windows keymap - -### This keymap adds TAP ,AP2-like Magic TAP, Media Keys features and AP2-like backlight control. -### Maintainer: [angelokofficial](https://github.com/angelokofficial) - - -__Keys:__ - -ANNE+0 - off/on the backlight -ANNE+9 - switch the backlight profile -ANNE + =/+ - increases brightness -ANNE + - -/_ - changes backlight speed -ANNE+ESC - reset the keyboard (instead of button on the back side) -ANNE+ESC+hold ESC - enter to the bootloader (DFU) mode - -__TAP:__ - -Right Shift - up arrow -ANNE - down arrow -FN - left arrow -Right CTRL - right arrow - -__Magic TAP:__ - -Caps lock - FN - -__Bluetooth:__ - -Fn+B - enter BT mode -=/+ - turn ON BT --/_ - turn OFF BT -0 - enter legacy BT mode -1,2,3,4 - should work as bt profiles for switch among connected devices - - -**Media keys:** - -ANNE+1 - stop -ANNE+2 - volume down -ANNE+3 - volume up -ANNE+4 - previous track -ANNE+5 - pause/play -ANNE+6 - next track -ANNE+7 - mute/unmute volume - - -All other keys remain on their own places. -To compile: `make anne_pro:` \ No newline at end of file +# Anne Pro 2 Windows keymap + +### This keymap adds TAP, Media Keys features and AP2-like backlight control. +### Maintainer: [angelokofficial](https://github.com/angelokofficial) + + +__Keys:__ + +ANNE+0 - off/on the backlight +ANNE+9 - switch the backlight profile +ANNE + =/+ - increases brightness +ANNE + - -/_ - changes backlight speed +ANNE+ESC - reset the keyboard (instead of button on the back side) +ANNE+ESC+hold ESC - enter to the bootloader (DFU) mode + +__TAP:__ + +Right Shift - up arrow +ANNE - down arrow +FN - left arrow +Right CTRL - right arrow + + +__Bluetooth:__ + +Fn+B - enter BT mode +=/+ - turn ON BT +-/_ - turn OFF BT +0 - enter legacy BT mode +1,2,3,4 - should work as bt profiles for switch among connected devices + + +**Media keys:** + +ANNE+1 - stop +ANNE+2 - volume down +ANNE+3 - volume up +ANNE+4 - previous track +ANNE+5 - pause/play +ANNE+6 - next track +ANNE+7 - mute/unmute volume + + +All other keys remain on their own places. +To compile: `make anne_pro:` diff --git a/keyboards/anne_pro/keymaps/arrow/readme.md b/keyboards/anne_pro/keymaps/arrow/readme.md new file mode 100644 index 000000000000..87ff650b8dc4 --- /dev/null +++ b/keyboards/anne_pro/keymaps/arrow/readme.md @@ -0,0 +1,22 @@ +# Anne Pro Arrow keymap + +### Maintainer: [msvisser](https://github.com/msvisser) + +This keymap is the arrows keymap supplied on the original Anne Pro firmware. +However the interface for Bluetooth is changed slightly. + +### Bluetooth +To enable the Bluetooht layer press `FN+B`. + +While in the Bluetooth layer: +- `ESC` - Exit Bluetooth layer +- `1, 2, 3, 4` - Connect to saved profile +- `Q, W, E, R` - Save connection to profile +- `A, S, D, F` - Delete saved connection +- `0` - Toggle legacy Bluetooth mode +- `-` - Disable Bluetooth +- `+` - Enable Bluetooth + +Finally the lighting on the `ESC` key tries to indicate the connection status +of the Bluetooth. However this might sometimes go out of sync. To update the +connection status press the left `CTRL` key. diff --git a/keyboards/anne_pro/keymaps/default/readme.md b/keyboards/anne_pro/keymaps/default/readme.md new file mode 100644 index 000000000000..1d2aa725b927 --- /dev/null +++ b/keyboards/anne_pro/keymaps/default/readme.md @@ -0,0 +1,22 @@ +# Anne Pro Default (Windows) keymap + +### Maintainer: [msvisser](https://github.com/msvisser) + +This keymap is the default Windows keymap supplied on the original Anne Pro +firmware. However the interface for Bluetooth is changed slightly. + +### Bluetooth +To enable the Bluetooht layer press `FN+B`. + +While in the Bluetooth layer: +- `ESC` - Exit Bluetooth layer +- `1, 2, 3, 4` - Connect to saved profile +- `Q, W, E, R` - Save connection to profile +- `A, S, D, F` - Delete saved connection +- `0` - Toggle legacy Bluetooth mode +- `-` - Disable Bluetooth +- `+` - Enable Bluetooth + +Finally the lighting on the `ESC` key tries to indicate the connection status +of the Bluetooth. However this might sometimes go out of sync. To update the +connection status press the left `CTRL` key. diff --git a/keyboards/anne_pro/keymaps/macos/readme.md b/keyboards/anne_pro/keymaps/macos/readme.md new file mode 100644 index 000000000000..1fca1acad852 --- /dev/null +++ b/keyboards/anne_pro/keymaps/macos/readme.md @@ -0,0 +1,22 @@ +# Anne Pro macOS keymap + +### Maintainer: [msvisser](https://github.com/msvisser) + +This keymap is the macOS keymap supplied on the original Anne Pro firmware. +However the interface for Bluetooth is changed slightly. + +### Bluetooth +To enable the Bluetooht layer press `FN+B`. + +While in the Bluetooth layer: +- `ESC` - Exit Bluetooth layer +- `1, 2, 3, 4` - Connect to saved profile +- `Q, W, E, R` - Save connection to profile +- `A, S, D, F` - Delete saved connection +- `0` - Toggle legacy Bluetooth mode +- `-` - Disable Bluetooth +- `+` - Enable Bluetooth + +Finally the lighting on the `ESC` key tries to indicate the connection status +of the Bluetooth. However this might sometimes go out of sync. To update the +connection status press the left `CTRL` key. 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 015/567] [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 016/567] 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 017/567] 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 018/567] 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 019/567] 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 020/567] 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 021/567] 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 022/567] 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 023/567] [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 024/567] 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 025/567] 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 026/567] 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 027/567] [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 028/567] [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 029/567] 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 030/567] 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 031/567] 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 032/567] 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 033/567] 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 034/567] [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 035/567] 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 036/567] [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 037/567] 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 038/567] [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 039/567] 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 040/567] 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 041/567] [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 042/567] [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 043/567] 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 044/567] 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 045/567] =?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 046/567] 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 047/567] [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 048/567] 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 049/567] 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 050/567] 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 051/567] 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 052/567] 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 053/567] 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 054/567] 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 055/567] 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 056/567] 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 057/567] [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 058/567] 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 059/567] 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 060/567] [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 061/567] 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 062/567] [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 063/567] 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 064/567] [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 065/567] [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 066/567] 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 067/567] 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 068/567] [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 069/567] [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 070/567] 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 071/567] 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 072/567] 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 073/567] 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 074/567] 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 075/567] 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 076/567] 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 077/567] 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 078/567] 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 079/567] [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 080/567] 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 081/567] 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 082/567] 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 083/567] 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 084/567] 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 085/567] 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 086/567] 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 087/567] 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 088/567] 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 089/567] [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 090/567] 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 091/567] 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 092/567] 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 093/567] [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 094/567] [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 095/567] [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 096/567] [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 097/567] [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 098/567] [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 099/567] [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 100/567] [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 101/567] [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 102/567] 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 103/567] [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 104/567] [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 105/567] [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 106/567] [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 107/567] 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 108/567] 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 109/567] [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 110/567] 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 111/567] 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 112/567] 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 113/567] 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 114/567] 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 115/567] 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 116/567] 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 117/567] 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 118/567] [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 119/567] 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 120/567] 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 121/567] [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 122/567] 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 123/567] 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 124/567] 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 125/567] 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 126/567] [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 127/567] [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 128/567] 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 129/567] [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 130/567] 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 131/567] 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 132/567] [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 133/567] 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 134/567] [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 135/567] [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 136/567] [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 137/567] [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 138/567] 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 139/567] [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 140/567] [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 141/567] [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 142/567] [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 143/567] [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 144/567] [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 145/567] 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 146/567] 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 147/567] 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 148/567] [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 149/567] [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 150/567] [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 151/567] [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 152/567] 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 153/567] [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 154/567] [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 155/567] [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 156/567] [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 157/567] 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 158/567] [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 159/567] [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 160/567] 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 161/567] [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 162/567] 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 163/567] [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 164/567] [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 165/567] [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 166/567] [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 167/567] [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 168/567] [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 169/567] [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 170/567] [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 171/567] [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 172/567] [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 173/567] [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 174/567] [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 175/567] 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 176/567] [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 177/567] [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 178/567] [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 179/567] [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 180/567] [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 181/567] 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 182/567] [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 183/567] 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 184/567] [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 185/567] 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 186/567] [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 187/567] [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 188/567] [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 189/567] [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 190/567] 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 191/567] [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 192/567] 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 193/567] 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 194/567] [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 195/567] 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 196/567] [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 197/567] 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 198/567] [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 199/567] [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 200/567] [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 201/567] 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 202/567] [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 203/567] [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 204/567] [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 205/567] 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 206/567] 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 207/567] [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 208/567] 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 209/567] 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 210/567] 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 211/567] [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 212/567] 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 213/567] [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 214/567] [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 215/567] [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 216/567] [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 217/567] [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 218/567] [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 219/567] [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 220/567] 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 221/567] [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 222/567] 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 223/567] 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 224/567] 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 225/567] [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 226/567] [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 227/567] 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 228/567] 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 229/567] 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 230/567] [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 231/567] [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 232/567] 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 233/567] 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 234/567] 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 235/567] [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 236/567] [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 237/567] [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 238/567] 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 239/567] [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 240/567] [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 241/567] 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 242/567] [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 243/567] 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 244/567] 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 245/567] [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 246/567] [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 247/567] 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 248/567] [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 249/567] [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 250/567] 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 251/567] [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 252/567] [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 253/567] [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 254/567] [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 255/567] [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 256/567] [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 257/567] [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 258/567] 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 259/567] [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 260/567] 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 261/567] [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 262/567] [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 263/567] [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 264/567] 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 265/567] 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 266/567] 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 267/567] [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 268/567] 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 269/567] 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 270/567] [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 271/567] [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 272/567] [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 273/567] [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 274/567] 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 275/567] [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 276/567] [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 277/567] 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 278/567] [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 279/567] [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 280/567] 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 281/567] [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 282/567] [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 283/567] [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 284/567] [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 285/567] 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 286/567] 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 287/567] 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 288/567] 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 289/567] 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 290/567] 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 291/567] 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 292/567] [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 293/567] [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 294/567] [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 295/567] [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 296/567] [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 297/567] [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 298/567] [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 299/567] 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 300/567] [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 301/567] 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 302/567] 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 303/567] [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 304/567] 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 305/567] 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 306/567] [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 307/567] [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 308/567] [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 309/567] 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 310/567] 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 311/567] 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 312/567] [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 313/567] 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 314/567] [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 315/567] 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 316/567] 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 317/567] [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 318/567] [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 319/567] 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 320/567] 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 321/567] 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 322/567] 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 323/567] 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 324/567] 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 325/567] 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 326/567] 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 327/567] 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 328/567] 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 329/567] 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 330/567] 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 331/567] `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 332/567] 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 333/567] 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 334/567] 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 335/567] 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 336/567] 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 337/567] 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 338/567] 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 339/567] 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 340/567] 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 341/567] 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 342/567] 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 343/567] 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 344/567] 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 345/567] [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 346/567] 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 347/567] 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 348/567] 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 349/567] 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 350/567] 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 351/567] 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 352/567] 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 353/567] #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 354/567] 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 355/567] 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 356/567] 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 357/567] 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 358/567] 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 359/567] 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 360/567] 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 361/567] 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 362/567] 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 363/567] 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 364/567] 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 365/567] 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 366/567] 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 367/567] 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 368/567] 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 369/567] 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 370/567] 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 371/567] 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 372/567] [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 373/567] [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 374/567] [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 375/567] 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 376/567] [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 377/567] [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 378/567] [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 379/567] [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 380/567] 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 381/567] 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 382/567] 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 383/567] 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 384/567] 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 385/567] 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 386/567] (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 387/567] 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 388/567] 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 389/567] 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 390/567] [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 391/567] [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 392/567] [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 393/567] [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 394/567] [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 395/567] 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 396/567] [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 397/567] 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 398/567] 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 399/567] [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 400/567] 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 401/567] [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 402/567] [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 403/567] [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 404/567] [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 405/567] [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 406/567] [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 407/567] [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 408/567] [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 409/567] [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 410/567] 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 411/567] [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 412/567] [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 413/567] 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 414/567] [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 415/567] 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 416/567] [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 417/567] [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 418/567] 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 419/567] [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 420/567] 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 421/567] [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 422/567] 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 423/567] [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 424/567] [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 425/567] [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 426/567] [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 427/567] [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 428/567] [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 429/567] 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 430/567] [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 431/567] 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 432/567] 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 433/567] 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 434/567] 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 435/567] 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 436/567] [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 437/567] [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 438/567] [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 439/567] 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 440/567] [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 441/567] [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 442/567] 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 443/567] [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 444/567] 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 445/567] [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 446/567] [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 447/567] [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 448/567] 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 449/567] 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 450/567] [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 451/567] 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 452/567] [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 453/567] 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 454/567] [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 455/567] [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 456/567] 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 457/567] [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 458/567] [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 459/567] 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 460/567] 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 461/567] 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 462/567] [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 463/567] [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 464/567] 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 465/567] [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 466/567] [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 467/567] 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 468/567] 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 469/567] [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 470/567] 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 471/567] 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 472/567] 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 473/567] 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 474/567] 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 475/567] 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 476/567] 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 477/567] 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 478/567] 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 479/567] 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 480/567] 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 481/567] [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 482/567] 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 483/567] 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 484/567] 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 485/567] 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 486/567] 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 487/567] [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 488/567] [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 489/567] 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 490/567] [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 491/567] [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 492/567] [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 493/567] [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 494/567] 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 495/567] 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 496/567] 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 497/567] [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 498/567] 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 499/567] [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 500/567] [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 501/567] 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 502/567] 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 503/567] 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 504/567] [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 505/567] 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 506/567] 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 507/567] 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 508/567] 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 509/567] 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 510/567] 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 511/567] 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 512/567] [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 513/567] 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 514/567] 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 515/567] 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 516/567] [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 517/567] [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 518/567] [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 519/567] 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 520/567] 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 521/567] [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 522/567] [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 523/567] [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 524/567] 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 525/567] 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 526/567] [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 527/567] [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 528/567] [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 529/567] 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 530/567] 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 531/567] [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 532/567] [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 533/567] [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 534/567] 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 535/567] 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 536/567] [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 537/567] 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 538/567] [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 539/567] [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 540/567] [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 541/567] 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 542/567] [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 543/567] 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 544/567] 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 545/567] 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 546/567] 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 547/567] 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 548/567] 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 549/567] [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 550/567] 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 551/567] [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 552/567] 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 553/567] 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 554/567] [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 555/567] [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 556/567] `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 557/567] [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 558/567] 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 559/567] 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 560/567] [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 561/567] 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 562/567] [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 563/567] 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 564/567] [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 565/567] 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 566/567] 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 567/567] [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