diff options
36 files changed, 636 insertions, 333 deletions
diff --git a/data/mappings/defaults.hjson b/data/mappings/defaults.hjson index 2bb00da223..8bf5b8ebcb 100644 --- a/data/mappings/defaults.hjson +++ b/data/mappings/defaults.hjson @@ -79,6 +79,11 @@ "processor": "RP2040", "bootloader": "rp2040", "board": "QMK_PM2040" + }, + "imera": { + "processor": "RP2040", + "bootloader": "rp2040", + "board": "QMK_PM2040" } } } diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index 2996958084..32d737a1d8 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -43,7 +43,7 @@ }, "development_board": { "type": "string", - "enum": ["promicro", "elite_c", "elite_pi", "proton_c", "kb2040", "promicro_rp2040", "blok", "michi", "bit_c_pro", "stemcell", "bluepill", "blackpill_f401", "blackpill_f411", "bonsai_c4", "helios", "liatris"] + "enum": ["promicro", "elite_c", "elite_pi", "proton_c", "kb2040", "promicro_rp2040", "blok", "michi", "bit_c_pro", "stemcell", "bluepill", "blackpill_f401", "blackpill_f411", "bonsai_c4", "helios", "liatris", "imera"] }, "pin_compatible": { "type": "string", diff --git a/docs/feature_converters.md b/docs/feature_converters.md index 11bdbed576..62c214e246 100644 --- a/docs/feature_converters.md +++ b/docs/feature_converters.md @@ -19,6 +19,7 @@ The following converters are available at this time: | `promicro` | `elite_pi` | | `promicro` | `helios` | | `promicro` | `liatris` | +| `promicro` | `imera` | | `promicro` | `michi` | | `elite_c` | `stemcell` | | `elite_c` | `rp2040_ce` | @@ -82,6 +83,7 @@ If a board currently supported in QMK uses a [Pro Micro](https://www.sparkfun.co | [Elite-Pi](https://keeb.io/products/elite-pi-usb-c-pro-micro-replacement-rp2040) | `elite_pi` | | [0xCB Helios](https://keeb.supply/products/0xcb-helios) | `helios` | | [Liatris](https://splitkb.com/products/liatris) | `liatris` | +| [Imera](https://splitkb.com/products/imera) | `imera` | | [Michi](https://github.com/ci-bus/michi-promicro-rp2040) | `michi` | Converter summary: @@ -99,6 +101,7 @@ Converter summary: | `elite_pi` | `-e CONVERT_TO=elite_pi` | `CONVERT_TO=elite_pi` | `#ifdef CONVERT_TO_ELITE_PI` | | `helios` | `-e CONVERT_TO=helios` | `CONVERT_TO=helios` | `#ifdef CONVERT_TO_HELIOS` | | `liatris` | `-e CONVERT_TO=liatris` | `CONVERT_TO=liatris` | `#ifdef CONVERT_TO_LIATRIS` | +| `imera` | `-e CONVERT_TO=imera` | `CONVERT_TO=imera` | `#ifdef CONVERT_TO_IMERA` | | `michi` | `-e CONVERT_TO=michi` | `CONVERT_TO=michi` | `#ifdef CONVERT_TO_MICHI` | ### Proton C :id=proton_c diff --git a/docs/feature_pointing_device.md b/docs/feature_pointing_device.md index 0ac0069ff8..fad9056e10 100644 --- a/docs/feature_pointing_device.md +++ b/docs/feature_pointing_device.md @@ -69,10 +69,29 @@ The Analog Joystick is an analog (ADC) driven sensor. There are a variety of jo | `ANALOG_JOYSTICK_Y_AXIS_PIN` | (Required) The pin used for the horizontal/Y axis. | _not defined_ | | `ANALOG_JOYSTICK_AXIS_MIN` | (Optional) Sets the lower range to be considered movement. | `0` | | `ANALOG_JOYSTICK_AXIS_MAX` | (Optional) Sets the upper range to be considered movement. | `1023` | +| `ANALOG_JOYSTICK_AUTO_AXIS` | (Optional) Sets ranges to be considered movement automatically. | _not defined_ | | `ANALOG_JOYSTICK_SPEED_REGULATOR` | (Optional) The divisor used to slow down movement. (lower makes it faster) | `20` | | `ANALOG_JOYSTICK_READ_INTERVAL` | (Optional) The interval in milliseconds between reads. | `10` | | `ANALOG_JOYSTICK_SPEED_MAX` | (Optional) The maximum value used for motion. | `2` | | `ANALOG_JOYSTICK_CLICK_PIN` | (Optional) The pin wired up to the press switch of the analog stick. | _not defined_ | +| `ANALOG_JOYSTICK_WEIGHTS` | (Optional) Use custom weights for lever positions. | _not defined_ | +| `ANALOG_JOYSTICK_CUTOFF` | (Optional) Cut off movement when joystick returns to start position. | _not defined_ | + +If `ANALOG_JOYSTICK_AUTO_AXIS` is used, then `ANALOG_JOYSTICK_AXIS_MIN` and `ANALOG_JOYSTICK_AXIS_MAX` are ignored. + +By default analog joystick implementation uses `x^2` weighting for lever positions. `ANALOG_JOYSTICK_WEIGHTS` allows to experiment with different configurations that might feel better. + +E.g. This is weights for `((x-0.4)^3+0.064)/0.282`: + +```c +#define ANALOG_JOYSTICK_WEIGHTS {0,2,4,5,7,8,9,10,12,13,14,15,15,16,17,18,18,19,19,20,20,21,21,21,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,25,25,25,26,26,26,27,28,28,29,29,30,31,32,33,34,35,36,37,38,40,41,43,44,46,48,49,51,53,56,58,60,62,65,68,70,73,76,79,82,85,89,92,96,100} +``` + +You can use following JS code to generate weights for different formulas: + +```js +JSON.stringify(Array.from(Array(101).keys()).map(x => Math.ceil((((x/100-0.4)**3+0.064)/0.282*100)))) +``` ### Azoteq IQS5XX Trackpad diff --git a/docs/squeezing_avr.md b/docs/squeezing_avr.md index af015b4b18..c3b9e5595e 100644 --- a/docs/squeezing_avr.md +++ b/docs/squeezing_avr.md @@ -210,6 +210,7 @@ That said, there are a number of Pro Micro replacements with ARM controllers: * [Elite-Pi](https://keeb.io/products/elite-pi-usb-c-pro-micro-replacement-rp2040) * [0xCB Helios](https://keeb.supply/products/0xcb-helios) ([Open Source](https://github.com/0xCB-dev/0xCB-Helios), DIY/PCBA/Shop) * [Liatris](https://splitkb.com/products/liatris) +* [Imera](https://splitkb.com/products/imera) * [Michi](https://github.com/ci-bus/michi-promicro-rp2040) There are other, non-Pro Micro compatible boards out there. The most popular being: diff --git a/drivers/led/apa102.h b/drivers/led/apa102.h index cd0a19d445..027221f434 100644 --- a/drivers/led/apa102.h +++ b/drivers/led/apa102.h @@ -19,6 +19,12 @@ #include "color.h" +#if defined(RGBLED_NUM) +# define APA102_LED_COUNT RGBLED_NUM +#elif defined(RGB_MATRIX_LED_COUNT) +# define APA102_LED_COUNT RGB_MATRIX_LED_COUNT +#endif + #ifndef APA102_DEFAULT_BRIGHTNESS # define APA102_DEFAULT_BRIGHTNESS 31 #endif diff --git a/drivers/sensors/analog_joystick.c b/drivers/sensors/analog_joystick.c index 12256a8e7a..4aede4eacd 100644 --- a/drivers/sensors/analog_joystick.c +++ b/drivers/sensors/analog_joystick.c @@ -22,17 +22,28 @@ #include <stdlib.h> // Set Parameters +#ifndef ANALOG_JOYSTICK_AUTO_AXIS uint16_t minAxisValue = ANALOG_JOYSTICK_AXIS_MIN; uint16_t maxAxisValue = ANALOG_JOYSTICK_AXIS_MAX; +#else +int16_t minAxisValues[2]; +int16_t maxAxisValues[2]; +#endif uint8_t maxCursorSpeed = ANALOG_JOYSTICK_SPEED_MAX; uint8_t speedRegulator = ANALOG_JOYSTICK_SPEED_REGULATOR; // Lower Values Create Faster Movement +#ifdef ANALOG_JOYSTICK_WEIGHTS +int8_t weights[101] = ANALOG_JOYSTICK_WEIGHTS; +#endif + int16_t xOrigin, yOrigin; uint16_t lastCursor = 0; -int16_t axisCoordinate(pin_t pin, uint16_t origin) { +uint8_t prevValues[2] = {0, 0}; + +int16_t axisCoordinate(pin_t pin, uint16_t origin, uint8_t axis) { int8_t direction; int16_t distanceFromOrigin; int16_t range; @@ -43,12 +54,27 @@ int16_t axisCoordinate(pin_t pin, uint16_t origin) { return 0; } else if (origin > position) { distanceFromOrigin = origin - position; - range = origin - minAxisValue; - direction = -1; +#ifdef ANALOG_JOYSTICK_AUTO_AXIS + if (position < minAxisValues[axis]) { + minAxisValues[axis] = position; + } + range = origin - minAxisValues[axis]; +#else + range = origin - minAxisValue; +#endif + direction = -1; } else { distanceFromOrigin = position - origin; - range = maxAxisValue - origin; - direction = 1; + +#ifdef ANALOG_JOYSTICK_AUTO_AXIS + if (position > maxAxisValues[axis]) { + maxAxisValues[axis] = position; + } + range = maxAxisValues[axis] - origin; +#else + range = maxAxisValue - origin; +#endif + direction = 1; } float percent = (float)distanceFromOrigin / range; @@ -62,14 +88,29 @@ int16_t axisCoordinate(pin_t pin, uint16_t origin) { } } -int8_t axisToMouseComponent(pin_t pin, int16_t origin, uint8_t maxSpeed) { - int16_t coordinate = axisCoordinate(pin, origin); +int8_t axisToMouseComponent(pin_t pin, int16_t origin, uint8_t maxSpeed, uint8_t axis) { + int16_t coordinate = axisCoordinate(pin, origin, axis); + int8_t result; +#ifndef ANALOG_JOYSTICK_WEIGHTS if (coordinate != 0) { float percent = (float)coordinate / 100; - return percent * maxCursorSpeed * (abs(coordinate) / speedRegulator); + result = percent * maxCursorSpeed * (abs(coordinate) / speedRegulator); } else { return 0; } +#else + result = weights[abs(coordinate)] * (coordinate < 0 ? -1 : 1) * maxCursorSpeed / speedRegulator; +#endif + +#ifdef ANALOG_JOYSTICK_CUTOFF + uint8_t pv = prevValues[axis]; + prevValues[axis] = abs(result); + if (pv > abs(result)) { + return 0; + } +#endif + + return result; } report_analog_joystick_t analog_joystick_read(void) { @@ -77,8 +118,8 @@ report_analog_joystick_t analog_joystick_read(void) { if (timer_elapsed(lastCursor) > ANALOG_JOYSTICK_READ_INTERVAL) { lastCursor = timer_read(); - report.x = axisToMouseComponent(ANALOG_JOYSTICK_X_AXIS_PIN, xOrigin, maxCursorSpeed); - report.y = axisToMouseComponent(ANALOG_JOYSTICK_Y_AXIS_PIN, yOrigin, maxCursorSpeed); + report.x = axisToMouseComponent(ANALOG_JOYSTICK_X_AXIS_PIN, xOrigin, maxCursorSpeed, 0); + report.y = axisToMouseComponent(ANALOG_JOYSTICK_Y_AXIS_PIN, yOrigin, maxCursorSpeed, 1); } #ifdef ANALOG_JOYSTICK_CLICK_PIN report.button = !readPin(ANALOG_JOYSTICK_CLICK_PIN); @@ -93,4 +134,11 @@ void analog_joystick_init(void) { // Account for drift xOrigin = analogReadPin(ANALOG_JOYSTICK_X_AXIS_PIN); yOrigin = analogReadPin(ANALOG_JOYSTICK_Y_AXIS_PIN); + +#ifdef ANALOG_JOYSTICK_AUTO_AXIS + minAxisValues[0] = xOrigin - 100; + minAxisValues[1] = yOrigin - 100; + maxAxisValues[0] = xOrigin + 100; + maxAxisValues[1] = yOrigin + 100; +#endif } diff --git a/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c b/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c index 2382185362..789bb7af02 100644 --- a/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c +++ b/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c @@ -42,9 +42,8 @@ bool oled_task_user(void) { #endif -#ifdef ENCODER_ENABLE +#ifdef ENCODER_MAP_ENABLE -bool encoder_update_user(uint8_t index, bool clockwise) { /* Rev1.1 Rev1 ,-----------------------, ,-----------------------, @@ -57,37 +56,12 @@ Rev1.1 Rev1 | | | | 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); - } - } - return true; -} +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { +#ifdef KEYBOARD_keycapsss_plaid_pad_rev1 + { ENCODER_CCW_CW(KC_F18, KC_F17), ENCODER_CCW_CW(KC_F20, KC_F19) } +#else + { ENCODER_CCW_CW(KC_F18, KC_F17), ENCODER_CCW_CW(KC_F20, KC_F19), ENCODER_CCW_CW(KC_F22, KC_F21), ENCODER_CCW_CW(KC_F24, KC_F23) } +#endif +}; #endif diff --git a/keyboards/keycapsss/plaid_pad/keymaps/default/rules.mk b/keyboards/keycapsss/plaid_pad/keymaps/default/rules.mk new file mode 100644 index 0000000000..ee32568148 --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/keycapsss/plaid_pad/keymaps/oled/keymap.c b/keyboards/keycapsss/plaid_pad/keymaps/oled/keymap.c index 371e8e9941..944f822fb3 100644 --- a/keyboards/keycapsss/plaid_pad/keymaps/oled/keymap.c +++ b/keyboards/keycapsss/plaid_pad/keymaps/oled/keymap.c @@ -125,8 +125,7 @@ bool oled_task_user(void) { #endif -#ifdef ENCODER_ENABLE -bool encoder_update_user(uint8_t index, bool clockwise) { +#ifdef ENCODER_MAP_ENABLE /* ,-----------------------, | E1 | E2 | E3 | E4 | @@ -138,93 +137,16 @@ bool encoder_update_user(uint8_t index, bool clockwise) { | | | | E1 | `-----------------------' */ +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { +#ifdef KEYBOARD_keycapsss_plaid_pad_rev1 + [_NUMPAD] = { ENCODER_CCW_CW(KC_F18, KC_F17), ENCODER_CCW_CW(KC_F20, KC_F19) }, + [_NAVIGATION] = { ENCODER_CCW_CW(C(S(KC_TAB)), C(KC_TAB)), ENCODER_CCW_CW(KC_PGUP, KC_PGDN) }, + [_MEDIA] = { ENCODER_CCW_CW(KC_F18, KC_F17), ENCODER_CCW_CW(KC_F20, KC_F19) } +#else + [_NUMPAD] = { ENCODER_CCW_CW(KC_F18, KC_F17), ENCODER_CCW_CW(KC_F20, KC_F19), ENCODER_CCW_CW(KC_F22, KC_F21), ENCODER_CCW_CW(KC_F24, KC_F23) }, + [_NAVIGATION] = { ENCODER_CCW_CW(C(S(KC_TAB)), C(KC_TAB)), ENCODER_CCW_CW(KC_PGUP, KC_PGDN), ENCODER_CCW_CW(KC_WH_U, KC_WH_D), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_MEDIA] = { ENCODER_CCW_CW(KC_F18, KC_F17), ENCODER_CCW_CW(KC_F20, KC_F19), ENCODER_CCW_CW(KC_BRID, KC_BRIU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) } +#endif +}; - // First encoder (E1) - if (index == 0) { - switch (get_highest_layer(layer_state)) { - case _NAVIGATION: - // Browser tab switching - if (clockwise) { - tap_code16(LCTL(KC_TAB)); - } else { - tap_code16(LCTL(LSFT(KC_TAB))); - } - break; - default: - if (clockwise) { - tap_code(KC_F17); - } else { - tap_code(KC_F18); - } - break; - } - // Second encoder (E2) - } else if (index == 1) { - switch (get_highest_layer(layer_state)) { - case _NAVIGATION: - // Page Down/Up - if (clockwise) { - tap_code16(KC_PGDN); - } else { - tap_code16(KC_PGUP); - } - break; - default: - if (clockwise) { - tap_code(KC_F19); - } else { - tap_code(KC_F20); - } - break; - } - // Third encoder (E3) - } else if (index == 2) { - switch (get_highest_layer(layer_state)) { - case _NAVIGATION: - // Mouse wheel up/down - if (clockwise) { - tap_code(KC_MS_WH_DOWN); - } else { - tap_code(KC_MS_WH_UP); - } - break; - case _MEDIA: - // BRIGHTNESS Up/Down - if (clockwise) { - tap_code16(KC_BRIGHTNESS_UP); - } else { - tap_code16(KC_BRIGHTNESS_DOWN); - } - break; - default: - if (clockwise) { - tap_code(KC_F21); - } else { - tap_code(KC_F22); - } - break; - } - // Forth encoder (E4) - } else if (index == 3) { - switch (get_highest_layer(layer_state)) { - case _NAVIGATION: - case _MEDIA: - // Volume Up/Down - if (clockwise) { - tap_code16(KC_AUDIO_VOL_UP); - } else { - tap_code16(KC_AUDIO_VOL_DOWN); - } - break; - default: - if (clockwise) { - tap_code(KC_F23); - } else { - tap_code(KC_F24); - } - break; - } - } - return true; -} #endif diff --git a/keyboards/keycapsss/plaid_pad/keymaps/oled/rules.mk b/keyboards/keycapsss/plaid_pad/keymaps/oled/rules.mk index dc3e29cf8b..33bd0c3611 100644 --- a/keyboards/keycapsss/plaid_pad/keymaps/oled/rules.mk +++ b/keyboards/keycapsss/plaid_pad/keymaps/oled/rules.mk @@ -1,2 +1,3 @@ OLED_ENABLE = yes COMBO_ENABLE = yes +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c b/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c index 7d48591cd2..4ca3fc944b 100644 --- a/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c +++ b/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c @@ -27,26 +27,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | 0 | . | = | + | * `-----------------------' */ - [0] = LAYOUT_ortho_4x4( + 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 ), + KC_P0, KC_PDOT, KC_PEQL, KC_PPLS + ), }; @@ -69,8 +55,7 @@ bool oled_task_user(void) { #endif -#ifdef ENCODER_ENABLE -bool encoder_update_user(uint8_t index, bool clockwise) { +#ifdef ENCODER_MAP_ENABLE /* Rev1.1 Rev1 ,-----------------------, ,-----------------------, @@ -84,35 +69,11 @@ Rev1.1 Rev1 `-----------------------' `-----------------------' */ - // 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); - } - } - return true; -} +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { +#ifdef KEYBOARD_keycapsss_plaid_pad_rev1 + { ENCODER_CCW_CW(KC_F18, KC_F17), ENCODER_CCW_CW(KC_F20, KC_F19) } +#else + { ENCODER_CCW_CW(KC_F18, KC_F17), ENCODER_CCW_CW(KC_F20, KC_F19), ENCODER_CCW_CW(KC_F22, KC_F21), ENCODER_CCW_CW(KC_F24, KC_F23) } +#endif +}; #endif diff --git a/keyboards/keycapsss/plaid_pad/keymaps/via/rules.mk b/keyboards/keycapsss/plaid_pad/keymaps/via/rules.mk index 36b7ba9cbc..1189f4ad19 100644 --- a/keyboards/keycapsss/plaid_pad/keymaps/via/rules.mk +++ b/keyboards/keycapsss/plaid_pad/keymaps/via/rules.mk @@ -1,2 +1,3 @@ VIA_ENABLE = yes LTO_ENABLE = yes +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/projectcain/vault35/atmega32u4/info.json b/keyboards/projectcain/vault35/atmega32u4/info.json new file mode 100644 index 0000000000..9acd8ee34d --- /dev/null +++ b/keyboards/projectcain/vault35/atmega32u4/info.json @@ -0,0 +1,45 @@ +{ + "bootloader": "atmel-dfu", + "build": { + "lto": true + }, + "encoder": { + "rotary": [ + {"pin_a": "D7", "pin_b": "D6", "resolution": 2} + ] + }, + "features": { + "bootmagic": true, + "extrakey": true, + "encoder": true, + "mousekey": true, + "nkro": true, + "rgblight": true + }, + "matrix_pins": { + "cols": ["B1", "D3", "F0", "F1", "F4", "F5", "F6", "F7", "C6", "B6", "B5"], + "rows": ["B4", "D4", "B0", "C7"] + }, + "processor": "atmega32u4", + "rgblight": { + "animations": { + "alternating": true, + "breathing": true, + "christmas": true, + "knight": true, + "rainbow_mood": true, + "rainbow_swirl": true, + "rgb_test": true, + "snake": true, + "static_gradient": true, + "twinkle": true + }, + "brightness_steps": 8, + "led_count": 12, + "saturation_steps": 8, + "sleep": true + }, + "ws2812": { + "pin": "D5" + } +} diff --git a/keyboards/projectcain/vault35/atmega32u4/rules.mk b/keyboards/projectcain/vault35/atmega32u4/rules.mk new file mode 100644 index 0000000000..6e7633bfe0 --- /dev/null +++ b/keyboards/projectcain/vault35/atmega32u4/rules.mk @@ -0,0 +1 @@ +# This file intentionally left blank diff --git a/keyboards/projectcain/vault35/config.h b/keyboards/projectcain/vault35/config.h deleted file mode 100644 index 7abf6b197c..0000000000 --- a/keyboards/projectcain/vault35/config.h +++ /dev/null @@ -1,36 +0,0 @@ -/* -Copyright 2021 projectcain -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -/* Mechanical 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 diff --git a/keyboards/projectcain/vault35/info.json b/keyboards/projectcain/vault35/info.json index d23c4b2f46..5662cdbf6b 100644 --- a/keyboards/projectcain/vault35/info.json +++ b/keyboards/projectcain/vault35/info.json @@ -1,27 +1,22 @@ { - "keyboard_name": "Vault35", "manufacturer": "projectcain", - "url": "", + "keyboard_name": "Vault35", "maintainer": "projectcain", - "usb": { - "vid": "0xFEED", - "pid": "0x6060", - "device_version": "0.0.1" - }, - "matrix_pins": { - "cols": ["B1", "D3", "F0", "F1", "F4", "F5", "F6", "F7", "C6", "B6", "B5"], - "rows": ["B4", "D4", "B0", "C7"] - }, "diode_direction": "COL2ROW", - "encoder": { - "rotary": [ - {"pin_a": "D6", "pin_b": "D7", "resolution": 2} - ] + "qmk": { + "locking": { + "enabled": true, + "resync": true + } + }, + "url": "https://mechvault.net", + "usb": { + "device_version": "0.0.1", + "pid": "0x6060", + "vid": "0xFEED" }, - "processor": "atmega32u4", - "bootloader": "atmel-dfu", "layouts": { - "LAYOUT_split_4space": { + "LAYOUT_all": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0}, {"matrix": [0, 1], "x": 1, "y": 0}, @@ -33,8 +28,7 @@ {"matrix": [0, 7], "x": 7, "y": 0}, {"matrix": [0, 8], "x": 8, "y": 0}, {"matrix": [0, 9], "x": 9, "y": 0}, - {"matrix": [0, 10], "x": 10, "y": 0}, - + {"matrix": [0, 10], "x": 10, "y": 0, "encoder": 0}, {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.25}, {"matrix": [1, 1], "x": 1.25, "y": 1}, {"matrix": [1, 2], "x": 2.25, "y": 1}, @@ -45,7 +39,6 @@ {"matrix": [1, 7], "x": 7.25, "y": 1}, {"matrix": [1, 8], "x": 8.25, "y": 1}, {"matrix": [1, 9], "x": 9.25, "y": 1, "w": 1.75}, - {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, {"matrix": [2, 1], "x": 1.75, "y": 2}, {"matrix": [2, 2], "x": 2.75, "y": 2}, @@ -56,16 +49,16 @@ {"matrix": [2, 7], "x": 7.75, "y": 2}, {"matrix": [2, 8], "x": 8.75, "y": 2}, {"matrix": [2, 9], "x": 9.75, "y": 2, "w": 1.25}, - {"matrix": [3, 1], "x": 1.5, "y": 3}, {"matrix": [3, 2], "x": 2.5, "y": 3, "w": 1.25}, - {"matrix": [3, 3], "x": 3.75, "y": 3, "w": 1.75}, - {"matrix": [3, 5], "x": 5.5, "y": 3, "w": 1.75}, - {"matrix": [3, 6], "x": 7.25, "y": 3, "w": 1.25}, - {"matrix": [3, 7], "x": 8.5, "y": 3} + {"matrix": [3, 3], "x": 3.75, "y": 3, "w": 1.5}, + {"matrix": [3, 4], "x": 5.25, "y": 3}, + {"matrix": [3, 5], "x": 6.25, "y": 3, "w": 1.5}, + {"matrix": [3, 6], "x": 7.75, "y": 3, "w": 1.25}, + {"matrix": [3, 7], "x": 9, "y": 3} ] }, - "LAYOUT_split_3space": { + "LAYOUT_full_space": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0}, {"matrix": [0, 1], "x": 1, "y": 0}, @@ -77,8 +70,7 @@ {"matrix": [0, 7], "x": 7, "y": 0}, {"matrix": [0, 8], "x": 8, "y": 0}, {"matrix": [0, 9], "x": 9, "y": 0}, - {"matrix": [0, 10], "x": 10, "y": 0}, - + {"matrix": [0, 10], "x": 10, "y": 0, "encoder": 0}, {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.25}, {"matrix": [1, 1], "x": 1.25, "y": 1}, {"matrix": [1, 2], "x": 2.25, "y": 1}, @@ -89,7 +81,6 @@ {"matrix": [1, 7], "x": 7.25, "y": 1}, {"matrix": [1, 8], "x": 8.25, "y": 1}, {"matrix": [1, 9], "x": 9.25, "y": 1, "w": 1.75}, - {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, {"matrix": [2, 1], "x": 1.75, "y": 2}, {"matrix": [2, 2], "x": 2.75, "y": 2}, @@ -100,11 +91,8 @@ {"matrix": [2, 7], "x": 7.75, "y": 2}, {"matrix": [2, 8], "x": 8.75, "y": 2}, {"matrix": [2, 9], "x": 9.75, "y": 2, "w": 1.25}, - {"matrix": [3, 1], "x": 1.5, "y": 3}, - {"matrix": [3, 3], "x": 2.5, "y": 3, "w": 2.25}, - {"matrix": [3, 4], "x": 4.75, "y": 3}, - {"matrix": [3, 5], "x": 5.75, "y": 3, "w": 2.75}, + {"matrix": [3, 4], "x": 2.5, "y": 3, "w": 6}, {"matrix": [3, 7], "x": 8.5, "y": 3} ] }, @@ -120,8 +108,7 @@ {"matrix": [0, 7], "x": 7, "y": 0}, {"matrix": [0, 8], "x": 8, "y": 0}, {"matrix": [0, 9], "x": 9, "y": 0}, - {"matrix": [0, 10], "x": 10, "y": 0}, - + {"matrix": [0, 10], "x": 10, "y": 0, "encoder": 0}, {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.25}, {"matrix": [1, 1], "x": 1.25, "y": 1}, {"matrix": [1, 2], "x": 2.25, "y": 1}, @@ -132,7 +119,6 @@ {"matrix": [1, 7], "x": 7.25, "y": 1}, {"matrix": [1, 8], "x": 8.25, "y": 1}, {"matrix": [1, 9], "x": 9.25, "y": 1, "w": 1.75}, - {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, {"matrix": [2, 1], "x": 1.75, "y": 2}, {"matrix": [2, 2], "x": 2.75, "y": 2}, @@ -143,14 +129,13 @@ {"matrix": [2, 7], "x": 7.75, "y": 2}, {"matrix": [2, 8], "x": 8.75, "y": 2}, {"matrix": [2, 9], "x": 9.75, "y": 2, "w": 1.25}, - {"matrix": [3, 1], "x": 1.5, "y": 3}, {"matrix": [3, 3], "x": 2.5, "y": 3, "w": 3}, {"matrix": [3, 5], "x": 5.5, "y": 3, "w": 3}, {"matrix": [3, 7], "x": 8.5, "y": 3} ] }, - "LAYOUT_full_space": { + "LAYOUT_split_3space": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0}, {"matrix": [0, 1], "x": 1, "y": 0}, @@ -162,8 +147,7 @@ {"matrix": [0, 7], "x": 7, "y": 0}, {"matrix": [0, 8], "x": 8, "y": 0}, {"matrix": [0, 9], "x": 9, "y": 0}, - {"matrix": [0, 10], "x": 10, "y": 0}, - + {"matrix": [0, 10], "x": 10, "y": 0, "encoder": 0}, {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.25}, {"matrix": [1, 1], "x": 1.25, "y": 1}, {"matrix": [1, 2], "x": 2.25, "y": 1}, @@ -174,7 +158,6 @@ {"matrix": [1, 7], "x": 7.25, "y": 1}, {"matrix": [1, 8], "x": 8.25, "y": 1}, {"matrix": [1, 9], "x": 9.25, "y": 1, "w": 1.75}, - {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, {"matrix": [2, 1], "x": 1.75, "y": 2}, {"matrix": [2, 2], "x": 2.75, "y": 2}, @@ -185,9 +168,51 @@ {"matrix": [2, 7], "x": 7.75, "y": 2}, {"matrix": [2, 8], "x": 8.75, "y": 2}, {"matrix": [2, 9], "x": 9.75, "y": 2, "w": 1.25}, - {"matrix": [3, 1], "x": 1.5, "y": 3}, - {"matrix": [3, 4], "x": 2.5, "y": 3, "w": 6}, + {"matrix": [3, 3], "x": 2.5, "y": 3, "w": 2.25}, + {"matrix": [3, 4], "x": 4.75, "y": 3}, + {"matrix": [3, 5], "x": 5.75, "y": 3, "w": 2.75}, + {"matrix": [3, 7], "x": 8.5, "y": 3} + ] + }, + "LAYOUT_split_4space": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6, "y": 0}, + {"matrix": [0, 7], "x": 7, "y": 0}, + {"matrix": [0, 8], "x": 8, "y": 0}, + {"matrix": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0, "encoder": 0}, + {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.25}, + {"matrix": [1, 1], "x": 1.25, "y": 1}, + {"matrix": [1, 2], "x": 2.25, "y": 1}, + {"matrix": [1, 3], "x": 3.25, "y": 1}, + {"matrix": [1, 4], "x": 4.25, "y": 1}, + {"matrix": [1, 5], "x": 5.25, "y": 1}, + {"matrix": [1, 6], "x": 6.25, "y": 1}, + {"matrix": [1, 7], "x": 7.25, "y": 1}, + {"matrix": [1, 8], "x": 8.25, "y": 1}, + {"matrix": [1, 9], "x": 9.25, "y": 1, "w": 1.75}, + {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [2, 1], "x": 1.75, "y": 2}, + {"matrix": [2, 2], "x": 2.75, "y": 2}, + {"matrix": [2, 3], "x": 3.75, "y": 2}, + {"matrix": [2, 4], "x": 4.75, "y": 2}, + {"matrix": [2, 5], "x": 5.75, "y": 2}, + {"matrix": [2, 6], "x": 6.75, "y": 2}, + {"matrix": [2, 7], "x": 7.75, "y": 2}, + {"matrix": [2, 8], "x": 8.75, "y": 2}, + {"matrix": [2, 9], "x": 9.75, "y": 2, "w": 1.25}, + {"matrix": [3, 1], "x": 1.5, "y": 3}, + {"matrix": [3, 2], "x": 2.5, "y": 3, "w": 1.25}, + {"matrix": [3, 3], "x": 3.75, "y": 3, "w": 1.75}, + {"matrix": [3, 5], "x": 5.5, "y": 3, "w": 1.75}, + {"matrix": [3, 6], "x": 7.25, "y": 3, "w": 1.25}, {"matrix": [3, 7], "x": 8.5, "y": 3} ] } diff --git a/keyboards/projectcain/vault35/keymaps/default/keymap.c b/keyboards/projectcain/vault35/keymaps/default/keymap.c index 5bb3a622b2..ec9f350218 100644 --- a/keyboards/projectcain/vault35/keymaps/default/keymap.c +++ b/keyboards/projectcain/vault35/keymaps/default/keymap.c @@ -1,19 +1,18 @@ - - /* Copyright 2021 projectcain - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +/* Copyright 2021 projectcain + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ #include QMK_KEYBOARD_H enum layers{ @@ -64,3 +63,11 @@ combo_t key_combos[] = { [KL_SLSH] = COMBO(kl_combo, S(KC_SLSH)), [JK_MINUS] = COMBO(jk_combo, KC_MINUS) }; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [BASE] = { ENCODER_CCW_CW(KC_PGUP, KC_PGDN) }, + [NUM] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [SYM] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) } +}; +#endif diff --git a/keyboards/projectcain/vault35/keymaps/default/rules.mk b/keyboards/projectcain/vault35/keymaps/default/rules.mk index ff681299e4..cbd8b4aa81 100644 --- a/keyboards/projectcain/vault35/keymaps/default/rules.mk +++ b/keyboards/projectcain/vault35/keymaps/default/rules.mk @@ -1 +1,2 @@ -COMBO_ENABLE = yes
\ No newline at end of file +COMBO_ENABLE = yes +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/projectcain/vault35/rules.mk b/keyboards/projectcain/vault35/rules.mk index b03b6fa905..3cf3a331d8 100644 --- a/keyboards/projectcain/vault35/rules.mk +++ b/keyboards/projectcain/vault35/rules.mk @@ -1,13 +1 @@ -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Enable N-Key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output -ENCODER_ENABLE = yes +DEFAULT_FOLDER = projectcain/vault35/atmega32u4 diff --git a/layouts/default/ortho_5x13/default_ortho_5x13/keymap.c b/layouts/default/ortho_5x13/default_ortho_5x13/keymap.c new file mode 100644 index 0000000000..11958f3700 --- /dev/null +++ b/layouts/default/ortho_5x13/default_ortho_5x13/keymap.c @@ -0,0 +1,41 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │Bsp│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │Tab│Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │# │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │Ent│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │Sft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ ↑ │ / │ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │Ctl│GUI│LWR│Alt│RSE│ │ │ │Alt│Sft│← │ ↓ │ → │ + * └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ + */ + [0] = LAYOUT_ortho_5x13( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, + KC_NUHS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH, + KC_LCTL, KC_LGUI, TT(1), KC_LALT, TT(2), KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RSFT, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_ortho_5x13( + KC_GRV , KC_MUTE, KC_VOLU, KC_VOLD, KC_MPRV, KC_MPLY, KC_MNXT, G(KC_P), KC_SLEP, KC_WAKE, KC_PSCR, KC_DEL , KC_EQL , + KC_BTN3, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , + KC_BTN2, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , + _______, KC_BTN1, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_U, _______ , + _______, KC_BTN4, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R + ), + [2] = LAYOUT_ortho_5x13( + KC_ESC , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , + _______, _______, _______, _______, QK_RBT, _______, _______, _______, _______, _______, _______, _______, _______ , + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , + _______, _______, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, KC_WH_U, _______ , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_R + ), +}; diff --git a/layouts/default/ortho_5x13/info.json b/layouts/default/ortho_5x13/info.json new file mode 100644 index 0000000000..1bfa00d770 --- /dev/null +++ b/layouts/default/ortho_5x13/info.json @@ -0,0 +1,80 @@ +{ + "keyboard_name": "5x13 ortholinear layout", + "url": "", + "maintainer": "qmk", + "layouts": { + "LAYOUT_ortho_5x13": { + "layout": [ + {"x":0 , "y":0}, + {"x":1 , "y":0}, + {"x":2 , "y":0}, + {"x":3 , "y":0}, + {"x":4 , "y":0}, + {"x":5 , "y":0}, + {"x":6 , "y":0}, + {"x":7 , "y":0}, + {"x":8 , "y":0}, + {"x":9 , "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + + {"x":0 , "y":1}, + {"x":1 , "y":1}, + {"x":2 , "y":1}, + {"x":3 , "y":1}, + {"x":4 , "y":1}, + {"x":5 , "y":1}, + {"x":6 , "y":1}, + {"x":7 , "y":1}, + {"x":8 , "y":1}, + {"x":9 , "y":1}, + {"x":10, "y":1}, + {"x":11, "y":1}, + {"x":12, "y":1}, + + {"x":0 , "y":2}, + {"x":1 , "y":2}, + {"x":2 , "y":2}, + {"x":3 , "y":2}, + {"x":4 , "y":2}, + {"x":5 , "y":2}, + {"x":6 , "y":2}, + {"x":7 , "y":2}, + {"x":8 , "y":2}, + {"x":9 , "y":2}, + {"x":10, "y":2}, + {"x":11, "y":2}, + {"x":12, "y":2}, + + {"x":0 , "y":3}, + {"x":1 , "y":3}, + {"x":2 , "y":3}, + {"x":3 , "y":3}, + {"x":4 , "y":3}, + {"x":5 , "y":3}, + {"x":6 , "y":3}, + {"x":7 , "y":3}, + {"x":8 , "y":3}, + {"x":9 , "y":3}, + {"x":10, "y":3}, + {"x":11, "y":3}, + {"x":12, "y":3}, + + {"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} + ] + } + } +} diff --git a/layouts/default/ortho_5x13/layout.json b/layouts/default/ortho_5x13/layout.json new file mode 100644 index 0000000000..017a9d0fcd --- /dev/null +++ b/layouts/default/ortho_5x13/layout.json @@ -0,0 +1,5 @@ +[{a:7},"","","","","","","","","","","","",""], +["","","","","","","","","","","","",""], +["","","","","","","","","","","","",""], +["","","","","","","","","","","","",""], +["","","","","","","","","","","","",""] diff --git a/layouts/default/ortho_5x13/readme.md b/layouts/default/ortho_5x13/readme.md new file mode 100644 index 0000000000..4ec2f9297a --- /dev/null +++ b/layouts/default/ortho_5x13/readme.md @@ -0,0 +1,3 @@ +# ortho_5x13 + + LAYOUT_ortho_5x13 diff --git a/layouts/default/ortho_5x14/default_ortho_5x14/keymap.c b/layouts/default/ortho_5x14/default_ortho_5x14/keymap.c index 5816e968d1..3827074612 100644 --- a/layouts/default/ortho_5x14/default_ortho_5x14/keymap.c +++ b/layouts/default/ortho_5x14/default_ortho_5x14/keymap.c @@ -8,7 +8,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Bsp│ * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ - * │Esc│Tab│ Q │ W │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ + * │Esc│Tab│ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ * │Del│Cap│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │ * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ @@ -19,7 +19,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [0] = LAYOUT_ortho_5x14( KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, - KC_ESC, KC_TAB, KC_Q, KC_W, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_ESC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_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_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_LEFT, KC_RGHT, KC_LCTL, KC_LGUI, KC_LALT, KC_ENT, KC_ENT, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_DOWN diff --git a/layouts/default/ortho_6x13/default_ortho_6x13/keymap.c b/layouts/default/ortho_6x13/default_ortho_6x13/keymap.c new file mode 100644 index 0000000000..527f87f84b --- /dev/null +++ b/layouts/default/ortho_6x13/default_ortho_6x13/keymap.c @@ -0,0 +1,46 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│ F1│ F2│ F3│ F4│ F5│ F6│ F7│ F8│ F9│F10│Del│Bsp│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │Tab│Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │# │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │Ent│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │Sft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ ↑ │ / │ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │Ctl│GUI│Lwr│Alt│Rse│ │ │ │Alt│Sft│← │ ↓ │ → │ + * └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ + */ + [0] = LAYOUT_ortho_6x13( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, 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_MINS, KC_EQL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, + KC_NUHS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH, + KC_LCTL, KC_LGUI, TT(0), KC_LALT, TT(2), KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RSFT, KC_LEFT, KC_DOWN, KC_RGHT + ) + [1] = LAYOUT_ortho_6x13( + KC_GRV , KC_MUTE, KC_VOLU, KC_VOLD, KC_MPRV, KC_MPLY, KC_MNXT, G(KC_P), KC_SLEP, KC_WAKE, KC_PSCR, _______, _______ , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , + KC_BTN3, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , + KC_BTN2, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , + _______, KC_BTN1, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_U, _______ , + _______, KC_BTN4, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R + ), + [2] = LAYOUT_ortho_6x13( + KC_ESC , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , + _______, _______, _______, _______, QK_RBT, _______, _______, _______, _______, _______, _______, _______, _______ , + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , + _______, _______, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, KC_WH_U, _______ , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_R + ), +}; diff --git a/layouts/default/ortho_6x13/info.json b/layouts/default/ortho_6x13/info.json new file mode 100644 index 0000000000..728bce3b2c --- /dev/null +++ b/layouts/default/ortho_6x13/info.json @@ -0,0 +1,94 @@ +{ + "keyboard_name": "6x13 ortholinear layout", + "url": "", + "maintainer": "qmk", + "layouts": { + "LAYOUT_ortho_6x13": { + "layout": [ + {"x":0 , "y":0}, + {"x":1 , "y":0}, + {"x":2 , "y":0}, + {"x":3 , "y":0}, + {"x":4 , "y":0}, + {"x":5 , "y":0}, + {"x":6 , "y":0}, + {"x":7 , "y":0}, + {"x":8 , "y":0}, + {"x":9 , "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + + {"x":0 , "y":1}, + {"x":1 , "y":1}, + {"x":2 , "y":1}, + {"x":3 , "y":1}, + {"x":4 , "y":1}, + {"x":5 , "y":1}, + {"x":6 , "y":1}, + {"x":7 , "y":1}, + {"x":8 , "y":1}, + {"x":9 , "y":1}, + {"x":10, "y":1}, + {"x":11, "y":1}, + {"x":12, "y":1}, + + {"x":0 , "y":2}, + {"x":1 , "y":2}, + {"x":2 , "y":2}, + {"x":3 , "y":2}, + {"x":4 , "y":2}, + {"x":5 , "y":2}, + {"x":6 , "y":2}, + {"x":7 , "y":2}, + {"x":8 , "y":2}, + {"x":9 , "y":2}, + {"x":10, "y":2}, + {"x":11, "y":2}, + {"x":12, "y":2}, + + {"x":0 , "y":3}, + {"x":1 , "y":3}, + {"x":2 , "y":3}, + {"x":3 , "y":3}, + {"x":4 , "y":3}, + {"x":5 , "y":3}, + {"x":6 , "y":3}, + {"x":7 , "y":3}, + {"x":8 , "y":3}, + {"x":9 , "y":3}, + {"x":10, "y":3}, + {"x":11, "y":3}, + {"x":12, "y":3}, + + {"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":0 , "y":5}, + {"x":1 , "y":5}, + {"x":2 , "y":5}, + {"x":3 , "y":5}, + {"x":4 , "y":5}, + {"x":5 , "y":5}, + {"x":6 , "y":5}, + {"x":7 , "y":5}, + {"x":8 , "y":5}, + {"x":9 , "y":5}, + {"x":10, "y":5}, + {"x":11, "y":5}, + {"x":12, "y":5} + ] + } + } +} diff --git a/layouts/default/ortho_6x13/layout.json b/layouts/default/ortho_6x13/layout.json new file mode 100644 index 0000000000..1e5dab5b89 --- /dev/null +++ b/layouts/default/ortho_6x13/layout.json @@ -0,0 +1,6 @@ +[{a:7},"","","","","","","","","","","","",""], +["","","","","","","","","","","","",""], +["","","","","","","","","","","","",""], +["","","","","","","","","","","","",""], +["","","","","","","","","","","","",""], +["","","","","","","","","","","","",""] diff --git a/layouts/default/ortho_6x13/readme.md b/layouts/default/ortho_6x13/readme.md new file mode 100644 index 0000000000..d4ea33dda9 --- /dev/null +++ b/layouts/default/ortho_6x13/readme.md @@ -0,0 +1,3 @@ +# ortho_6x13 + + LAYOUT_ortho_6x13 diff --git a/layouts/default/readme.md b/layouts/default/readme.md index d5d268ae8b..892dbf1e03 100644 --- a/layouts/default/readme.md +++ b/layouts/default/readme.md @@ -1404,6 +1404,21 @@ LAYOUT_ortho_5x12 ``` ``` +LAYOUT_ortho_5x13 +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ +``` + +``` LAYOUT_ortho_5x14 ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -1466,6 +1481,23 @@ LAYOUT_ortho_6x4 ``` ``` +LAYOUT_ortho_6x13 +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ +``` + +``` LAYOUT_planck_mit ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ │ │ │ │ │ │ │ │ │ │ │ │ │ diff --git a/lib/chibios-contrib b/lib/chibios-contrib -Subproject da78eb3759b8d1779b237657c7667baa4aa95ca +Subproject 9d7a7f904ed135e3459cf6d602db56a26872df6 diff --git a/platforms/chibios/converters/promicro_to_imera/_pin_defs.h b/platforms/chibios/converters/promicro_to_imera/_pin_defs.h new file mode 100644 index 0000000000..475a84d697 --- /dev/null +++ b/platforms/chibios/converters/promicro_to_imera/_pin_defs.h @@ -0,0 +1,36 @@ +// Copyright 2023 splitkb.com +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +// Left side (front) +#define D3 0U +#define D2 1U +// GND +// GND +#define D1 2U +#define D0 3U +#define D4 4U +#define C6 5U +#define D7 6U +#define E6 7U +#define B4 8U +#define B5 9U + +// Right side (front) +// RAW +// GND +// RESET +// VCC +#define F4 29U +#define F5 28U +#define F6 17U +#define F7 16U +#define B1 22U +#define B3 20U +#define B2 23U +#define B6 21U + +// LEDs +#define D5 24U // Power LED, default-on +#define B0 18U // Unconnected diff --git a/platforms/chibios/converters/promicro_to_imera/converter.mk b/platforms/chibios/converters/promicro_to_imera/converter.mk new file mode 100644 index 0000000000..bfca20cd99 --- /dev/null +++ b/platforms/chibios/converters/promicro_to_imera/converter.mk @@ -0,0 +1,10 @@ +# rp2040_ce MCU settings for converting AVR projects +MCU := RP2040 +BOARD := QMK_PM2040 +BOOTLOADER := rp2040 + +# These are defaults based on what has been implemented for RP2040 boards +SERIAL_DRIVER ?= vendor +WS2812_DRIVER ?= vendor +BACKLIGHT_DRIVER ?= software +OPT_DEFS += -DUSB_VBUS_PIN=19U diff --git a/quantum/led_matrix/led_matrix.c b/quantum/led_matrix/led_matrix.c index 4d67a295df..4699c4a4c2 100644 --- a/quantum/led_matrix/led_matrix.c +++ b/quantum/led_matrix/led_matrix.c @@ -74,9 +74,6 @@ static uint8_t led_last_enable = UINT8_MAX; static uint8_t led_last_effect = UINT8_MAX; static effect_params_t led_effect_params = {0, LED_FLAG_ALL, false}; static led_task_states led_task_state = SYNCING; -#if LED_MATRIX_TIMEOUT > 0 -static uint32_t led_anykey_timer; -#endif // LED_MATRIX_TIMEOUT > 0 // double buffers static uint32_t led_timer_buffer; @@ -156,9 +153,6 @@ void process_led_matrix(uint8_t row, uint8_t col, bool pressed) { #ifndef LED_MATRIX_SPLIT if (!is_keyboard_master()) return; #endif -#if LED_MATRIX_TIMEOUT > 0 - led_anykey_timer = 0; -#endif // LED_MATRIX_TIMEOUT > 0 #ifdef LED_MATRIX_KEYREACTIVE_ENABLED uint8_t led[LED_HITS_TO_REMEMBER]; @@ -208,22 +202,11 @@ static bool led_matrix_none(effect_params_t *params) { } static void led_task_timers(void) { -#if defined(LED_MATRIX_KEYREACTIVE_ENABLED) || LED_MATRIX_TIMEOUT > 0 +#if defined(LED_MATRIX_KEYREACTIVE_ENABLED) uint32_t deltaTime = sync_timer_elapsed32(led_timer_buffer); -#endif // defined(LED_MATRIX_KEYREACTIVE_ENABLED) || LED_MATRIX_TIMEOUT > 0 +#endif // defined(LED_MATRIX_KEYREACTIVE_ENABLED) led_timer_buffer = sync_timer_read32(); - // Update double buffer timers -#if LED_MATRIX_TIMEOUT > 0 - if (led_anykey_timer < UINT32_MAX) { - if (UINT32_MAX - deltaTime < led_anykey_timer) { - led_anykey_timer = UINT32_MAX; - } else { - led_anykey_timer += deltaTime; - } - } -#endif // LED_MATRIX_TIMEOUT > 0 - // Update double buffer last hit timers #ifdef LED_MATRIX_KEYREACTIVE_ENABLED uint8_t count = last_hit_buffer.count; @@ -329,7 +312,7 @@ void led_matrix_task(void) { // while suspended and just do a software shutdown. This is a cheap hack for now. bool suspend_backlight = suspend_state || #if LED_MATRIX_TIMEOUT > 0 - (led_anykey_timer > (uint32_t)LED_MATRIX_TIMEOUT) || + (last_input_activity_elapsed() > (uint32_t)LED_MATRIX_TIMEOUT) || #endif // LED_MATRIX_TIMEOUT > 0 false; diff --git a/quantum/rgb_matrix/rgb_matrix.c b/quantum/rgb_matrix/rgb_matrix.c index d93d189827..ebaf3077dc 100644 --- a/quantum/rgb_matrix/rgb_matrix.c +++ b/quantum/rgb_matrix/rgb_matrix.c @@ -76,9 +76,6 @@ static uint8_t rgb_last_enable = UINT8_MAX; static uint8_t rgb_last_effect = UINT8_MAX; static effect_params_t rgb_effect_params = {0, LED_FLAG_ALL, false}; static rgb_task_states rgb_task_state = SYNCING; -#if RGB_MATRIX_TIMEOUT > 0 -static uint32_t rgb_anykey_timer; -#endif // RGB_MATRIX_TIMEOUT > 0 // double buffers static uint32_t rgb_timer_buffer; @@ -163,9 +160,6 @@ void process_rgb_matrix(uint8_t row, uint8_t col, bool pressed) { #ifndef RGB_MATRIX_SPLIT if (!is_keyboard_master()) return; #endif -#if RGB_MATRIX_TIMEOUT > 0 - rgb_anykey_timer = 0; -#endif // RGB_MATRIX_TIMEOUT > 0 #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED uint8_t led[LED_HITS_TO_REMEMBER]; @@ -246,18 +240,11 @@ static bool rgb_matrix_none(effect_params_t *params) { } static void rgb_task_timers(void) { -#if defined(RGB_MATRIX_KEYREACTIVE_ENABLED) || RGB_MATRIX_TIMEOUT > 0 +#if defined(RGB_MATRIX_KEYREACTIVE_ENABLED) uint32_t deltaTime = sync_timer_elapsed32(rgb_timer_buffer); -#endif // defined(RGB_MATRIX_KEYREACTIVE_ENABLED) || RGB_MATRIX_TIMEOUT > 0 +#endif // defined(RGB_MATRIX_KEYREACTIVE_ENABLED) rgb_timer_buffer = sync_timer_read32(); - // Update double buffer timers -#if RGB_MATRIX_TIMEOUT > 0 - if (rgb_anykey_timer + deltaTime <= UINT32_MAX) { - rgb_anykey_timer += deltaTime; - } -#endif // RGB_MATRIX_TIMEOUT > 0 - // Update double buffer last hit timers #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED uint8_t count = last_hit_buffer.count; @@ -370,7 +357,7 @@ void rgb_matrix_task(void) { // while suspended and just do a software shutdown. This is a cheap hack for now. bool suspend_backlight = suspend_state || #if RGB_MATRIX_TIMEOUT > 0 - (rgb_anykey_timer > (uint32_t)RGB_MATRIX_TIMEOUT) || + (last_input_activity_elapsed() > (uint32_t)RGB_MATRIX_TIMEOUT) || #endif // RGB_MATRIX_TIMEOUT > 0 false; @@ -1,3 +1,7 @@ +# 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. + # Quantum Mechanical Keyboard Firmware [![Current Version](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/tags) |