From 2c530be0f4d69eb61e5bab2ff36ebab02cdbb74c Mon Sep 17 00:00:00 2001 From: Johannes Schneider Date: Thu, 4 Aug 2022 00:59:30 +0200 Subject: [PATCH 01/19] YaMseK: current working state sans 'VIAL' and the piromoni trackball... also only the polulu-a-star/atmega32u4 - rp2040 to follow Signed-off-by: Johannes Schneider --- .../handwired/yamsek/atmega32u4/atmega32u4.c | 25 ++ .../handwired/yamsek/atmega32u4/config.h | 7 + .../handwired/yamsek/atmega32u4/rules.mk | 19 ++ keyboards/handwired/yamsek/config.h | 27 ++ .../handwired/yamsek/keymaps/default/keymap.c | 159 ++++++++++ .../yamsek/keymaps/default/readme.md | 1 + keyboards/handwired/yamsek/matrix.c | 292 ++++++++++++++++++ keyboards/handwired/yamsek/readme.md | 18 ++ keyboards/handwired/yamsek/rules.mk | 37 +++ keyboards/handwired/yamsek/yamsek.c | 27 ++ keyboards/handwired/yamsek/yamsek.h | 45 +++ 11 files changed, 657 insertions(+) create mode 100644 keyboards/handwired/yamsek/atmega32u4/atmega32u4.c create mode 100644 keyboards/handwired/yamsek/atmega32u4/config.h create mode 100644 keyboards/handwired/yamsek/atmega32u4/rules.mk create mode 100644 keyboards/handwired/yamsek/config.h create mode 100644 keyboards/handwired/yamsek/keymaps/default/keymap.c create mode 100644 keyboards/handwired/yamsek/keymaps/default/readme.md create mode 100644 keyboards/handwired/yamsek/matrix.c create mode 100644 keyboards/handwired/yamsek/readme.md create mode 100644 keyboards/handwired/yamsek/rules.mk create mode 100644 keyboards/handwired/yamsek/yamsek.c create mode 100644 keyboards/handwired/yamsek/yamsek.h diff --git a/keyboards/handwired/yamsek/atmega32u4/atmega32u4.c b/keyboards/handwired/yamsek/atmega32u4/atmega32u4.c new file mode 100644 index 000000000000..33622020f430 --- /dev/null +++ b/keyboards/handwired/yamsek/atmega32u4/atmega32u4.c @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include + +/** Pololu A-Star 32U4 Micro + micro + ┌───USB───┐ + Column 0 PB5 ─┤9 A0├─ PF7 (future: joystick?) + " 1 PB4 ─┤8 A1├─ PF6 (future: joystick?) + " 2 PE6 ─┤7 10├─ PB6 Row 0 + " 3 PD7 ─┤6 11├─ PB7 Row 1 + " 4 PC6 ─┤5 12├─ PD6 Row 2 + " 5 PD4 ─┤4 ├─ Reset + I2C SCL PD0 ─┤3 ├─ 3V3 + I2C SDA PD1 ─┤2 ├─ 5V + RGB LED PD3 ─┤1 OOO ├─ Gnd + Row 3 PD2 ─┤0 ICSP ├─ Vin + └─────────┘ + + Rows 0-2 are on the top-shell/half + Row 3 is the thumb-cluster +*/ + +const pin_t row_pins_MCU[MATRIX_ROWS / 2] = {B6, B7, D6, D2}; +const pin_t col_pins_MCU[MATRIX_COLS] = {B5, B4, E6, D7, C6, D4}; diff --git a/keyboards/handwired/yamsek/atmega32u4/config.h b/keyboards/handwired/yamsek/atmega32u4/config.h new file mode 100644 index 000000000000..34d7ec17404b --- /dev/null +++ b/keyboards/handwired/yamsek/atmega32u4/config.h @@ -0,0 +1,7 @@ +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 +#define RGB_DI_PIN D3 +#define RGBLED_NUM 1 + +#define DYNAMIC_KEYMAP_LAYER_COUNT 6 diff --git a/keyboards/handwired/yamsek/atmega32u4/rules.mk b/keyboards/handwired/yamsek/atmega32u4/rules.mk new file mode 100644 index 000000000000..858aad82f6a8 --- /dev/null +++ b/keyboards/handwired/yamsek/atmega32u4/rules.mk @@ -0,0 +1,19 @@ +# MCU name +MCU = atmega32u4 +BOOTLOADER = caterina + +RGBLIGHT_ENABLE = yes +RGBLIGHT_DRIVER = WS2812 + +TRACKBALL_ENABLE = no +POINTING_DEVICE_ENABLE = no +POINTING_DEVICE_DRIVER = pimoroni_trackball + +## saving space to squeeze in VIAL support +AUTO_SHIFT_ENABLE = no +COMBO_ENABLE = no +#DEBUG_ENABLE = no +# KEY_OVERRIDE_ENABLE = yes # file +# OLED_DRIVER = SSD1306 # file +# RAW_ENABLE = yes # file +TAP_DANCE_ENABLE = no diff --git a/keyboards/handwired/yamsek/config.h b/keyboards/handwired/yamsek/config.h new file mode 100644 index 000000000000..e803d3f6f3ed --- /dev/null +++ b/keyboards/handwired/yamsek/config.h @@ -0,0 +1,27 @@ +/* Copyright 2022 Johannes Schneider (@JohSchneider) */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER No-oNe +#define PRODUCT YaMseK +//#define DESCRIPTION Yet-another-Modular-split-ergonomic-Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 +/* colum major: + first four rows are on the lefthand side, behind a port expander + next four rows are on the rightnad side, connected to the single MCU running this keyboard +*/ + +// black mark on diode facing columns +#define DIODE_DIRECTION ROW2COL + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 diff --git a/keyboards/handwired/yamsek/keymaps/default/keymap.c b/keyboards/handwired/yamsek/keymaps/default/keymap.c new file mode 100644 index 000000000000..3500476b7ddb --- /dev/null +++ b/keyboards/handwired/yamsek/keymaps/default/keymap.c @@ -0,0 +1,159 @@ +/* Copyright 2022 Johannes Schneider (@JohSchneider) */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include QMK_KEYBOARD_H + +enum layer_names { + BASE, // default layer + NPAD, // numberpad (blender) + ARRO, // arrows and symbols + FUNC, // F[1-10] and number key rows + MOUS, // mouse + GAME, + LEDS +}; + +#define KC_ALDL RALT_T(KC_DEL) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /** + RIGHT + ╔═══════════╦═══════════╦═══════════╗ + ║ Y ║ U ║ I ╠═══════════╗ + ╠═══════════╬═══════════╬═══════════╣ O ╠═══════════╦═══════════╗ + ║ H ║ J ║ K ╠═══════════╣ P ║ [ ║ Top Row + ╠═══════════╬═══════════╬═══════════╣ L ╠═══════════╬═══════════╣ + ║ N ║ M ║ , ╠═══════════╣ ; ║ ' ║ Mid Row + ╚═══════════╩═══════════╩═══════════╣ . ╠═══════════╬═══════════╣ + ╚═══════════╣ / ║ ║ Bot Row + ╚═══════════╩═══════════╝ + ╔═════════╗ + ╔═════════╣3 ║ ╔═════════╗ + ╔═════════╣2 ╠═════════╝ ║4 ║ Thumb Cluster key-order + ║1 ╠═════════╝ ╔═════════╬═════════╣ + ╚═════════╝ ║6 ║5 ║ + ╚═════════╩═════════╝ + + +-----------+-----------+-----------+-----------+-----------+-----------+ + | Y | U | I | O | P | [ | Top Row + +-----------+-----------+-----------+-----------+-----------+-----------+ + | H | J | K | L | ; | ' | Mid Row + +-----------+-----------+-----------+-----------+-----------+-----------+ + | N | M | , | . | / | | Bot Row + +-----------+-----------+-----------+-----------+-----------+-----------+ + + +-----------+-----------+-----------+-----------+-----------+-----------+ + + Layer 1 | Backsp | Delete | Space | Enter | Tab | Thumb Cluster + +-----------+-----------+-----------+-----------+-----------+-----------+ + + | | | | | + | | | | | + + LEFT + ╔═════════╗ + ╔═════════╗ ║4 ╠═════════╗ + ║3 ║ ╚═════════╣5 ╠═════════╗ + ╠═════════╬═════════╗ ╚═════════╣6 ║ Thumb Cluster key-order + ║2 ║1 ║ ╚═════════╝ + ╚═════════╩═════════╝ + + +-----------+-----------+-----------+-----------+-----------+-----------+ + | Layer 4 | Q | W | E | R | T | Top Row + +-----------+-----------+-----------+-----------+-----------+-----------+ + | Layer 3 | A | S | D | F | G | Mid Row + +-----------+-----------+-----------+-----------+-----------+-----------+ + | Layer 2 | Z | S | C | V | B | Bot Row + +-----------+-----------+-----------+-----------+-----------+-----------+ + + +-----------+-----------+-----------+-----------+-----------+-----------+ + + Layer 1 | Backsp | Delete | L Shift | L Ctrl | L Alt | Thumb Cluster + +-----------+-----------+-----------+-----------+-----------+-----------+ + + | | | | | + | | | | |*/ + [BASE] = LAYOUT( // Base + //right + KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_MINUS, + KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_QUOT, + KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_EQUAL, + KC_RSHIFT ,KC_ENT ,KC_SPC ,KC_ALDL ,MO(ARRO) ,MO(FUNC), + //left + KC_ESC ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T, + KC_TAB ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G, + KC_LSHIFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B, + TG(GAME) ,MO(NPAD) ,KC_BSPC ,KC_LALT ,KC_LCTRL ,KC_LSHIFT + ),// | | | | | + [NPAD] = LAYOUT(// numpad (blender) | | | + //right + KC_TRNS ,KC_TRNS ,KC_MPRV ,KC_MPLY ,KC_MNXT ,KC_TRNS, + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, + //left + KC_TRNS ,KC_KP_PLUS ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,KC_KP_SLASH, + KC_TRNS ,KC_KP_MINUS,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,KC_KP_ASTERISK, + KC_TRNS ,KC_KP_0 ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,KC_KP_COMMA, + KC_LOCK ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + ),// | | | | | + [FUNC] = LAYOUT(// function and numbers| | | + //right + KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_TRNS, + 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, + //left + KC_TRNS ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5, + KC_TRNS ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5, + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + ),// | | | | | + [ARRO] = LAYOUT(// arrow and symbols | | | + //right + KC_MPRV ,KC_MPLY ,KC_MNXT ,KC_TRNS ,KC_TRNS ,KC_TRNS, + KC_TRNS ,KC_LEFT ,KC_UP ,KC_RIGHT ,KC_TRNS ,KC_TRNS, + KC_TRNS ,KC_TRNS ,KC_DOWN ,KC_TRNS ,KC_BSLS ,KC_TRNS, + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, + //left + KC_TRNS ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_PIPE, + KC_TRNS ,KC_HASH ,KC_DLR ,KC_LBRC ,KC_RBRC ,KC_GRV, + KC_TRNS ,KC_PERC ,KC_CIRC ,KC_LPRN ,KC_RPRN ,KC_TILD, + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + ),// | | | | | + [MOUS] = LAYOUT(// Mouse | | | | + //right + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, + //left + KC_TRNS ,KC_WH_U ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, + KC_TRNS ,KC_WH_D ,KC_MS_L ,KC_MS_UP ,KC_MS_R ,KC_TRNS, + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_MS_DOWN ,KC_TRNS ,KC_TRNS, + KC_LOCK ,KC_LGUI ,KC_TRNS ,KC_MS_BTN1 ,KC_MS_BTN2 ,KC_BTN3 + ), + [LEDS] = LAYOUT( /* RGBLIGHT */ + //right + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, + //left + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, + KC_TRNS ,RGB_TOG ,RGB_MOD ,RGB_HUI ,RGB_HUD ,KC_TRNS, + KC_TRNS ,RGB_SAI ,RGB_SAD ,RGB_VAI ,RGB_VAD ,KC_TRNS, + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + ), + [GAME] = LAYOUT(// | | | | + // gaming, with shifted WASD block + //right + KC_MPRV ,KC_MPLY ,KC_MNXT ,KC_TRNS ,KC_TRNS ,KC_TRNS, + KC_TRNS ,KC_LEFT ,KC_UP ,KC_RIGHT ,KC_TRNS ,KC_TRNS, + KC_TRNS ,KC_TRNS ,KC_DOWN ,KC_TRNS ,KC_TRNS ,KC_TRNS, + KC_Q ,KC_E ,KC_SPC ,KC_TAB ,KC_TRNS ,KC_TRNS, + //left + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, + KC_TRNS ,KC_TRNS ,KC_A ,KC_W ,KC_D ,KC_TRNS, + KC_TRNS ,KC_TRNS ,KC_Q ,KC_S ,KC_E ,KC_TRNS, + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + ) // | | | | | +}; diff --git a/keyboards/handwired/yamsek/keymaps/default/readme.md b/keyboards/handwired/yamsek/keymaps/default/readme.md new file mode 100644 index 000000000000..3e396fa746d0 --- /dev/null +++ b/keyboards/handwired/yamsek/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for yamsek \ No newline at end of file diff --git a/keyboards/handwired/yamsek/matrix.c b/keyboards/handwired/yamsek/matrix.c new file mode 100644 index 000000000000..d4523a60eece --- /dev/null +++ b/keyboards/handwired/yamsek/matrix.c @@ -0,0 +1,292 @@ +/* Copyright 2022 Johannes Schneider (@JohSchneider) */ +// SPDX-License-Identifier: GPL-2.0-or-later + +/* +ported from old 2017 project code, while adopting some portions of +zvecr's mcp23018 based keyboards/viktus/sp111/matrix.c +*/ + +#include "quantum.h" +#include "debounce.h" +#include "matrix.h" +#include "mcp23018.h" + +#include "yamsek.h" + +#include + +// Optimize scanning code for speed as a slight mitigation for the port expander +#pragma GCC push_options +#pragma GCC optimize("-O3") + +// RP2040 with yamsek MCP23017-breakout +//#define I2C_ADDR 0x32 +// arduino leanardo breadboard +//#define I2C_ADDR 0b0100000 +#define I2C_ADDR 0x20 + + +//#if (MATRIX_ROWS <= 8) +typedef uint8_t matrix_col_t; +//#elif (MATRIX_ROWS <= 16) +//typedef uint16_t matrix_col_t; +//#endif + +/* matrix state(1:on, 0:off) */ +static matrix_col_t matrix[MATRIX_COLS]; +static matrix_col_t raw_matrix[MATRIX_COLS]; +/* matrix is column-major, since the wiring looks like this: + + rows + + R0 ─────│─┬─────│─┬──── ... + │ └o o┐ │ └o o┐ -o o- = switch + ├───|<┘ ├───|<┘ + │ │ -|<- = diode + R1 ─────│─┬─────│─┬──── ... + │ └o o┐ │ └o o┐ + ├───|<┘ ├───|<┘ + │ │ + . . . + . . . + │ │ + C0 C1 ... columns + + hence the code "selects" column pins by pulling them low, + and continues to read all row-pins into a 'matrix_col_t' +*/ + + +/* Column pin configuration + * + * Main-MCU + * col: 0 1 2 3 4 5 + * pin: PB5 PB4 PE6 PD7 PC6 PD4 (atmega32u4) + * + * MCP23017 + * col: 0 1 2 3 4 5 + * pin: A0 A1 A2 A3 A4 A5 + */ +/* Row pin configuration + * + * Main-MCU + * row: 0 1 2 3 + * pin: PB6 PB7 PD6 PD2 (atmega32u4) + * + * MCP23017 + * row: 4 5 6 7 + * pin: B0 B1 B2 B3 + */ + +// Main-MCU side of the keyboard ______________________________________________ + +static void select_col_MCU(uint8_t x) { + setPinOutput(col_pins_MCU[x]); + writePinLow(col_pins_MCU[x]); +} + +static void unselect_col_MCU(uint8_t x) { + setPinInputHigh(col_pins_MCU[x]); +} + +static void init_pins_MCU(void) { + + for (uint8_t x = 0; x < MATRIX_COLS; x++) { + unselect_col_MCU(x); + } + + for (uint8_t x = 0; x < MATRIX_ROWS/2; x++) { + setPinInputHigh(row_pins_MCU[x]); + } +} + +/** + while one column is selected (output, set low -all other set high) + read the whole PortB, to see which pins are pulled low + (remember: internal pullup are ON, so all switches open == read all 1 on PortB) +*/ +static matrix_col_t read_rows_on_col_MCU(uint8_t index) { + matrix_col_t current_value = 0; + + // Select col and wait the value to stabilize + select_col_MCU(index); + wait_us(5); + + for (uint8_t row_index = 0; row_index < MATRIX_ROWS/2; row_index++) { + // Select the col pin to read (active low) + uint8_t pin_state = readPin(row_pins_MCU[row_index]); + + // Populate the matrix row with the state of the col pin + current_value |= pin_state ? 0 : (1 << row_index); + } + + // Unselect row + unselect_col_MCU(index); + + return (current_value & 0x0F); +} + +// IO-Expander ________________________________________________________________ +/** MCP23017 + Note: was at hand, and is command-compatible to mcp23018.{ch} + +Left-Hand wiring: + ┌─────┐ + Row 4 B0 ─┤1 ├─ A7 + " 5 B1 ─┤ ├─ A6 + " 6 B2 ─┤ ├─ A5 Column 5 + " 7 B3 ─┤ ├─ A4 " 4 + B4 ─┤ ├─ A3 " 3 + B5 ─┤ ├─ A2 " 2 + B6 ─┤ ├─ A1 " 1 + B7 ─┤ ├─ A0 " 0 + Vdd ─┤ ├─ + Gnd/Vss ─┤ ├─ + ─┤ ├─!Reset──Vdd + SCL ─┤ ├─Addr2─┐ + SDA ─┤ ├─Addr1─┤ + ─┤ ├─Addr0─┤ + └─────┘ └─Vss/Gnd +*/ + +static uint16_t mcp23018_reset_loop = 0; +static uint8_t mcp23018_errors = 0; + +static void init_pins_MCP23018(void) { + // set pin direction + // - output : 0 + // - input : 1 + // and pull-up + // - no-pullup : 0 + // - enable pullup : 1 + mcp23018_errors += !mcp23018_set_config(I2C_ADDR, mcp23018_PORTA, 0b00000000); + mcp23018_errors += !mcp23018_set_config(I2C_ADDR, mcp23018_PORTB, 0b11111111); + + if (!mcp23018_errors) + dprint("MCP23018 setup OK\n"); +} + +static void select_col_MCP23018(uint8_t x) { + mcp23018_errors += !mcp23018_set_output(I2C_ADDR, mcp23018_PORTA, ~(1< 0x4FF) { + dprint("trying to reset mcp23018\n"); + mcp23018_reset_loop = 0; + mcp23018_errors = 0; + init_pins_MCP23018(); + } + } + + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { + matrix_col_t previous = raw_matrix[current_col]; + raw_matrix[current_col] = 0; + raw_matrix[current_col] |= read_rows_on_col_MCU(current_col); + raw_matrix[current_col] |= read_rows_on_col_MCP23018(current_col); + changed |= previous != raw_matrix[current_col]; + } + + // Unless hardware debouncing - use the configured debounce routine + debounce(raw_matrix, matrix, MATRIX_COLS, changed); + + // This *must* be called for correct keyboard behavior + matrix_scan_quantum(); + + return changed; +} + +__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) {} + + +/* whether a switch is on/pressed */ +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[col] & ((matrix_col_t)1< make handwired/yamsek/atmega32u4:default:avrdude +``` diff --git a/keyboards/handwired/yamsek/rules.mk b/keyboards/handwired/yamsek/rules.mk new file mode 100644 index 000000000000..7d889a1d22ad --- /dev/null +++ b/keyboards/handwired/yamsek/rules.mk @@ -0,0 +1,37 @@ +# +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +#CONSOLE_ENABLE = no # Console for debug(+400) +#COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 + +SPLIT_KEYBOARD = no # port-expander doesn't count as "two controller split" +# OLED_ENABLE = no + + +CC_FLAGS += -Werror + + +# override quantums matrix.c with custom matrix file +# which uses a row-oriented internal data-structure, we use a column oriented +# that was inherited from the I2C/MCP23018 code of the ergodox/ez +CUSTOM_MATRIX = yes +SRC += matrix.c + +RGBLIGHT_ENABLE = no +RGBLIGHT_DRIVER = WS2812 + +VPATH += drivers/gpio +SRC += mcp23018.c i2c_master.c diff --git a/keyboards/handwired/yamsek/yamsek.c b/keyboards/handwired/yamsek/yamsek.c new file mode 100644 index 000000000000..19058f967656 --- /dev/null +++ b/keyboards/handwired/yamsek/yamsek.c @@ -0,0 +1,27 @@ +/* Copyright 2022 Johannes Schneider (@JohSchneider) */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include "yamsek.h" + +void keyboard_post_init_kb(void) { + debug_enable=true; +// debug_mouse=true; +// debug_matrix=true; + +#ifdef RGBLIGHT_ENABLE +// rgblight_sethsv_at(HSV_GREEN,0); +// rgblight_sethsv_at(85, 255,20 ,0); //green + rgblight_sethsv_at(45, 255,20 ,0); //yellow +#endif + +#ifdef TRACKBALL_ENABLE +// pimoroni_trackball_device_init(); //already done in quantum/pointing_device_drivers.c +// pimoroni_trackball_set_rgbw(128,128,0,64); + pimoroni_trackball_set_rgbw(0,64,0,0); +#endif + + if (debug_enable) { + wait_ms(1000); // workaround: usb needs some time to initialize, and qmk console does too to reconnect; without this, early 'print's are lost + dprint("YaMseK: post_init done :-)\n"); + } +} diff --git a/keyboards/handwired/yamsek/yamsek.h b/keyboards/handwired/yamsek/yamsek.h new file mode 100644 index 000000000000..79a089cd2764 --- /dev/null +++ b/keyboards/handwired/yamsek/yamsek.h @@ -0,0 +1,45 @@ +/* Copyright 2022 Johannes Schneider (@JohSchneider) */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +#pragma once + +#include "quantum.h" + +#ifdef RGBLIGHT_ENABLE +# include "rgblight.h" +#endif + +#include +// defined in the used mainboard/MCU +extern const pin_t row_pins_MCU[MATRIX_ROWS / 2]; +extern const pin_t col_pins_MCU[MATRIX_COLS]; + + +// This a shortcut to help you visually see your layout. +// The following is an example using the Planck MIT layout +// The first section contains all of the arguements +// The second converts the arguments into a two-dimensional array +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, \ + k10, k11, k12, k13, k14, k15, \ + k20, k21, k22, k23, k24, k25, \ + \ + k30, k31, k32, k33, k34, k35, \ + \ + \ + k40, k41, k42, k43, k44, k45, \ + k50, k51, k52, k53, k54, k55, \ + k60, k61, k62, k63, k64, k65, \ + \ + k70, k71, k72, k73, k74, k75 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05}, \ + { k10, k11, k12, k13, k14, k15}, \ + { k20, k21, k22, k23, k24, k25}, \ + { k30, k31, k32, k33, k34, k35}, \ + \ + { k40, k41, k42, k43, k44, k45}, \ + { k50, k51, k52, k53, k54, k55}, \ + { k60, k61, k62, k63, k64, k65}, \ + { k70, k71, k72, k73, k74, k75}, \ +} From 6858cb212229cebc6a036f87dd8f75465e226241 Mon Sep 17 00:00:00 2001 From: JohSchneider Date: Sat, 27 Aug 2022 12:16:13 +0000 Subject: [PATCH 02/19] YaMseK: fix keyboard layout aligning the LAYOUT macro with how the keys are layed out physically --- keyboards/handwired/yamsek/yamsek.h | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/keyboards/handwired/yamsek/yamsek.h b/keyboards/handwired/yamsek/yamsek.h index 79a089cd2764..1d03a8c681ab 100644 --- a/keyboards/handwired/yamsek/yamsek.h +++ b/keyboards/handwired/yamsek/yamsek.h @@ -19,18 +19,12 @@ extern const pin_t col_pins_MCU[MATRIX_COLS]; // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array #define LAYOUT( \ - k00, k01, k02, k03, k04, k05, \ - k10, k11, k12, k13, k14, k15, \ - k20, k21, k22, k23, k24, k25, \ + k40, k41, k42, k43, k44, k45, k00, k01, k02, k03, k04, k05, \ + k50, k51, k52, k53, k54, k55, k10, k11, k12, k13, k14, k15, \ + k60, k61, k62, k63, k64, k65, k20, k21, k22, k23, k24, k25, \ \ - k30, k31, k32, k33, k34, k35, \ - \ - \ - k40, k41, k42, k43, k44, k45, \ - k50, k51, k52, k53, k54, k55, \ - k60, k61, k62, k63, k64, k65, \ - \ - k70, k71, k72, k73, k74, k75 \ + k72, k73, k74, k75, k30, k31, k32, k33, \ + k71, k70, k35, k34 \ ) \ { \ { k00, k01, k02, k03, k04, k05}, \ From 683fd6ea026fbe8b111d107560f4b9773b4fd74e Mon Sep 17 00:00:00 2001 From: Johannes Schneider Date: Sat, 27 Aug 2022 14:46:56 +0200 Subject: [PATCH 03/19] YaMseK: cleanup --- keyboards/handwired/yamsek/atmega32u4/config.h | 7 ++----- keyboards/handwired/yamsek/atmega32u4/rules.mk | 7 ++++--- keyboards/handwired/yamsek/config.h | 1 + keyboards/handwired/yamsek/matrix.c | 4 ++++ keyboards/handwired/yamsek/rules.mk | 2 +- keyboards/handwired/yamsek/yamsek.c | 8 ++------ 6 files changed, 14 insertions(+), 15 deletions(-) diff --git a/keyboards/handwired/yamsek/atmega32u4/config.h b/keyboards/handwired/yamsek/atmega32u4/config.h index 34d7ec17404b..d0aeb648f465 100644 --- a/keyboards/handwired/yamsek/atmega32u4/config.h +++ b/keyboards/handwired/yamsek/atmega32u4/config.h @@ -1,7 +1,4 @@ -// #define BACKLIGHT_PIN B7 -// #define BACKLIGHT_BREATHING -// #define BACKLIGHT_LEVELS 3 -#define RGB_DI_PIN D3 -#define RGBLED_NUM 1 +#define RGB_DI_PIN B6 +#define RGBLED_NUM 3 #define DYNAMIC_KEYMAP_LAYER_COUNT 6 diff --git a/keyboards/handwired/yamsek/atmega32u4/rules.mk b/keyboards/handwired/yamsek/atmega32u4/rules.mk index 858aad82f6a8..ea5380c96b7e 100644 --- a/keyboards/handwired/yamsek/atmega32u4/rules.mk +++ b/keyboards/handwired/yamsek/atmega32u4/rules.mk @@ -2,18 +2,19 @@ MCU = atmega32u4 BOOTLOADER = caterina -RGBLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = no RGBLIGHT_DRIVER = WS2812 -TRACKBALL_ENABLE = no POINTING_DEVICE_ENABLE = no POINTING_DEVICE_DRIVER = pimoroni_trackball ## saving space to squeeze in VIAL support +# (by explicitly disabeling features, some of which might be auto-enabled by the build scripts) AUTO_SHIFT_ENABLE = no COMBO_ENABLE = no -#DEBUG_ENABLE = no +DEBUG_ENABLE = no # KEY_OVERRIDE_ENABLE = yes # file # OLED_DRIVER = SSD1306 # file # RAW_ENABLE = yes # file TAP_DANCE_ENABLE = no + diff --git a/keyboards/handwired/yamsek/config.h b/keyboards/handwired/yamsek/config.h index e803d3f6f3ed..ea783646e77a 100644 --- a/keyboards/handwired/yamsek/config.h +++ b/keyboards/handwired/yamsek/config.h @@ -25,3 +25,4 @@ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 + diff --git a/keyboards/handwired/yamsek/matrix.c b/keyboards/handwired/yamsek/matrix.c index d4523a60eece..83569acfa370 100644 --- a/keyboards/handwired/yamsek/matrix.c +++ b/keyboards/handwired/yamsek/matrix.c @@ -55,6 +55,10 @@ static matrix_col_t raw_matrix[MATRIX_COLS]; hence the code "selects" column pins by pulling them low, and continues to read all row-pins into a 'matrix_col_t' */ +#if (DIODE_DIRECTION == COL2ROW) +# pragma error "DIODE_DIRECTION = COL2ROW is not supported (yet)" +// TODO: implement like it is done in keyboards/handwired/dactyl/matrix.c? +#endif /* Column pin configuration diff --git a/keyboards/handwired/yamsek/rules.mk b/keyboards/handwired/yamsek/rules.mk index 7d889a1d22ad..0038098f3c52 100644 --- a/keyboards/handwired/yamsek/rules.mk +++ b/keyboards/handwired/yamsek/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 = no # Console for debug(+400) +CONSOLE_ENABLE = no # Console for debug(+400) #COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/handwired/yamsek/yamsek.c b/keyboards/handwired/yamsek/yamsek.c index 19058f967656..de3678b675ba 100644 --- a/keyboards/handwired/yamsek/yamsek.c +++ b/keyboards/handwired/yamsek/yamsek.c @@ -9,14 +9,10 @@ void keyboard_post_init_kb(void) { // debug_matrix=true; #ifdef RGBLIGHT_ENABLE -// rgblight_sethsv_at(HSV_GREEN,0); -// rgblight_sethsv_at(85, 255,20 ,0); //green - rgblight_sethsv_at(45, 255,20 ,0); //yellow + rgblight_sethsv_at(45, 255,20 ,0); // pale yellow #endif -#ifdef TRACKBALL_ENABLE -// pimoroni_trackball_device_init(); //already done in quantum/pointing_device_drivers.c -// pimoroni_trackball_set_rgbw(128,128,0,64); +#ifdef POINTING_DEVICE_ENABLE pimoroni_trackball_set_rgbw(0,64,0,0); #endif From 0b29136e1caf1a8769c3f6f3a09518611f12693a Mon Sep 17 00:00:00 2001 From: Johannes Schneider Date: Sat, 27 Aug 2022 14:47:31 +0200 Subject: [PATCH 04/19] YaMseK: add rp2040 support --- keyboards/handwired/yamsek/rp2040/config.h | 18 ++++++++++++++++ keyboards/handwired/yamsek/rp2040/rp2040.c | 24 ++++++++++++++++++++++ keyboards/handwired/yamsek/rp2040/rules.mk | 14 +++++++++++++ keyboards/handwired/yamsek/rules.mk | 1 + 4 files changed, 57 insertions(+) create mode 100644 keyboards/handwired/yamsek/rp2040/config.h create mode 100644 keyboards/handwired/yamsek/rp2040/rp2040.c create mode 100644 keyboards/handwired/yamsek/rp2040/rules.mk diff --git a/keyboards/handwired/yamsek/rp2040/config.h b/keyboards/handwired/yamsek/rp2040/config.h new file mode 100644 index 000000000000..ab3eb0bb42b0 --- /dev/null +++ b/keyboards/handwired/yamsek/rp2040/config.h @@ -0,0 +1,18 @@ +#pragma once + +#include "config_common.h" + +#define RGB_DI_PIN GP16 +//PICO_DEFAULT_WS2812_PIN +#define RGBLED_NUM 1 + +#define I2C1_SDA_PIN GP2 +#define I2C1_SCL_PIN GP3 + +#define I2C1_CLOCK_SPEED 100000 + +#define I2C1_SCL_PAL_MODE (PAL_MODE_ALTERNATE_I2C | PAL_RP_PAD_PUE | PAL_RP_PAD_SLEWFAST) +#define I2C1_SDA_PAL_MODE (PAL_MODE_ALTERNATE_I2C | PAL_RP_PAD_PUE | PAL_RP_PAD_SLEWFAST) +// removing 'PAL_RP_PAD_DRIVE4' which the portexpander in the left keyboard half doesn't like +// alternative solution would be to add a 100pF ceramic-capacitor between SCL and GND + diff --git a/keyboards/handwired/yamsek/rp2040/rp2040.c b/keyboards/handwired/yamsek/rp2040/rp2040.c new file mode 100644 index 000000000000..10153f295532 --- /dev/null +++ b/keyboards/handwired/yamsek/rp2040/rp2040.c @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include + +/** Waveshare RP2040-Zero + + ┌─────── USB ──────┐ + ─┤5V 0├─ + trrS ─┤Gnd 1├─ + Trrs ─┤3.3 2├─ I2C1 SDA trRs + Column 6 ─┤29 3├─ I2C1 SCL tRrs + " 5 ─┤28 Boot Reset 4├─ + " 4 ─┤27 ██ ╔╗ ██ 5├─ Row 1 + " 3 ─┤26 ██ ╚╝ ██ 6├─ " 2 + " 2 ─┤15 16 7├─ " 3 + " 1 ─┤14 13 12 11 10 9 8├─ " 4 + └───┬──┬──┬──┬──┬──┘ + + Rows 0-2 are on the top-shell/half + Row 3 is the thumb-cluster +*/ + +const pin_t row_pins_MCU[MATRIX_ROWS / 2] = {5, 6, 7, 8}; +const pin_t col_pins_MCU[MATRIX_COLS] = {14, 15, 26, 27, 28, 29}; diff --git a/keyboards/handwired/yamsek/rp2040/rules.mk b/keyboards/handwired/yamsek/rp2040/rules.mk new file mode 100644 index 000000000000..073108829e1c --- /dev/null +++ b/keyboards/handwired/yamsek/rp2040/rules.mk @@ -0,0 +1,14 @@ +# MCU name +MCU = RP2040 +BOOTLOADER = rp2040 + +CONSOLE_ENABLE = yes # Console for debug(+400) +NKRO_ENABLE = no # USB Nkey Rollover + +RGBLIGHT_ENABLE = yes +RGBLIGHT_DRIVER = WS2812 +WS2812_DRIVER = vendor + +POINTING_DEVICE_ENABLE = yes +POINTING_DEVICE_DRIVER = pimoroni_trackball + diff --git a/keyboards/handwired/yamsek/rules.mk b/keyboards/handwired/yamsek/rules.mk index 0038098f3c52..966ed988556b 100644 --- a/keyboards/handwired/yamsek/rules.mk +++ b/keyboards/handwired/yamsek/rules.mk @@ -35,3 +35,4 @@ RGBLIGHT_DRIVER = WS2812 VPATH += drivers/gpio SRC += mcp23018.c i2c_master.c +OPT_DEFS += -DHAL_USE_I2C=TRUE From 78e385e575757d0b139d214ba4544dd91d6aae5d Mon Sep 17 00:00:00 2001 From: Johannes Schneider Date: Sat, 10 Dec 2022 05:45:53 +0100 Subject: [PATCH 05/19] YaMseK: minor cleanup --- keyboards/handwired/yamsek/matrix.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/keyboards/handwired/yamsek/matrix.c b/keyboards/handwired/yamsek/matrix.c index 83569acfa370..5387aa799d99 100644 --- a/keyboards/handwired/yamsek/matrix.c +++ b/keyboards/handwired/yamsek/matrix.c @@ -212,22 +212,6 @@ void matrix_print(void) { void matrix_init(void) { -// from onakey/i2c_scanner - /* TODO: look for "left half", and possibly bail/remember if/that its not connected - 2017 matrix scan code die dprint - 2022-08-02 17:43:50 You:YaMseK:1: trying to reset mcp23017 - 2022-08-02 17:43:50 You:YaMseK:1: left side not responding - 2022-08-02 17:43:50 You:YaMseK:1: trying to reset mcp23017 - 2022-08-02 17:43:50 You:YaMseK:1: left side not responding - 2022-08-02 17:43:50 You:YaMseK:1: trying to reset mcp23017 - - i2c_status_t error = i2c_start(address << 1, TIMEOUT); - if (error == I2C_STATUS_SUCCESS) { - i2c_stop(); - dprintf(" I2C device found at address 0x%02X\n", address); -*/ - - mcp23018_init(I2C_ADDR); init_pins_MCU(); init_pins_MCP23018(); @@ -237,9 +221,7 @@ void matrix_init(void) { // This *must* be called for correct keyboard behavior matrix_init_quantum(); - dprint("custom matrix_init_done\n"); #ifdef RGBLIGHT_ENABLE -// rgblight_sethsv_at(HSV_GREEN,0); if (mcp23018_errors) { rgblight_sethsv_at(0, 255,20 ,0); // red } else { From 31537bb7f95946b55b8549ea5d189fc3fb2044d9 Mon Sep 17 00:00:00 2001 From: Johannes Schneider Date: Sat, 10 Dec 2022 07:57:45 +0100 Subject: [PATCH 06/19] YaMseK: build fixes --- keyboards/handwired/yamsek/atmega32u4/config.h | 3 +++ keyboards/handwired/yamsek/config.h | 4 ++-- keyboards/handwired/yamsek/keymaps/default/keymap.c | 6 +++--- keyboards/handwired/yamsek/rp2040/config.h | 4 +++- keyboards/handwired/yamsek/rules.mk | 2 ++ 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/keyboards/handwired/yamsek/atmega32u4/config.h b/keyboards/handwired/yamsek/atmega32u4/config.h index d0aeb648f465..beaa8481ad4a 100644 --- a/keyboards/handwired/yamsek/atmega32u4/config.h +++ b/keyboards/handwired/yamsek/atmega32u4/config.h @@ -1,3 +1,6 @@ +// Copyright 2022 Johannes Schneider (@JohSchneider) +// SPDX-License-Identifier: GPL-2.0-or-later + #define RGB_DI_PIN B6 #define RGBLED_NUM 3 diff --git a/keyboards/handwired/yamsek/config.h b/keyboards/handwired/yamsek/config.h index ea783646e77a..398e11d0afd6 100644 --- a/keyboards/handwired/yamsek/config.h +++ b/keyboards/handwired/yamsek/config.h @@ -8,8 +8,8 @@ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x6060 #define DEVICE_VER 0x0001 -#define MANUFACTURER No-oNe -#define PRODUCT YaMseK +#define MANUFACTURER "No-oNe" +#define PRODUCT "YaMseK" //#define DESCRIPTION Yet-another-Modular-split-ergonomic-Keyboard /* key matrix size */ diff --git a/keyboards/handwired/yamsek/keymaps/default/keymap.c b/keyboards/handwired/yamsek/keymaps/default/keymap.c index 3500476b7ddb..7fdab467cb8b 100644 --- a/keyboards/handwired/yamsek/keymaps/default/keymap.c +++ b/keyboards/handwired/yamsek/keymaps/default/keymap.c @@ -76,12 +76,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_MINUS, KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_QUOT, KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_EQUAL, - KC_RSHIFT ,KC_ENT ,KC_SPC ,KC_ALDL ,MO(ARRO) ,MO(FUNC), + KC_RSFT ,KC_ENT ,KC_SPC ,KC_ALDL ,MO(ARRO) ,MO(FUNC), //left KC_ESC ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T, KC_TAB ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G, - KC_LSHIFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B, - TG(GAME) ,MO(NPAD) ,KC_BSPC ,KC_LALT ,KC_LCTRL ,KC_LSHIFT + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B, + TG(GAME) ,MO(NPAD) ,KC_BSPC ,KC_LALT ,KC_LCTL ,KC_LSFT ),// | | | | | [NPAD] = LAYOUT(// numpad (blender) | | | //right diff --git a/keyboards/handwired/yamsek/rp2040/config.h b/keyboards/handwired/yamsek/rp2040/config.h index ab3eb0bb42b0..9d993f128733 100644 --- a/keyboards/handwired/yamsek/rp2040/config.h +++ b/keyboards/handwired/yamsek/rp2040/config.h @@ -1,3 +1,6 @@ +// Copyright 2022 Johannes Schneider (@JohSchneider) +// SPDX-License-Identifier: GPL-2.0-or-later + #pragma once #include "config_common.h" @@ -15,4 +18,3 @@ #define I2C1_SDA_PAL_MODE (PAL_MODE_ALTERNATE_I2C | PAL_RP_PAD_PUE | PAL_RP_PAD_SLEWFAST) // removing 'PAL_RP_PAD_DRIVE4' which the portexpander in the left keyboard half doesn't like // alternative solution would be to add a 100pF ceramic-capacitor between SCL and GND - diff --git a/keyboards/handwired/yamsek/rules.mk b/keyboards/handwired/yamsek/rules.mk index 966ed988556b..5b3dc478aa0e 100644 --- a/keyboards/handwired/yamsek/rules.mk +++ b/keyboards/handwired/yamsek/rules.mk @@ -36,3 +36,5 @@ RGBLIGHT_DRIVER = WS2812 VPATH += drivers/gpio SRC += mcp23018.c i2c_master.c OPT_DEFS += -DHAL_USE_I2C=TRUE + +DEFAULT_FOLDER = yamsek/atmega32u4 From bd8da89423d1447f1d23defe2ce52d98b38247b7 Mon Sep 17 00:00:00 2001 From: JohSchneider Date: Sun, 8 Jan 2023 18:13:18 +0000 Subject: [PATCH 07/19] update feature switches with upstream defaults in mind, some can be dropped Co-authored-by: Drashna Jaelre --- keyboards/handwired/yamsek/rules.mk | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/keyboards/handwired/yamsek/rules.mk b/keyboards/handwired/yamsek/rules.mk index 5b3dc478aa0e..e2eeb76a10e0 100644 --- a/keyboards/handwired/yamsek/rules.mk +++ b/keyboards/handwired/yamsek/rules.mk @@ -2,24 +2,14 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -#COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 - -SPLIT_KEYBOARD = no # port-expander doesn't count as "two controller split" -# OLED_ENABLE = no - +BOOTMAGIC_ENABLE = no # 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 = yes # Enable N-key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no # Audio output CC_FLAGS += -Werror From 0231015dce5b0b92d1abfb610780a98c382b92f8 Mon Sep 17 00:00:00 2001 From: JohSchneider Date: Sun, 8 Jan 2023 18:14:01 +0000 Subject: [PATCH 08/19] remove unnecessary if-defed include Co-authored-by: Drashna Jaelre --- keyboards/handwired/yamsek/yamsek.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/keyboards/handwired/yamsek/yamsek.h b/keyboards/handwired/yamsek/yamsek.h index 1d03a8c681ab..4fec43a24244 100644 --- a/keyboards/handwired/yamsek/yamsek.h +++ b/keyboards/handwired/yamsek/yamsek.h @@ -4,9 +4,6 @@ #include "quantum.h" -#ifdef RGBLIGHT_ENABLE -# include "rgblight.h" -#endif #include // defined in the used mainboard/MCU From b53e20d9f362214de621c3b6b15453aa62a8ba69 Mon Sep 17 00:00:00 2001 From: Johannes Schneider Date: Sat, 14 Jan 2023 05:33:56 +0100 Subject: [PATCH 09/19] YaMseK: realign keymap.c with yamsek.h --- .../handwired/yamsek/keymaps/default/keymap.c | 194 ++++++------------ keyboards/handwired/yamsek/yamsek.h | 4 +- 2 files changed, 70 insertions(+), 128 deletions(-) diff --git a/keyboards/handwired/yamsek/keymaps/default/keymap.c b/keyboards/handwired/yamsek/keymaps/default/keymap.c index 7fdab467cb8b..d4d8d6d1a8a4 100644 --- a/keyboards/handwired/yamsek/keymaps/default/keymap.c +++ b/keyboards/handwired/yamsek/keymaps/default/keymap.c @@ -17,143 +17,85 @@ enum layer_names { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /** - RIGHT - ╔═══════════╦═══════════╦═══════════╗ - ║ Y ║ U ║ I ╠═══════════╗ - ╠═══════════╬═══════════╬═══════════╣ O ╠═══════════╦═══════════╗ - ║ H ║ J ║ K ╠═══════════╣ P ║ [ ║ Top Row - ╠═══════════╬═══════════╬═══════════╣ L ╠═══════════╬═══════════╣ - ║ N ║ M ║ , ╠═══════════╣ ; ║ ' ║ Mid Row - ╚═══════════╩═══════════╩═══════════╣ . ╠═══════════╬═══════════╣ - ╚═══════════╣ / ║ ║ Bot Row - ╚═══════════╩═══════════╝ - ╔═════════╗ - ╔═════════╣3 ║ ╔═════════╗ - ╔═════════╣2 ╠═════════╝ ║4 ║ Thumb Cluster key-order - ║1 ╠═════════╝ ╔═════════╬═════════╣ - ╚═════════╝ ║6 ║5 ║ - ╚═════════╩═════════╝ + LEFT ╔═══════════╦══════════╦═══════════╗ ╔═══════════╦═══════════╦═══════════╗ RIGHT + ╔═══════════╣ E ║ R ║ T ║ Top Row ║ Y ║ U ║ I ╠═══════════╗ + ╔═══════════╦═══════════╣ W ╠═══════════╬══════════╬═══════════╣ ╠═══════════╬═══════════╬═══════════╣ O ╠═══════════╦═══════════╗ + ║ ║ Q ╠═══════════╣ D ║ F ║ G ║ Mid Row ║ H ║ J ║ K ╠═══════════╣ P ║ [ ║ + ╠═══════════╬═══════════╣ S ╠═══════════╬══════════╬═══════════╣ ╠═══════════╬═══════════╬═══════════╣ L ╠═══════════╬═══════════╣ + ║ ║ A ╠═══════════╣ C ║ V ║ B ║ Bot Row ║ N ║ M ║ , ╠═══════════╣ ; ║ ' ║ + ╠═══════════╬═══════════╣ X ╠═══════════╩══════════╩═══════════╝ ╚═══════════╩═══════════╩═══════════╣ . ╠═══════════╬═══════════╣ + ║ ║ Z ╠═══════════╝ ╚═══════════╣ / ║ ║ + ╚═══════════╩═══════════╝ ╚═══════════╩═══════════╝ + ╔═════════╗ ╔═════════╗ + ╔═════════╗ ║4 ╠═════════╗ ╔═════════╣3 ║ ╔═════════╗ + ║3 ║ ╚═════════╣5 ╠═════════╗ ╔═════════╣2 ╠═════════╝ ║4 ║ Thumb Cluster key-order + ╠═════════╬═════════╗ ╚═════════╣6 ║ ║1 ╠═════════╝ ╔═════════╬═════════╣ + ║2 ║1 ║ ╚═════════╝ ╚═════════╝ ║6 ║5 ║ + ╚═════════╩═════════╝ ╚═════════╩═════════╝ - +-----------+-----------+-----------+-----------+-----------+-----------+ - | Y | U | I | O | P | [ | Top Row - +-----------+-----------+-----------+-----------+-----------+-----------+ - | H | J | K | L | ; | ' | Mid Row - +-----------+-----------+-----------+-----------+-----------+-----------+ - | N | M | , | . | / | | Bot Row - +-----------+-----------+-----------+-----------+-----------+-----------+ + 0 1 2 3 4 5 0 1 2 3 4 5 + +-----------+-----------+-----------+-----------+-----------+-----------+ +-----------+-----------+-----------+-----------+-----------+-----------+ + | Layer 4 | Q | W | E | R | T |4 Top Row 0| Y | U | I | O | P | [ | + +-----------+-----------+-----------+-----------+-----------+-----------+ +-----------+-----------+-----------+-----------+-----------+-----------+ + | Layer 3 | A | S | D | F | G |5 Mid Row 1| H | J | K | L | ; | ' | + +-----------+-----------+-----------+-----------+-----------+-----------+ +-----------+-----------+-----------+-----------+-----------+-----------+ + | Layer 2 | Z | X | C | V | B |6 Bot Row 2| N | M | , | . | / | | + +-----------+-----------+-----------+-----------+-----------+-----------+ +-----------+-----------+-----------+-----------+-----------+-----------+ - +-----------+-----------+-----------+-----------+-----------+-----------+ - + Layer 1 | Backsp | Delete | Space | Enter | Tab | Thumb Cluster - +-----------+-----------+-----------+-----------+-----------+-----------+ - - | | | | | - | | | | | - - LEFT - ╔═════════╗ - ╔═════════╗ ║4 ╠═════════╗ - ║3 ║ ╚═════════╣5 ╠═════════╗ - ╠═════════╬═════════╗ ╚═════════╣6 ║ Thumb Cluster key-order - ║2 ║1 ║ ╚═════════╝ - ╚═════════╩═════════╝ - - +-----------+-----------+-----------+-----------+-----------+-----------+ - | Layer 4 | Q | W | E | R | T | Top Row - +-----------+-----------+-----------+-----------+-----------+-----------+ - | Layer 3 | A | S | D | F | G | Mid Row - +-----------+-----------+-----------+-----------+-----------+-----------+ - | Layer 2 | Z | S | C | V | B | Bot Row - +-----------+-----------+-----------+-----------+-----------+-----------+ - - +-----------+-----------+-----------+-----------+-----------+-----------+ - + Layer 1 | Backsp | Delete | L Shift | L Ctrl | L Alt | Thumb Cluster - +-----------+-----------+-----------+-----------+-----------+-----------+ - - | | | | | - | | | | |*/ + +-----------+-----------+-----------+-----------+-----------+-----------+ +-----------+-----------+-----------+-----------+-----------+-----------+ + + Layer 1 | Backsp | Delete | L Shift | L Ctrl | L Alt |7 Thumb Clstr 3+ Layer 1 | Backsp | Delete | Space | Enter | Tab | + +-----------+-----------+-----------+-----------+-----------+-----------+ +-----------+-----------+-----------+-----------+-----------+-----------+ + | | | | | | | | | | + | | | | | | | | | | + */ [BASE] = LAYOUT( // Base - //right - KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_MINUS, - KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_QUOT, - KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_EQUAL, - KC_RSFT ,KC_ENT ,KC_SPC ,KC_ALDL ,MO(ARRO) ,MO(FUNC), - //left - KC_ESC ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T, - KC_TAB ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G, - KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B, - TG(GAME) ,MO(NPAD) ,KC_BSPC ,KC_LALT ,KC_LCTL ,KC_LSFT - ),// | | | | | - [NPAD] = LAYOUT(// numpad (blender) | | | - //right - KC_TRNS ,KC_TRNS ,KC_MPRV ,KC_MPLY ,KC_MNXT ,KC_TRNS, - KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, - KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, - KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, - //left - KC_TRNS ,KC_KP_PLUS ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,KC_KP_SLASH, - KC_TRNS ,KC_KP_MINUS,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,KC_KP_ASTERISK, - KC_TRNS ,KC_KP_0 ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,KC_KP_COMMA, - KC_LOCK ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS - ),// | | | | | - [FUNC] = LAYOUT(// function and numbers| | | - //right - KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_TRNS, - 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, - //left - KC_TRNS ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5, - KC_TRNS ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5, - KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, - KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + //left //right + KC_ESC ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T, KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_MINUS, + 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_EQUAL, + TG(GAME) ,MO(NPAD) ,KC_BSPC ,KC_LALT ,KC_LCTL ,KC_LSFT, KC_RSFT ,KC_ENT ,KC_SPC ,KC_ALDL ,MO(ARRO) ,MO(FUNC) + ), + [NPAD] = LAYOUT(// numpad (blender) + //left //right + KC_TRNS ,KC_KP_PLUS ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,KC_KP_SLASH, KC_TRNS ,KC_TRNS ,KC_MPRV ,KC_MPLY ,KC_MNXT ,KC_TRNS, + KC_TRNS ,KC_KP_MINUS,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,KC_KP_ASTERISK, KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, + KC_TRNS ,KC_KP_0 ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,KC_KP_COMMA, KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, + KC_LOCK ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + ), + [FUNC] = LAYOUT(// function and numbers + //left //right + KC_TRNS ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5, KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_TRNS, + KC_TRNS ,KC_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 ),// | | | | | [ARRO] = LAYOUT(// arrow and symbols | | | - //right - KC_MPRV ,KC_MPLY ,KC_MNXT ,KC_TRNS ,KC_TRNS ,KC_TRNS, - KC_TRNS ,KC_LEFT ,KC_UP ,KC_RIGHT ,KC_TRNS ,KC_TRNS, - KC_TRNS ,KC_TRNS ,KC_DOWN ,KC_TRNS ,KC_BSLS ,KC_TRNS, - KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, - //left - KC_TRNS ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_PIPE, - KC_TRNS ,KC_HASH ,KC_DLR ,KC_LBRC ,KC_RBRC ,KC_GRV, - KC_TRNS ,KC_PERC ,KC_CIRC ,KC_LPRN ,KC_RPRN ,KC_TILD, - KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + //left //right + KC_TRNS ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_PIPE, KC_MPRV ,KC_MPLY ,KC_MNXT ,KC_TRNS ,KC_TRNS ,KC_TRNS, + KC_TRNS ,KC_HASH ,KC_DLR ,KC_LBRC ,KC_RBRC ,KC_GRV, KC_TRNS ,KC_LEFT ,KC_UP ,KC_RIGHT ,KC_TRNS ,KC_TRNS, + KC_TRNS ,KC_PERC ,KC_CIRC ,KC_LPRN ,KC_RPRN ,KC_TILD, KC_TRNS ,KC_TRNS ,KC_DOWN ,KC_TRNS ,KC_BSLS ,KC_TRNS, + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ),// | | | | | [MOUS] = LAYOUT(// Mouse | | | | - //right - KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, - KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, - KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, - KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, - //left - KC_TRNS ,KC_WH_U ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, - KC_TRNS ,KC_WH_D ,KC_MS_L ,KC_MS_UP ,KC_MS_R ,KC_TRNS, - KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_MS_DOWN ,KC_TRNS ,KC_TRNS, - KC_LOCK ,KC_LGUI ,KC_TRNS ,KC_MS_BTN1 ,KC_MS_BTN2 ,KC_BTN3 + //left //right + KC_TRNS ,KC_WH_U ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, + KC_TRNS ,KC_WH_D ,KC_MS_L ,KC_MS_UP ,KC_MS_R ,KC_TRNS, KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_MS_DOWN ,KC_TRNS ,KC_TRNS, KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, + KC_LOCK ,KC_LGUI ,KC_TRNS ,KC_MS_BTN1 ,KC_MS_BTN2 ,KC_BTN3, KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ), [LEDS] = LAYOUT( /* RGBLIGHT */ - //right - KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, - KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, - KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, - KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, - //left - KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, - KC_TRNS ,RGB_TOG ,RGB_MOD ,RGB_HUI ,RGB_HUD ,KC_TRNS, - KC_TRNS ,RGB_SAI ,RGB_SAD ,RGB_VAI ,RGB_VAD ,KC_TRNS, - KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + //left //right + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, + KC_TRNS ,RGB_TOG ,RGB_MOD ,RGB_HUI ,RGB_HUD ,KC_TRNS, KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, + KC_TRNS ,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 ), [GAME] = LAYOUT(// | | | | // gaming, with shifted WASD block - //right - KC_MPRV ,KC_MPLY ,KC_MNXT ,KC_TRNS ,KC_TRNS ,KC_TRNS, - KC_TRNS ,KC_LEFT ,KC_UP ,KC_RIGHT ,KC_TRNS ,KC_TRNS, - KC_TRNS ,KC_TRNS ,KC_DOWN ,KC_TRNS ,KC_TRNS ,KC_TRNS, - KC_Q ,KC_E ,KC_SPC ,KC_TAB ,KC_TRNS ,KC_TRNS, - //left - KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, - KC_TRNS ,KC_TRNS ,KC_A ,KC_W ,KC_D ,KC_TRNS, - KC_TRNS ,KC_TRNS ,KC_Q ,KC_S ,KC_E ,KC_TRNS, - KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + //left //right + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, KC_MPRV ,KC_MPLY ,KC_MNXT ,KC_TRNS ,KC_TRNS ,KC_TRNS, + KC_TRNS ,KC_TRNS ,KC_A ,KC_W ,KC_D ,KC_TRNS, KC_TRNS ,KC_LEFT ,KC_UP ,KC_RIGHT ,KC_TRNS ,KC_TRNS, + KC_TRNS ,KC_TRNS ,KC_Q ,KC_S ,KC_E ,KC_TRNS, KC_TRNS ,KC_TRNS ,KC_DOWN ,KC_TRNS ,KC_TRNS ,KC_TRNS, + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, KC_Q ,KC_E ,KC_SPC ,KC_TAB ,KC_TRNS ,KC_TRNS ) // | | | | | }; diff --git a/keyboards/handwired/yamsek/yamsek.h b/keyboards/handwired/yamsek/yamsek.h index 4fec43a24244..5ae5d16ba6d4 100644 --- a/keyboards/handwired/yamsek/yamsek.h +++ b/keyboards/handwired/yamsek/yamsek.h @@ -20,8 +20,8 @@ extern const pin_t col_pins_MCU[MATRIX_COLS]; k50, k51, k52, k53, k54, k55, k10, k11, k12, k13, k14, k15, \ k60, k61, k62, k63, k64, k65, k20, k21, k22, k23, k24, k25, \ \ - k72, k73, k74, k75, k30, k31, k32, k33, \ - k71, k70, k35, k34 \ + k72, k73, k74, k75, k30, k31, k32, k33, \ + k71, k70, k35, k34 \ ) \ { \ { k00, k01, k02, k03, k04, k05}, \ From 31bae58bba87a18f4d107c279277701d74e5f083 Mon Sep 17 00:00:00 2001 From: Johannes Schneider Date: Sat, 11 Feb 2023 16:09:27 +0100 Subject: [PATCH 10/19] yamsek: config cleanup --- keyboards/handwired/yamsek/atmega32u4/config.h | 1 + keyboards/handwired/yamsek/keymaps/default/readme.md | 1 - keyboards/handwired/yamsek/rp2040/config.h | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 keyboards/handwired/yamsek/keymaps/default/readme.md diff --git a/keyboards/handwired/yamsek/atmega32u4/config.h b/keyboards/handwired/yamsek/atmega32u4/config.h index beaa8481ad4a..555a3bfaf060 100644 --- a/keyboards/handwired/yamsek/atmega32u4/config.h +++ b/keyboards/handwired/yamsek/atmega32u4/config.h @@ -1,5 +1,6 @@ // Copyright 2022 Johannes Schneider (@JohSchneider) // SPDX-License-Identifier: GPL-2.0-or-later +#pragma once #define RGB_DI_PIN B6 #define RGBLED_NUM 3 diff --git a/keyboards/handwired/yamsek/keymaps/default/readme.md b/keyboards/handwired/yamsek/keymaps/default/readme.md deleted file mode 100644 index 3e396fa746d0..000000000000 --- a/keyboards/handwired/yamsek/keymaps/default/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The default keymap for yamsek \ No newline at end of file diff --git a/keyboards/handwired/yamsek/rp2040/config.h b/keyboards/handwired/yamsek/rp2040/config.h index 9d993f128733..24155cfad577 100644 --- a/keyboards/handwired/yamsek/rp2040/config.h +++ b/keyboards/handwired/yamsek/rp2040/config.h @@ -1,6 +1,5 @@ // Copyright 2022 Johannes Schneider (@JohSchneider) // SPDX-License-Identifier: GPL-2.0-or-later - #pragma once #include "config_common.h" From 5f77f33ee9b6d6caaeed11fe379ecb9a3ae9015d Mon Sep 17 00:00:00 2001 From: Johannes Schneider Date: Sat, 11 Feb 2023 16:58:12 +0100 Subject: [PATCH 11/19] yamsek: convert to info.json --- .../handwired/yamsek/atmega32u4/info.json | 4 + .../handwired/yamsek/atmega32u4/rules.mk | 21 +- keyboards/handwired/yamsek/config.h | 13 +- keyboards/handwired/yamsek/info.json | 73 +++++ .../handwired/yamsek/keyboard-layout.json | 266 ++++++++++++++++++ keyboards/handwired/yamsek/rp2040/info.json | 4 + keyboards/handwired/yamsek/rp2040/rules.mk | 15 +- 7 files changed, 351 insertions(+), 45 deletions(-) create mode 100644 keyboards/handwired/yamsek/atmega32u4/info.json create mode 100644 keyboards/handwired/yamsek/info.json create mode 100644 keyboards/handwired/yamsek/keyboard-layout.json create mode 100644 keyboards/handwired/yamsek/rp2040/info.json diff --git a/keyboards/handwired/yamsek/atmega32u4/info.json b/keyboards/handwired/yamsek/atmega32u4/info.json new file mode 100644 index 000000000000..4369a0410385 --- /dev/null +++ b/keyboards/handwired/yamsek/atmega32u4/info.json @@ -0,0 +1,4 @@ +{ + "processor": "atmega32u4", + "bootloader": "caterina" +} diff --git a/keyboards/handwired/yamsek/atmega32u4/rules.mk b/keyboards/handwired/yamsek/atmega32u4/rules.mk index ea5380c96b7e..6e7633bfe015 100644 --- a/keyboards/handwired/yamsek/atmega32u4/rules.mk +++ b/keyboards/handwired/yamsek/atmega32u4/rules.mk @@ -1,20 +1 @@ -# MCU name -MCU = atmega32u4 -BOOTLOADER = caterina - -RGBLIGHT_ENABLE = no -RGBLIGHT_DRIVER = WS2812 - -POINTING_DEVICE_ENABLE = no -POINTING_DEVICE_DRIVER = pimoroni_trackball - -## saving space to squeeze in VIAL support -# (by explicitly disabeling features, some of which might be auto-enabled by the build scripts) -AUTO_SHIFT_ENABLE = no -COMBO_ENABLE = no -DEBUG_ENABLE = no -# KEY_OVERRIDE_ENABLE = yes # file -# OLED_DRIVER = SSD1306 # file -# RAW_ENABLE = yes # file -TAP_DANCE_ENABLE = no - +# This file intentionally left blank diff --git a/keyboards/handwired/yamsek/config.h b/keyboards/handwired/yamsek/config.h index 398e11d0afd6..5c498e7ef538 100644 --- a/keyboards/handwired/yamsek/config.h +++ b/keyboards/handwired/yamsek/config.h @@ -1,17 +1,8 @@ -/* Copyright 2022 Johannes Schneider (@JohSchneider) */ +/* Copyright 2023 Johannes Schneider (@JohSchneider) */ /* SPDX-License-Identifier: GPL-2.0-or-later */ #pragma once - #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER "No-oNe" -#define PRODUCT "YaMseK" -//#define DESCRIPTION Yet-another-Modular-split-ergonomic-Keyboard - /* key matrix size */ #define MATRIX_ROWS 8 #define MATRIX_COLS 6 @@ -23,6 +14,6 @@ // black mark on diode facing columns #define DIODE_DIRECTION ROW2COL + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 - diff --git a/keyboards/handwired/yamsek/info.json b/keyboards/handwired/yamsek/info.json new file mode 100644 index 000000000000..f8eade6a5e97 --- /dev/null +++ b/keyboards/handwired/yamsek/info.json @@ -0,0 +1,73 @@ +{ + "manufacturer": "Johannes Schneider", + "keyboard_name": "YaMseK", + "maintainer": "Johannes Schneider", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "url": "https://hackaday.io/project/21164-yamsek", + "usb": { + "device_version": "1.0.0", + "pid": "0x6060", + "vid": "0xFEED" + }, + "layouts": { + "LAYOUT_yamsek": { + "layout": [ + {"matrix":[0,0], "label":"Y", "x":13, "y":1.25}, + {"matrix":[0,1], "label":"U", "x":14, "y":1.125}, + {"matrix":[0,2], "label":"I", "x":15, "y":1}, + {"matrix":[0,3], "label":"O", "x":16, "y":1.125}, + {"matrix":[0,4], "label":"P", "x":17, "y":1.375}, + {"matrix":[0,5], "label":"-", "x":18, "y":1.75}, + {"matrix":[1,0], "label":"H", "x":13, "y":2.25}, + {"matrix":[1,1], "label":"J", "x":14, "y":2.125}, + {"matrix":[1,2], "label":"K", "x":15, "y":2}, + {"matrix":[1,3], "label":"L", "x":16, "y":2.125}, + {"matrix":[1,4], "label":":", "x":17, "y":2.375}, + {"matrix":[1,5], "label":"'", "x":18, "y":2.75}, + {"matrix":[2,0], "label":"N", "x":13, "y":3.25}, + {"matrix":[2,1], "label":"M", "x":14, "y":3.125}, + {"matrix":[2,2], "label":"<", "x":15, "y":3}, + {"matrix":[2,3], "label":">", "x":16, "y":3.125}, + {"matrix":[2,4], "label":"?", "x":17, "y":3.375}, + {"matrix":[2,5], "label":"=", "x":18, "y":3.75}, + {"matrix":[3,0], "label":"Shift", "x":-3.5, "y":3.85}, + {"matrix":[3,1], "label":"Enter", "x":-2.5, "y":4.3}, + {"matrix":[3,2], "label":"Spac", "x":-1.45, "y":4.55}, + {"matrix":[3,3], "label":"Del", "x":-0.25, "y":5.3}, + {"matrix":[3,4], "label":"Mo(Arr)", "x":-0.25, "y":6.3}, + {"matrix":[3,5], "label":"Mo(Fun)", "x":-1.25, "y":6.3}, + {"matrix":[4,0], "label":"Esc", "x":0, "y":1.75}, + {"matrix":[4,1], "label":"Q", "x":1, "y":1.375}, + {"matrix":[4,2], "label":"W", "x":2, "y":1.125}, + {"matrix":[4,3], "label":"E", "x":3, "y":1}, + {"matrix":[4,4], "label":"R", "x":4, "y":1.125}, + {"matrix":[4,5], "label":"T", "x":5, "y":1.25}, + {"matrix":[5,0], "label":"Tab", "x":0, "y":2.75}, + {"matrix":[5,1], "label":"A", "x":1, "y":2.375}, + {"matrix":[5,2], "label":"S", "x":2, "y":2.125}, + {"matrix":[5,3], "label":"D", "x":3, "y":2}, + {"matrix":[5,4], "label":"F", "x":4, "y":2.125}, + {"matrix":[5,5], "label":"G", "x":5, "y":2.25}, + {"matrix":[6,0], "label":"LShift", "x":0, "y":3.75}, + {"matrix":[6,1], "label":"Z", "x":1, "y":3.375}, + {"matrix":[6,2], "label":"X", "x":2, "y":3.125}, + {"matrix":[6,3], "label":"C", "x":3, "y":3}, + {"matrix":[6,4], "label":"V", "x":4, "y":3.125}, + {"matrix":[6,5], "label":"B", "x":5, "y":3.25}, + {"matrix":[7,0], "label":"TG(Game)", "x":0, "y":6.25}, + {"matrix":[7,1], "label":"Mo(NPad)", "x":-1.0, "y":6.25}, + {"matrix":[7,2], "label":"Backs", "x":-1.0, "y":5.25}, + {"matrix":[7,3], "label":"Alt", "x":0.2, "y":4.5}, + {"matrix":[7,4], "label":"Ctrl", "x":1.25, "y":4.25}, + {"matrix":[7,5], "label":"Shift", "x":2.25, "y":3.8} + ] + } + } +} diff --git a/keyboards/handwired/yamsek/keyboard-layout.json b/keyboards/handwired/yamsek/keyboard-layout.json new file mode 100644 index 000000000000..7c4c96ba52bd --- /dev/null +++ b/keyboards/handwired/yamsek/keyboard-layout.json @@ -0,0 +1,266 @@ +[ + [ + { + "y": 1, + "x": 3 + }, + "E", + { + "x": 11 + }, + "I" + ], + [ + { + "y": -0.875, + "x": 2 + }, + "W", + { + "x": 1 + }, + "R", + { + "x": 9 + }, + "U", + { + "x": 1 + }, + "O" + ], + [ + { + "y": -0.875, + "x": 5 + }, + "T", + { + "x": 7 + }, + "Y" + ], + [ + { + "y": -0.875, + "x": 1 + }, + "Q", + { + "x": 15 + }, + "P" + ], + [ + { + "y": -0.625 + }, + "Esc", + { + "x": 17 + }, + "-" + ], + [ + { + "y": -0.75, + "x": 3 + }, + "D", + { + "x": 11 + }, + "K" + ], + [ + { + "y": -0.875, + "x": 2 + }, + "S", + { + "x": 1 + }, + "F", + { + "x": 9 + }, + "J", + { + "x": 1 + }, + "L" + ], + [ + { + "y": -0.875, + "x": 5 + }, + "G", + { + "x": 7 + }, + "H" + ], + [ + { + "y": -0.875, + "x": 1 + }, + "A", + { + "x": 15 + }, + ":" + ], + [ + { + "y": -0.625 + }, + "Tab", + { + "x": 17 + }, + "'" + ], + [ + { + "y": -0.75, + "x": 3 + }, + "C", + { + "x": 11 + }, + "<" + ], + [ + { + "y": -0.875, + "x": 2 + }, + "X", + { + "x": 1 + }, + "V", + { + "x": 9 + }, + "M", + { + "x": 1 + }, + ">" + ], + [ + { + "y": -0.875, + "x": 5 + }, + "B", + { + "x": 7 + }, + "N" + ], + [ + { + "y": -0.875, + "x": 1 + }, + "Z", + { + "x": 15 + }, + "?" + ], + [ + { + "y": -0.625 + }, + "LShift", + { + "x": 17 + }, + "=" + ], + [ + { + "r": 10, + "rx": 6, + "ry": 4.25, + "y": -0.25, + "x": 0.20000000000000018 + }, + "Alt" + ], + [ + { + "r": 20, + "y": -1.25, + "x": 1.25 + }, + "Ctrl" + ], + [ + { + "x": -1 + }, + "Backs" + ], + [ + { + "x": -1 + }, + "Mo(NPad)", + "TG(Game)" + ], + [ + { + "r": 30, + "y": -3.45, + "x": 2.25 + }, + "Shift" + ], + [ + { + "r": -30, + "rx": 13.25, + "y": -0.9500000000000002, + "x": -3.5 + }, + "Shift" + ], + [ + { + "r": -20, + "y": -0.5499999999999998, + "x": -2.5 + }, + "Enter" + ], + [ + { + "r": -15, + "x": -0.25 + }, + "Del" + ], + [ + { + "x": -1.25 + }, + "Mo(Fun)", + "Mo(Arr)" + ], + [ + { + "r": -10, + "y": -2.75, + "x": -1.4499999999999993 + }, + "Spac" + ] +] \ No newline at end of file diff --git a/keyboards/handwired/yamsek/rp2040/info.json b/keyboards/handwired/yamsek/rp2040/info.json new file mode 100644 index 000000000000..87b7fcf7ecc9 --- /dev/null +++ b/keyboards/handwired/yamsek/rp2040/info.json @@ -0,0 +1,4 @@ +{ + "processor": "RP2040", + "bootloader": "rp2040" +} diff --git a/keyboards/handwired/yamsek/rp2040/rules.mk b/keyboards/handwired/yamsek/rp2040/rules.mk index 073108829e1c..6e7633bfe015 100644 --- a/keyboards/handwired/yamsek/rp2040/rules.mk +++ b/keyboards/handwired/yamsek/rp2040/rules.mk @@ -1,14 +1 @@ -# MCU name -MCU = RP2040 -BOOTLOADER = rp2040 - -CONSOLE_ENABLE = yes # Console for debug(+400) -NKRO_ENABLE = no # USB Nkey Rollover - -RGBLIGHT_ENABLE = yes -RGBLIGHT_DRIVER = WS2812 -WS2812_DRIVER = vendor - -POINTING_DEVICE_ENABLE = yes -POINTING_DEVICE_DRIVER = pimoroni_trackball - +# This file intentionally left blank From ae2d759064a5449eafc2283886dd5b0daac15566 Mon Sep 17 00:00:00 2001 From: JohSchneider Date: Mon, 20 Feb 2023 13:08:32 +0000 Subject: [PATCH 12/19] Apply suggestions from code review fixing includes, removing redundant defines, etc Co-authored-by: Drashna Jaelre --- keyboards/handwired/yamsek/config.h | 4 ---- keyboards/handwired/yamsek/rp2040/config.h | 2 -- keyboards/handwired/yamsek/rules.mk | 3 ++- keyboards/handwired/yamsek/yamsek.c | 1 + 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/keyboards/handwired/yamsek/config.h b/keyboards/handwired/yamsek/config.h index 5c498e7ef538..b131fefd898c 100644 --- a/keyboards/handwired/yamsek/config.h +++ b/keyboards/handwired/yamsek/config.h @@ -1,11 +1,7 @@ /* Copyright 2023 Johannes Schneider (@JohSchneider) */ /* SPDX-License-Identifier: GPL-2.0-or-later */ #pragma once -#include "config_common.h" -/* key matrix size */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 6 /* colum major: first four rows are on the lefthand side, behind a port expander next four rows are on the rightnad side, connected to the single MCU running this keyboard diff --git a/keyboards/handwired/yamsek/rp2040/config.h b/keyboards/handwired/yamsek/rp2040/config.h index 24155cfad577..38c2a15f90c3 100644 --- a/keyboards/handwired/yamsek/rp2040/config.h +++ b/keyboards/handwired/yamsek/rp2040/config.h @@ -2,8 +2,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later #pragma once -#include "config_common.h" - #define RGB_DI_PIN GP16 //PICO_DEFAULT_WS2812_PIN #define RGBLED_NUM 1 diff --git a/keyboards/handwired/yamsek/rules.mk b/keyboards/handwired/yamsek/rules.mk index e2eeb76a10e0..8d29d24ffb4e 100644 --- a/keyboards/handwired/yamsek/rules.mk +++ b/keyboards/handwired/yamsek/rules.mk @@ -24,7 +24,8 @@ RGBLIGHT_ENABLE = no RGBLIGHT_DRIVER = WS2812 VPATH += drivers/gpio -SRC += mcp23018.c i2c_master.c +SRC += mcp23018.c +QUANTUM_LIB_SRC += i2c_master.c OPT_DEFS += -DHAL_USE_I2C=TRUE DEFAULT_FOLDER = yamsek/atmega32u4 diff --git a/keyboards/handwired/yamsek/yamsek.c b/keyboards/handwired/yamsek/yamsek.c index de3678b675ba..0936dc8526dc 100644 --- a/keyboards/handwired/yamsek/yamsek.c +++ b/keyboards/handwired/yamsek/yamsek.c @@ -20,4 +20,5 @@ void keyboard_post_init_kb(void) { wait_ms(1000); // workaround: usb needs some time to initialize, and qmk console does too to reconnect; without this, early 'print's are lost dprint("YaMseK: post_init done :-)\n"); } + keyboard_post_init_user(); } From f1744c05eb6e83fb9723f5f6355b9b69c9172c3c Mon Sep 17 00:00:00 2001 From: Johannes Schneider Date: Sun, 23 Apr 2023 12:18:57 +0200 Subject: [PATCH 13/19] yamsek: fix compile errors after rebase onto develop Signed-off-by: Johannes Schneider --- keyboards/handwired/yamsek/atmega32u4/config.h | 2 +- keyboards/handwired/yamsek/config.h | 4 ++++ keyboards/handwired/yamsek/info.json | 4 ++-- keyboards/handwired/yamsek/keymaps/default/keymap.c | 8 ++++---- keyboards/handwired/yamsek/matrix.c | 5 +++-- keyboards/handwired/yamsek/rules.mk | 4 ++-- 6 files changed, 16 insertions(+), 11 deletions(-) diff --git a/keyboards/handwired/yamsek/atmega32u4/config.h b/keyboards/handwired/yamsek/atmega32u4/config.h index 555a3bfaf060..274ab55ff51f 100644 --- a/keyboards/handwired/yamsek/atmega32u4/config.h +++ b/keyboards/handwired/yamsek/atmega32u4/config.h @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later #pragma once -#define RGB_DI_PIN B6 +#define WS2812_DI_PIN B6 #define RGBLED_NUM 3 #define DYNAMIC_KEYMAP_LAYER_COUNT 6 diff --git a/keyboards/handwired/yamsek/config.h b/keyboards/handwired/yamsek/config.h index b131fefd898c..7957370db5f6 100644 --- a/keyboards/handwired/yamsek/config.h +++ b/keyboards/handwired/yamsek/config.h @@ -10,6 +10,10 @@ // black mark on diode facing columns #define DIODE_DIRECTION ROW2COL +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2) +#define MATRIX_COLS 6 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/handwired/yamsek/info.json b/keyboards/handwired/yamsek/info.json index f8eade6a5e97..cf198c24e583 100644 --- a/keyboards/handwired/yamsek/info.json +++ b/keyboards/handwired/yamsek/info.json @@ -16,8 +16,8 @@ "pid": "0x6060", "vid": "0xFEED" }, - "layouts": { - "LAYOUT_yamsek": { + "layouts": { + "LAYOUT": { "layout": [ {"matrix":[0,0], "label":"Y", "x":13, "y":1.25}, {"matrix":[0,1], "label":"U", "x":14, "y":1.125}, diff --git a/keyboards/handwired/yamsek/keymaps/default/keymap.c b/keyboards/handwired/yamsek/keymaps/default/keymap.c index d4d8d6d1a8a4..767b053a765f 100644 --- a/keyboards/handwired/yamsek/keymaps/default/keymap.c +++ b/keyboards/handwired/yamsek/keymaps/default/keymap.c @@ -3,14 +3,14 @@ #include QMK_KEYBOARD_H -enum layer_names { +enum layers { BASE, // default layer NPAD, // numberpad (blender) ARRO, // arrows and symbols FUNC, // F[1-10] and number key rows MOUS, // mouse GAME, - LEDS + LEDS, }; #define KC_ALDL RALT_T(KC_DEL) @@ -60,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS ,KC_KP_PLUS ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,KC_KP_SLASH, KC_TRNS ,KC_TRNS ,KC_MPRV ,KC_MPLY ,KC_MNXT ,KC_TRNS, KC_TRNS ,KC_KP_MINUS,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,KC_KP_ASTERISK, KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, KC_TRNS ,KC_KP_0 ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,KC_KP_COMMA, KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, - KC_LOCK ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + QK_LOCK ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ), [FUNC] = LAYOUT(// function and numbers //left //right @@ -81,7 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS ,KC_WH_U ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, KC_TRNS ,KC_WH_D ,KC_MS_L ,KC_MS_UP ,KC_MS_R ,KC_TRNS, KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_MS_DOWN ,KC_TRNS ,KC_TRNS, KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS, - KC_LOCK ,KC_LGUI ,KC_TRNS ,KC_MS_BTN1 ,KC_MS_BTN2 ,KC_BTN3, KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + QK_LOCK ,KC_LGUI ,KC_TRNS ,KC_MS_BTN1 ,KC_MS_BTN2 ,KC_BTN3, KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ), [LEDS] = LAYOUT( /* RGBLIGHT */ //left //right diff --git a/keyboards/handwired/yamsek/matrix.c b/keyboards/handwired/yamsek/matrix.c index 5387aa799d99..191f54f45ea1 100644 --- a/keyboards/handwired/yamsek/matrix.c +++ b/keyboards/handwired/yamsek/matrix.c @@ -218,8 +218,9 @@ void matrix_init(void) { // Unless hardware debouncing - Init the configured debounce routine debounce_init(MATRIX_ROWS); + // This *must* be called for correct keyboard behavior - matrix_init_quantum(); + matrix_init_kb(); #ifdef RGBLIGHT_ENABLE if (mcp23018_errors) { @@ -257,7 +258,7 @@ uint8_t matrix_scan(void) { debounce(raw_matrix, matrix, MATRIX_COLS, changed); // This *must* be called for correct keyboard behavior - matrix_scan_quantum(); + matrix_scan_kb(); return changed; } diff --git a/keyboards/handwired/yamsek/rules.mk b/keyboards/handwired/yamsek/rules.mk index 8d29d24ffb4e..5f71ddb93297 100644 --- a/keyboards/handwired/yamsek/rules.mk +++ b/keyboards/handwired/yamsek/rules.mk @@ -13,13 +13,13 @@ AUDIO_ENABLE = no # Audio output CC_FLAGS += -Werror - # override quantums matrix.c with custom matrix file # which uses a row-oriented internal data-structure, we use a column oriented # that was inherited from the I2C/MCP23018 code of the ergodox/ez CUSTOM_MATRIX = yes SRC += matrix.c +RGB_MATRIX_ENABLE = no RGBLIGHT_ENABLE = no RGBLIGHT_DRIVER = WS2812 @@ -28,4 +28,4 @@ SRC += mcp23018.c QUANTUM_LIB_SRC += i2c_master.c OPT_DEFS += -DHAL_USE_I2C=TRUE -DEFAULT_FOLDER = yamsek/atmega32u4 +DEFAULT_FOLDER = handwired/yamsek/atmega32u4 From 46bb191aa19652745bb96c37abeb4252c8f0ff38 Mon Sep 17 00:00:00 2001 From: JohSchneider Date: Sun, 23 Apr 2023 11:46:13 +0000 Subject: [PATCH 14/19] Apply suggestions from code review Co-authored-by: Sergey Vlasov Signed-off-by: Johannes Schneider --- .../handwired/yamsek/atmega32u4/config.h | 3 - .../handwired/yamsek/atmega32u4/info.json | 8 +- keyboards/handwired/yamsek/config.h | 19 -- keyboards/handwired/yamsek/info.json | 6 +- .../handwired/yamsek/keyboard-layout.json | 266 ------------------ keyboards/handwired/yamsek/matrix.c | 5 - keyboards/handwired/yamsek/readme.md | 1 - keyboards/handwired/yamsek/rp2040/config.h | 8 +- keyboards/handwired/yamsek/rp2040/rp2040.c | 4 +- keyboards/handwired/yamsek/rules.mk | 14 - 10 files changed, 16 insertions(+), 318 deletions(-) delete mode 100644 keyboards/handwired/yamsek/config.h delete mode 100644 keyboards/handwired/yamsek/keyboard-layout.json diff --git a/keyboards/handwired/yamsek/atmega32u4/config.h b/keyboards/handwired/yamsek/atmega32u4/config.h index 274ab55ff51f..25e1e6f2e577 100644 --- a/keyboards/handwired/yamsek/atmega32u4/config.h +++ b/keyboards/handwired/yamsek/atmega32u4/config.h @@ -2,7 +2,4 @@ // SPDX-License-Identifier: GPL-2.0-or-later #pragma once -#define WS2812_DI_PIN B6 -#define RGBLED_NUM 3 - #define DYNAMIC_KEYMAP_LAYER_COUNT 6 diff --git a/keyboards/handwired/yamsek/atmega32u4/info.json b/keyboards/handwired/yamsek/atmega32u4/info.json index 4369a0410385..d6bc8e75c170 100644 --- a/keyboards/handwired/yamsek/atmega32u4/info.json +++ b/keyboards/handwired/yamsek/atmega32u4/info.json @@ -1,4 +1,10 @@ { "processor": "atmega32u4", - "bootloader": "caterina" + "bootloader": "caterina", + "ws2812": { + "pin": "B6" + }, + "rgblight": { + "led_count": 3 + } } diff --git a/keyboards/handwired/yamsek/config.h b/keyboards/handwired/yamsek/config.h deleted file mode 100644 index 7957370db5f6..000000000000 --- a/keyboards/handwired/yamsek/config.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2023 Johannes Schneider (@JohSchneider) */ -/* SPDX-License-Identifier: GPL-2.0-or-later */ -#pragma once - -/* colum major: - first four rows are on the lefthand side, behind a port expander - next four rows are on the rightnad side, connected to the single MCU running this keyboard -*/ - -// black mark on diode facing columns -#define DIODE_DIRECTION ROW2COL - -/* key matrix size */ -#define MATRIX_ROWS 8 -#define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2) -#define MATRIX_COLS 6 - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 diff --git a/keyboards/handwired/yamsek/info.json b/keyboards/handwired/yamsek/info.json index cf198c24e583..f6214dac87ae 100644 --- a/keyboards/handwired/yamsek/info.json +++ b/keyboards/handwired/yamsek/info.json @@ -16,7 +16,11 @@ "pid": "0x6060", "vid": "0xFEED" }, - "layouts": { + "matrix_size": { + "cols": 6, + "rows": 8 + }, + "layouts": { "LAYOUT": { "layout": [ {"matrix":[0,0], "label":"Y", "x":13, "y":1.25}, diff --git a/keyboards/handwired/yamsek/keyboard-layout.json b/keyboards/handwired/yamsek/keyboard-layout.json deleted file mode 100644 index 7c4c96ba52bd..000000000000 --- a/keyboards/handwired/yamsek/keyboard-layout.json +++ /dev/null @@ -1,266 +0,0 @@ -[ - [ - { - "y": 1, - "x": 3 - }, - "E", - { - "x": 11 - }, - "I" - ], - [ - { - "y": -0.875, - "x": 2 - }, - "W", - { - "x": 1 - }, - "R", - { - "x": 9 - }, - "U", - { - "x": 1 - }, - "O" - ], - [ - { - "y": -0.875, - "x": 5 - }, - "T", - { - "x": 7 - }, - "Y" - ], - [ - { - "y": -0.875, - "x": 1 - }, - "Q", - { - "x": 15 - }, - "P" - ], - [ - { - "y": -0.625 - }, - "Esc", - { - "x": 17 - }, - "-" - ], - [ - { - "y": -0.75, - "x": 3 - }, - "D", - { - "x": 11 - }, - "K" - ], - [ - { - "y": -0.875, - "x": 2 - }, - "S", - { - "x": 1 - }, - "F", - { - "x": 9 - }, - "J", - { - "x": 1 - }, - "L" - ], - [ - { - "y": -0.875, - "x": 5 - }, - "G", - { - "x": 7 - }, - "H" - ], - [ - { - "y": -0.875, - "x": 1 - }, - "A", - { - "x": 15 - }, - ":" - ], - [ - { - "y": -0.625 - }, - "Tab", - { - "x": 17 - }, - "'" - ], - [ - { - "y": -0.75, - "x": 3 - }, - "C", - { - "x": 11 - }, - "<" - ], - [ - { - "y": -0.875, - "x": 2 - }, - "X", - { - "x": 1 - }, - "V", - { - "x": 9 - }, - "M", - { - "x": 1 - }, - ">" - ], - [ - { - "y": -0.875, - "x": 5 - }, - "B", - { - "x": 7 - }, - "N" - ], - [ - { - "y": -0.875, - "x": 1 - }, - "Z", - { - "x": 15 - }, - "?" - ], - [ - { - "y": -0.625 - }, - "LShift", - { - "x": 17 - }, - "=" - ], - [ - { - "r": 10, - "rx": 6, - "ry": 4.25, - "y": -0.25, - "x": 0.20000000000000018 - }, - "Alt" - ], - [ - { - "r": 20, - "y": -1.25, - "x": 1.25 - }, - "Ctrl" - ], - [ - { - "x": -1 - }, - "Backs" - ], - [ - { - "x": -1 - }, - "Mo(NPad)", - "TG(Game)" - ], - [ - { - "r": 30, - "y": -3.45, - "x": 2.25 - }, - "Shift" - ], - [ - { - "r": -30, - "rx": 13.25, - "y": -0.9500000000000002, - "x": -3.5 - }, - "Shift" - ], - [ - { - "r": -20, - "y": -0.5499999999999998, - "x": -2.5 - }, - "Enter" - ], - [ - { - "r": -15, - "x": -0.25 - }, - "Del" - ], - [ - { - "x": -1.25 - }, - "Mo(Fun)", - "Mo(Arr)" - ], - [ - { - "r": -10, - "y": -2.75, - "x": -1.4499999999999993 - }, - "Spac" - ] -] \ No newline at end of file diff --git a/keyboards/handwired/yamsek/matrix.c b/keyboards/handwired/yamsek/matrix.c index 191f54f45ea1..4a90e4b75f61 100644 --- a/keyboards/handwired/yamsek/matrix.c +++ b/keyboards/handwired/yamsek/matrix.c @@ -55,11 +55,6 @@ static matrix_col_t raw_matrix[MATRIX_COLS]; hence the code "selects" column pins by pulling them low, and continues to read all row-pins into a 'matrix_col_t' */ -#if (DIODE_DIRECTION == COL2ROW) -# pragma error "DIODE_DIRECTION = COL2ROW is not supported (yet)" -// TODO: implement like it is done in keyboards/handwired/dactyl/matrix.c? -#endif - /* Column pin configuration * diff --git a/keyboards/handwired/yamsek/readme.md b/keyboards/handwired/yamsek/readme.md index 724f183754b1..4dd70e6d1166 100644 --- a/keyboards/handwired/yamsek/readme.md +++ b/keyboards/handwired/yamsek/readme.md @@ -1,4 +1,3 @@ -![Yet another Modular split ergonomic Keybard](https://cdn.hackaday.io/images/8060711492102546379.jpg) Find build documentation at the Hackaday.io site for [Yet another Modular split ergonomic Keyboard](https://hackaday.io/project/21164-yamsek) a split keyboard, following the dactyl style of slightly curved keybard halves; and only one MCU running the whole show alongside an I2C portexpander in 'the other half' diff --git a/keyboards/handwired/yamsek/rp2040/config.h b/keyboards/handwired/yamsek/rp2040/config.h index 38c2a15f90c3..70530c0db1f8 100644 --- a/keyboards/handwired/yamsek/rp2040/config.h +++ b/keyboards/handwired/yamsek/rp2040/config.h @@ -2,16 +2,12 @@ // SPDX-License-Identifier: GPL-2.0-or-later #pragma once -#define RGB_DI_PIN GP16 -//PICO_DEFAULT_WS2812_PIN -#define RGBLED_NUM 1 - #define I2C1_SDA_PIN GP2 #define I2C1_SCL_PIN GP3 #define I2C1_CLOCK_SPEED 100000 -#define I2C1_SCL_PAL_MODE (PAL_MODE_ALTERNATE_I2C | PAL_RP_PAD_PUE | PAL_RP_PAD_SLEWFAST) -#define I2C1_SDA_PAL_MODE (PAL_MODE_ALTERNATE_I2C | PAL_RP_PAD_PUE | PAL_RP_PAD_SLEWFAST) +//#define I2C1_SCL_PAL_MODE (PAL_MODE_ALTERNATE_I2C | PAL_RP_PAD_PUE | PAL_RP_PAD_SLEWFAST) +//#define I2C1_SDA_PAL_MODE (PAL_MODE_ALTERNATE_I2C | PAL_RP_PAD_PUE | PAL_RP_PAD_SLEWFAST) // removing 'PAL_RP_PAD_DRIVE4' which the portexpander in the left keyboard half doesn't like // alternative solution would be to add a 100pF ceramic-capacitor between SCL and GND diff --git a/keyboards/handwired/yamsek/rp2040/rp2040.c b/keyboards/handwired/yamsek/rp2040/rp2040.c index 10153f295532..3bd0185927aa 100644 --- a/keyboards/handwired/yamsek/rp2040/rp2040.c +++ b/keyboards/handwired/yamsek/rp2040/rp2040.c @@ -20,5 +20,5 @@ Row 3 is the thumb-cluster */ -const pin_t row_pins_MCU[MATRIX_ROWS / 2] = {5, 6, 7, 8}; -const pin_t col_pins_MCU[MATRIX_COLS] = {14, 15, 26, 27, 28, 29}; +const pin_t row_pins_MCU[MATRIX_ROWS / 2] = {GP5, GP6, GP7, GP8}; +const pin_t col_pins_MCU[MATRIX_COLS] = {GP14, GP15, GP26, GP27, GP28, GP29}; diff --git a/keyboards/handwired/yamsek/rules.mk b/keyboards/handwired/yamsek/rules.mk index 5f71ddb93297..711b872afc08 100644 --- a/keyboards/handwired/yamsek/rules.mk +++ b/keyboards/handwired/yamsek/rules.mk @@ -1,17 +1,3 @@ -# -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # 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 = yes # Enable N-key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -AUDIO_ENABLE = no # Audio output - -CC_FLAGS += -Werror # override quantums matrix.c with custom matrix file # which uses a row-oriented internal data-structure, we use a column oriented From 396773ff158adb95d97c2489e38e349b22d5defd Mon Sep 17 00:00:00 2001 From: Johannes Schneider Date: Sun, 23 Apr 2023 14:16:21 +0200 Subject: [PATCH 15/19] update keymap in info.json drop old-style keymap definition in favor of info.json entry Signed-off-by: Johannes Schneider --- keyboards/handwired/yamsek/info.json | 60 ++++++++++++++-------------- keyboards/handwired/yamsek/yamsek.h | 25 ------------ 2 files changed, 30 insertions(+), 55 deletions(-) diff --git a/keyboards/handwired/yamsek/info.json b/keyboards/handwired/yamsek/info.json index f6214dac87ae..84076d5235be 100644 --- a/keyboards/handwired/yamsek/info.json +++ b/keyboards/handwired/yamsek/info.json @@ -23,30 +23,6 @@ "layouts": { "LAYOUT": { "layout": [ - {"matrix":[0,0], "label":"Y", "x":13, "y":1.25}, - {"matrix":[0,1], "label":"U", "x":14, "y":1.125}, - {"matrix":[0,2], "label":"I", "x":15, "y":1}, - {"matrix":[0,3], "label":"O", "x":16, "y":1.125}, - {"matrix":[0,4], "label":"P", "x":17, "y":1.375}, - {"matrix":[0,5], "label":"-", "x":18, "y":1.75}, - {"matrix":[1,0], "label":"H", "x":13, "y":2.25}, - {"matrix":[1,1], "label":"J", "x":14, "y":2.125}, - {"matrix":[1,2], "label":"K", "x":15, "y":2}, - {"matrix":[1,3], "label":"L", "x":16, "y":2.125}, - {"matrix":[1,4], "label":":", "x":17, "y":2.375}, - {"matrix":[1,5], "label":"'", "x":18, "y":2.75}, - {"matrix":[2,0], "label":"N", "x":13, "y":3.25}, - {"matrix":[2,1], "label":"M", "x":14, "y":3.125}, - {"matrix":[2,2], "label":"<", "x":15, "y":3}, - {"matrix":[2,3], "label":">", "x":16, "y":3.125}, - {"matrix":[2,4], "label":"?", "x":17, "y":3.375}, - {"matrix":[2,5], "label":"=", "x":18, "y":3.75}, - {"matrix":[3,0], "label":"Shift", "x":-3.5, "y":3.85}, - {"matrix":[3,1], "label":"Enter", "x":-2.5, "y":4.3}, - {"matrix":[3,2], "label":"Spac", "x":-1.45, "y":4.55}, - {"matrix":[3,3], "label":"Del", "x":-0.25, "y":5.3}, - {"matrix":[3,4], "label":"Mo(Arr)", "x":-0.25, "y":6.3}, - {"matrix":[3,5], "label":"Mo(Fun)", "x":-1.25, "y":6.3}, {"matrix":[4,0], "label":"Esc", "x":0, "y":1.75}, {"matrix":[4,1], "label":"Q", "x":1, "y":1.375}, {"matrix":[4,2], "label":"W", "x":2, "y":1.125}, @@ -65,12 +41,36 @@ {"matrix":[6,3], "label":"C", "x":3, "y":3}, {"matrix":[6,4], "label":"V", "x":4, "y":3.125}, {"matrix":[6,5], "label":"B", "x":5, "y":3.25}, - {"matrix":[7,0], "label":"TG(Game)", "x":0, "y":6.25}, - {"matrix":[7,1], "label":"Mo(NPad)", "x":-1.0, "y":6.25}, - {"matrix":[7,2], "label":"Backs", "x":-1.0, "y":5.25}, - {"matrix":[7,3], "label":"Alt", "x":0.2, "y":4.5}, - {"matrix":[7,4], "label":"Ctrl", "x":1.25, "y":4.25}, - {"matrix":[7,5], "label":"Shift", "x":2.25, "y":3.8} + {"matrix":[7,0], "label":"TG(Game)", "x":1, "y":6.25}, + {"matrix":[7,1], "label":"Mo(NPad)", "x":0, "y":6.25}, + {"matrix":[7,2], "label":"Backs", "x":0, "y":5.25}, + {"matrix":[7,3], "label":"Alt", "x":1.2, "y":4.5}, + {"matrix":[7,4], "label":"Ctrl", "x":2.25, "y":4.25}, + {"matrix":[7,5], "label":"Shift", "x":3.25, "y":3.8}, + {"matrix":[0,0], "label":"Y", "x":13, "y":1.25}, + {"matrix":[0,1], "label":"U", "x":14, "y":1.125}, + {"matrix":[0,2], "label":"I", "x":15, "y":1}, + {"matrix":[0,3], "label":"O", "x":16, "y":1.125}, + {"matrix":[0,4], "label":"P", "x":17, "y":1.375}, + {"matrix":[0,5], "label":"-", "x":18, "y":1.75}, + {"matrix":[1,0], "label":"H", "x":13, "y":2.25}, + {"matrix":[1,1], "label":"J", "x":14, "y":2.125}, + {"matrix":[1,2], "label":"K", "x":15, "y":2}, + {"matrix":[1,3], "label":"L", "x":16, "y":2.125}, + {"matrix":[1,4], "label":":", "x":17, "y":2.375}, + {"matrix":[1,5], "label":"'", "x":18, "y":2.75}, + {"matrix":[2,0], "label":"N", "x":13, "y":3.25}, + {"matrix":[2,1], "label":"M", "x":14, "y":3.125}, + {"matrix":[2,2], "label":"<", "x":15, "y":3}, + {"matrix":[2,3], "label":">", "x":16, "y":3.125}, + {"matrix":[2,4], "label":"?", "x":17, "y":3.375}, + {"matrix":[2,5], "label":"=", "x":18, "y":3.75}, + {"matrix":[3,0], "label":"Shift", "x":3.5, "y":3.85}, + {"matrix":[3,1], "label":"Enter", "x":2.5, "y":4.3}, + {"matrix":[3,2], "label":"Spac", "x":1.45, "y":4.55}, + {"matrix":[3,3], "label":"Del", "x":0.25, "y":5.3}, + {"matrix":[3,4], "label":"Mo(Arr)", "x":0.25, "y":6.3}, + {"matrix":[3,5], "label":"Mo(Fun)", "x":1.25, "y":6.3}, ] } } diff --git a/keyboards/handwired/yamsek/yamsek.h b/keyboards/handwired/yamsek/yamsek.h index 5ae5d16ba6d4..d0e2cdf5fb69 100644 --- a/keyboards/handwired/yamsek/yamsek.h +++ b/keyboards/handwired/yamsek/yamsek.h @@ -9,28 +9,3 @@ // defined in the used mainboard/MCU extern const pin_t row_pins_MCU[MATRIX_ROWS / 2]; extern const pin_t col_pins_MCU[MATRIX_COLS]; - - -// This a shortcut to help you visually see your layout. -// The following is an example using the Planck MIT layout -// The first section contains all of the arguements -// The second converts the arguments into a two-dimensional array -#define LAYOUT( \ - k40, k41, k42, k43, k44, k45, k00, k01, k02, k03, k04, k05, \ - k50, k51, k52, k53, k54, k55, k10, k11, k12, k13, k14, k15, \ - k60, k61, k62, k63, k64, k65, k20, k21, k22, k23, k24, k25, \ - \ - k72, k73, k74, k75, k30, k31, k32, k33, \ - k71, k70, k35, k34 \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05}, \ - { k10, k11, k12, k13, k14, k15}, \ - { k20, k21, k22, k23, k24, k25}, \ - { k30, k31, k32, k33, k34, k35}, \ - \ - { k40, k41, k42, k43, k44, k45}, \ - { k50, k51, k52, k53, k54, k55}, \ - { k60, k61, k62, k63, k64, k65}, \ - { k70, k71, k72, k73, k74, k75}, \ -} From 240573d27e3b1a036e2b953694fea10af503ea67 Mon Sep 17 00:00:00 2001 From: Johannes Schneider Date: Sun, 23 Apr 2023 16:19:28 +0200 Subject: [PATCH 16/19] yamsek: fix key positions in info.json --- keyboards/handwired/yamsek/info.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/keyboards/handwired/yamsek/info.json b/keyboards/handwired/yamsek/info.json index 84076d5235be..ed643e4cb369 100644 --- a/keyboards/handwired/yamsek/info.json +++ b/keyboards/handwired/yamsek/info.json @@ -41,12 +41,12 @@ {"matrix":[6,3], "label":"C", "x":3, "y":3}, {"matrix":[6,4], "label":"V", "x":4, "y":3.125}, {"matrix":[6,5], "label":"B", "x":5, "y":3.25}, - {"matrix":[7,0], "label":"TG(Game)", "x":1, "y":6.25}, - {"matrix":[7,1], "label":"Mo(NPad)", "x":0, "y":6.25}, - {"matrix":[7,2], "label":"Backs", "x":0, "y":5.25}, - {"matrix":[7,3], "label":"Alt", "x":1.2, "y":4.5}, - {"matrix":[7,4], "label":"Ctrl", "x":2.25, "y":4.25}, - {"matrix":[7,5], "label":"Shift", "x":3.25, "y":3.8}, + {"matrix":[7,0], "label":"TG(Game)", "x":5.5, "y":6}, + {"matrix":[7,1], "label":"Mo(NPad)", "x":4.5, "y":5.6}, + {"matrix":[7,2], "label":"Backs", "x":4.5, "y":5}, + {"matrix":[7,3], "label":"Alt", "x":5.7, "y":4.5}, + {"matrix":[7,4], "label":"Ctrl", "x":6.75, "y":4.75}, + {"matrix":[7,5], "label":"Shift", "x":7.75, "y":5.2}, {"matrix":[0,0], "label":"Y", "x":13, "y":1.25}, {"matrix":[0,1], "label":"U", "x":14, "y":1.125}, {"matrix":[0,2], "label":"I", "x":15, "y":1}, @@ -65,12 +65,12 @@ {"matrix":[2,3], "label":">", "x":16, "y":3.125}, {"matrix":[2,4], "label":"?", "x":17, "y":3.375}, {"matrix":[2,5], "label":"=", "x":18, "y":3.75}, - {"matrix":[3,0], "label":"Shift", "x":3.5, "y":3.85}, - {"matrix":[3,1], "label":"Enter", "x":2.5, "y":4.3}, - {"matrix":[3,2], "label":"Spac", "x":1.45, "y":4.55}, - {"matrix":[3,3], "label":"Del", "x":0.25, "y":5.3}, - {"matrix":[3,4], "label":"Mo(Arr)", "x":0.25, "y":6.3}, - {"matrix":[3,5], "label":"Mo(Fun)", "x":1.25, "y":6.3}, + {"matrix":[3,0], "label":"Shift", "x":10, "y":5.2}, + {"matrix":[3,1], "label":"Enter", "x":11, "y":4.75}, + {"matrix":[3,2], "label":"Spac", "x":11.95, "y":4.5}, + {"matrix":[3,3], "label":"Del", "x":13.2, "y":5}, + {"matrix":[3,4], "label":"Mo(Arr)", "x":12.2, "y":6}, + {"matrix":[3,5], "label":"Mo(Fun)", "x":13.2, "y":5.6}, ] } } From f524aeacc78270b85397fd5255772706a7435dae Mon Sep 17 00:00:00 2001 From: Johannes Schneider Date: Sun, 23 Apr 2023 16:23:56 +0200 Subject: [PATCH 17/19] yamsek: fix lint warning 'Layout "LAYOUT" is offset on Y axis by 1' --- keyboards/handwired/yamsek/info.json | 96 ++++++++++++++-------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/keyboards/handwired/yamsek/info.json b/keyboards/handwired/yamsek/info.json index ed643e4cb369..d7fc3c1e5e41 100644 --- a/keyboards/handwired/yamsek/info.json +++ b/keyboards/handwired/yamsek/info.json @@ -23,54 +23,54 @@ "layouts": { "LAYOUT": { "layout": [ - {"matrix":[4,0], "label":"Esc", "x":0, "y":1.75}, - {"matrix":[4,1], "label":"Q", "x":1, "y":1.375}, - {"matrix":[4,2], "label":"W", "x":2, "y":1.125}, - {"matrix":[4,3], "label":"E", "x":3, "y":1}, - {"matrix":[4,4], "label":"R", "x":4, "y":1.125}, - {"matrix":[4,5], "label":"T", "x":5, "y":1.25}, - {"matrix":[5,0], "label":"Tab", "x":0, "y":2.75}, - {"matrix":[5,1], "label":"A", "x":1, "y":2.375}, - {"matrix":[5,2], "label":"S", "x":2, "y":2.125}, - {"matrix":[5,3], "label":"D", "x":3, "y":2}, - {"matrix":[5,4], "label":"F", "x":4, "y":2.125}, - {"matrix":[5,5], "label":"G", "x":5, "y":2.25}, - {"matrix":[6,0], "label":"LShift", "x":0, "y":3.75}, - {"matrix":[6,1], "label":"Z", "x":1, "y":3.375}, - {"matrix":[6,2], "label":"X", "x":2, "y":3.125}, - {"matrix":[6,3], "label":"C", "x":3, "y":3}, - {"matrix":[6,4], "label":"V", "x":4, "y":3.125}, - {"matrix":[6,5], "label":"B", "x":5, "y":3.25}, - {"matrix":[7,0], "label":"TG(Game)", "x":5.5, "y":6}, - {"matrix":[7,1], "label":"Mo(NPad)", "x":4.5, "y":5.6}, - {"matrix":[7,2], "label":"Backs", "x":4.5, "y":5}, - {"matrix":[7,3], "label":"Alt", "x":5.7, "y":4.5}, - {"matrix":[7,4], "label":"Ctrl", "x":6.75, "y":4.75}, - {"matrix":[7,5], "label":"Shift", "x":7.75, "y":5.2}, - {"matrix":[0,0], "label":"Y", "x":13, "y":1.25}, - {"matrix":[0,1], "label":"U", "x":14, "y":1.125}, - {"matrix":[0,2], "label":"I", "x":15, "y":1}, - {"matrix":[0,3], "label":"O", "x":16, "y":1.125}, - {"matrix":[0,4], "label":"P", "x":17, "y":1.375}, - {"matrix":[0,5], "label":"-", "x":18, "y":1.75}, - {"matrix":[1,0], "label":"H", "x":13, "y":2.25}, - {"matrix":[1,1], "label":"J", "x":14, "y":2.125}, - {"matrix":[1,2], "label":"K", "x":15, "y":2}, - {"matrix":[1,3], "label":"L", "x":16, "y":2.125}, - {"matrix":[1,4], "label":":", "x":17, "y":2.375}, - {"matrix":[1,5], "label":"'", "x":18, "y":2.75}, - {"matrix":[2,0], "label":"N", "x":13, "y":3.25}, - {"matrix":[2,1], "label":"M", "x":14, "y":3.125}, - {"matrix":[2,2], "label":"<", "x":15, "y":3}, - {"matrix":[2,3], "label":">", "x":16, "y":3.125}, - {"matrix":[2,4], "label":"?", "x":17, "y":3.375}, - {"matrix":[2,5], "label":"=", "x":18, "y":3.75}, - {"matrix":[3,0], "label":"Shift", "x":10, "y":5.2}, - {"matrix":[3,1], "label":"Enter", "x":11, "y":4.75}, - {"matrix":[3,2], "label":"Spac", "x":11.95, "y":4.5}, - {"matrix":[3,3], "label":"Del", "x":13.2, "y":5}, - {"matrix":[3,4], "label":"Mo(Arr)", "x":12.2, "y":6}, - {"matrix":[3,5], "label":"Mo(Fun)", "x":13.2, "y":5.6}, + {"matrix":[4,0], "label":"Esc", "x":0, "y":0.75}, + {"matrix":[4,1], "label":"Q", "x":1, "y":0.375}, + {"matrix":[4,2], "label":"W", "x":2, "y":0.125}, + {"matrix":[4,3], "label":"E", "x":3, "y":0}, + {"matrix":[4,4], "label":"R", "x":4, "y":0.125}, + {"matrix":[4,5], "label":"T", "x":5, "y":0.25}, + {"matrix":[5,0], "label":"Tab", "x":0, "y":1.75}, + {"matrix":[5,1], "label":"A", "x":1, "y":1.375}, + {"matrix":[5,2], "label":"S", "x":2, "y":1.125}, + {"matrix":[5,3], "label":"D", "x":3, "y":1}, + {"matrix":[5,4], "label":"F", "x":4, "y":1.125}, + {"matrix":[5,5], "label":"G", "x":5, "y":1.25}, + {"matrix":[6,0], "label":"LShift", "x":0, "y":2.75}, + {"matrix":[6,1], "label":"Z", "x":1, "y":2.375}, + {"matrix":[6,2], "label":"X", "x":2, "y":2.125}, + {"matrix":[6,3], "label":"C", "x":3, "y":2}, + {"matrix":[6,4], "label":"V", "x":4, "y":2.125}, + {"matrix":[6,5], "label":"B", "x":5, "y":2.25}, + {"matrix":[7,0], "label":"TG(Game)", "x":5.5, "y":5}, + {"matrix":[7,1], "label":"Mo(NPad)", "x":4.5, "y":4.6}, + {"matrix":[7,2], "label":"Backs", "x":4.5, "y":4}, + {"matrix":[7,3], "label":"Alt", "x":5.7, "y":3.5}, + {"matrix":[7,4], "label":"Ctrl", "x":6.75, "y":3.75}, + {"matrix":[7,5], "label":"Shift", "x":7.75, "y":4.2}, + {"matrix":[0,0], "label":"Y", "x":13, "y":0.25}, + {"matrix":[0,1], "label":"U", "x":14, "y":0.125}, + {"matrix":[0,2], "label":"I", "x":15, "y":0}, + {"matrix":[0,3], "label":"O", "x":16, "y":0.125}, + {"matrix":[0,4], "label":"P", "x":17, "y":0.375}, + {"matrix":[0,5], "label":"-", "x":18, "y":0.75}, + {"matrix":[1,0], "label":"H", "x":13, "y":1.25}, + {"matrix":[1,1], "label":"J", "x":14, "y":1.125}, + {"matrix":[1,2], "label":"K", "x":15, "y":1}, + {"matrix":[1,3], "label":"L", "x":16, "y":1.125}, + {"matrix":[1,4], "label":":", "x":17, "y":1.375}, + {"matrix":[1,5], "label":"'", "x":18, "y":1.75}, + {"matrix":[2,0], "label":"N", "x":13, "y":2.25}, + {"matrix":[2,1], "label":"M", "x":14, "y":2.125}, + {"matrix":[2,2], "label":"<", "x":15, "y":2}, + {"matrix":[2,3], "label":">", "x":16, "y":2.125}, + {"matrix":[2,4], "label":"?", "x":17, "y":2.375}, + {"matrix":[2,5], "label":"=", "x":18, "y":2.75}, + {"matrix":[3,0], "label":"Shift", "x":10, "y":4.2}, + {"matrix":[3,1], "label":"Enter", "x":11, "y":3.75}, + {"matrix":[3,2], "label":"Spac", "x":11.95, "y":3.5}, + {"matrix":[3,3], "label":"Del", "x":13.2, "y":4}, + {"matrix":[3,4], "label":"Mo(Arr)", "x":12.2, "y":5}, + {"matrix":[3,5], "label":"Mo(Fun)", "x":13.2, "y":4.6}, ] } } From 5f68a8640579918da00f0a82b65c85ebd743e07a Mon Sep 17 00:00:00 2001 From: JohSchneider Date: Mon, 24 Apr 2023 14:37:39 +0000 Subject: [PATCH 18/19] Update keyboards/handwired/yamsek/info.json fix it to match the keymap Co-authored-by: Sergey Vlasov --- keyboards/handwired/yamsek/info.json | 36 ++++++++++++++-------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/keyboards/handwired/yamsek/info.json b/keyboards/handwired/yamsek/info.json index d7fc3c1e5e41..b2065fdaeb3c 100644 --- a/keyboards/handwired/yamsek/info.json +++ b/keyboards/handwired/yamsek/info.json @@ -29,42 +29,42 @@ {"matrix":[4,3], "label":"E", "x":3, "y":0}, {"matrix":[4,4], "label":"R", "x":4, "y":0.125}, {"matrix":[4,5], "label":"T", "x":5, "y":0.25}, - {"matrix":[5,0], "label":"Tab", "x":0, "y":1.75}, - {"matrix":[5,1], "label":"A", "x":1, "y":1.375}, - {"matrix":[5,2], "label":"S", "x":2, "y":1.125}, - {"matrix":[5,3], "label":"D", "x":3, "y":1}, - {"matrix":[5,4], "label":"F", "x":4, "y":1.125}, - {"matrix":[5,5], "label":"G", "x":5, "y":1.25}, - {"matrix":[6,0], "label":"LShift", "x":0, "y":2.75}, - {"matrix":[6,1], "label":"Z", "x":1, "y":2.375}, - {"matrix":[6,2], "label":"X", "x":2, "y":2.125}, - {"matrix":[6,3], "label":"C", "x":3, "y":2}, - {"matrix":[6,4], "label":"V", "x":4, "y":2.125}, - {"matrix":[6,5], "label":"B", "x":5, "y":2.25}, - {"matrix":[7,0], "label":"TG(Game)", "x":5.5, "y":5}, - {"matrix":[7,1], "label":"Mo(NPad)", "x":4.5, "y":4.6}, - {"matrix":[7,2], "label":"Backs", "x":4.5, "y":4}, - {"matrix":[7,3], "label":"Alt", "x":5.7, "y":3.5}, - {"matrix":[7,4], "label":"Ctrl", "x":6.75, "y":3.75}, - {"matrix":[7,5], "label":"Shift", "x":7.75, "y":4.2}, {"matrix":[0,0], "label":"Y", "x":13, "y":0.25}, {"matrix":[0,1], "label":"U", "x":14, "y":0.125}, {"matrix":[0,2], "label":"I", "x":15, "y":0}, {"matrix":[0,3], "label":"O", "x":16, "y":0.125}, {"matrix":[0,4], "label":"P", "x":17, "y":0.375}, {"matrix":[0,5], "label":"-", "x":18, "y":0.75}, + {"matrix":[5,0], "label":"Tab", "x":0, "y":1.75}, + {"matrix":[5,1], "label":"A", "x":1, "y":1.375}, + {"matrix":[5,2], "label":"S", "x":2, "y":1.125}, + {"matrix":[5,3], "label":"D", "x":3, "y":1}, + {"matrix":[5,4], "label":"F", "x":4, "y":1.125}, + {"matrix":[5,5], "label":"G", "x":5, "y":1.25}, {"matrix":[1,0], "label":"H", "x":13, "y":1.25}, {"matrix":[1,1], "label":"J", "x":14, "y":1.125}, {"matrix":[1,2], "label":"K", "x":15, "y":1}, {"matrix":[1,3], "label":"L", "x":16, "y":1.125}, {"matrix":[1,4], "label":":", "x":17, "y":1.375}, {"matrix":[1,5], "label":"'", "x":18, "y":1.75}, + {"matrix":[6,0], "label":"LShift", "x":0, "y":2.75}, + {"matrix":[6,1], "label":"Z", "x":1, "y":2.375}, + {"matrix":[6,2], "label":"X", "x":2, "y":2.125}, + {"matrix":[6,3], "label":"C", "x":3, "y":2}, + {"matrix":[6,4], "label":"V", "x":4, "y":2.125}, + {"matrix":[6,5], "label":"B", "x":5, "y":2.25}, {"matrix":[2,0], "label":"N", "x":13, "y":2.25}, {"matrix":[2,1], "label":"M", "x":14, "y":2.125}, {"matrix":[2,2], "label":"<", "x":15, "y":2}, {"matrix":[2,3], "label":">", "x":16, "y":2.125}, {"matrix":[2,4], "label":"?", "x":17, "y":2.375}, {"matrix":[2,5], "label":"=", "x":18, "y":2.75}, + {"matrix":[7,0], "label":"TG(Game)", "x":5.5, "y":5}, + {"matrix":[7,1], "label":"Mo(NPad)", "x":4.5, "y":4.6}, + {"matrix":[7,2], "label":"Backs", "x":4.5, "y":4}, + {"matrix":[7,3], "label":"Alt", "x":5.7, "y":3.5}, + {"matrix":[7,4], "label":"Ctrl", "x":6.75, "y":3.75}, + {"matrix":[7,5], "label":"Shift", "x":7.75, "y":4.2}, {"matrix":[3,0], "label":"Shift", "x":10, "y":4.2}, {"matrix":[3,1], "label":"Enter", "x":11, "y":3.75}, {"matrix":[3,2], "label":"Spac", "x":11.95, "y":3.5}, From 84bd503d69c793e935554922c64a27b687286967 Mon Sep 17 00:00:00 2001 From: Johannes Schneider Date: Thu, 28 Sep 2023 04:28:07 +0200 Subject: [PATCH 19/19] fix minor LINT error in the rules.mk --- keyboards/handwired/yamsek/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/handwired/yamsek/rules.mk b/keyboards/handwired/yamsek/rules.mk index 711b872afc08..99fd09883ca6 100644 --- a/keyboards/handwired/yamsek/rules.mk +++ b/keyboards/handwired/yamsek/rules.mk @@ -7,7 +7,7 @@ SRC += matrix.c RGB_MATRIX_ENABLE = no RGBLIGHT_ENABLE = no -RGBLIGHT_DRIVER = WS2812 +RGBLIGHT_DRIVER = ws2812 VPATH += drivers/gpio SRC += mcp23018.c