[Keyboard] Refactor xs60 with soldered and hotswap version (#19049)
Co-authored-by: Drashna Jaelre <drashna@live.com>
This commit is contained in:
parent
76c69f35c5
commit
0b1d5497fc
@ -1,4 +1,4 @@
|
||||
/* Copyright 2021 Harrison Chan (Xelus)
|
||||
/* Copyright 2022 Harrison Chan (Xelus)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -16,17 +16,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 14
|
||||
|
||||
/* key matrix pins */
|
||||
#define MATRIX_ROW_PINS { B4, B3, A15, A14, A7 }
|
||||
#define MATRIX_COL_PINS { B0, B1, A8, A9, B5, A6, C14, C15, A0, A5, A4, A3, A2, A1 }
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
@ -50,3 +39,13 @@
|
||||
|
||||
// More EEPROM for layers
|
||||
#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 8191
|
||||
|
||||
// RGBLIGHT
|
||||
#define RGB_DI_PIN A10
|
||||
#define RGBLED_NUM 8 // actually only has 1
|
||||
#define RGBLIGHT_LAYERS
|
||||
#define WS2812_EXTERNAL_PULLUP
|
||||
#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF
|
||||
|
||||
// Bitbang WS2812
|
||||
#define NOP_FUDGE 0.4
|
@ -1,4 +1,4 @@
|
||||
/* Copyright 2021 Harrison Chan (Xelus)
|
||||
/* Copyright 2022 Harrison Chan (Xelus)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
@ -1,4 +1,4 @@
|
||||
/* Copyright 2021 Harrison Chan (Xelus)
|
||||
/* Copyright 2022 Harrison Chan (Xelus)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -14,7 +14,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "xs60.h"
|
||||
#include "hotswap.h"
|
||||
|
||||
// tested and working
|
||||
void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); }
|
34
keyboards/xelus/xs60/hotswap/hotswap.h
Normal file
34
keyboards/xelus/xs60/hotswap/hotswap.h
Normal file
@ -0,0 +1,34 @@
|
||||
/* Copyright 2022 Harrison Chan (Xelus)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define XXX KC_NO
|
||||
|
||||
#define LAYOUT_60_ansi_tsangan_split_rshift( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3D, \
|
||||
K40, K41, K42, K45, K4A, K4B, K4D \
|
||||
) { \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, XXX, K3C, K3D }, \
|
||||
{ K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, XXX, K4A, K4B, XXX, K4D } \
|
||||
}
|
83
keyboards/xelus/xs60/hotswap/info.json
Normal file
83
keyboards/xelus/xs60/hotswap/info.json
Normal file
@ -0,0 +1,83 @@
|
||||
{
|
||||
"keyboard_name": "XS60 Hotswap",
|
||||
"manufacturer": "Xelus",
|
||||
"url": "",
|
||||
"maintainer": "Xelus22",
|
||||
"usb": {
|
||||
"vid": "0x5845",
|
||||
"pid": "0x5861",
|
||||
"device_version": "0.0.1"
|
||||
},
|
||||
"diode_direction": "COL2ROW",
|
||||
"matrix_pins": {
|
||||
"cols": ["B0", "B1", "A8", "A9", "B5", "A6", "C14", "C15", "A0", "A5","A4","A3","A2","A1"],
|
||||
"rows": ["B4", "B3", "A15", "A14", "A7"]
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT_60_ansi_tsangan_split_rshift": {
|
||||
"layout": [
|
||||
{"label":"Esc", "x":0, "y":0},
|
||||
{"label":"1", "x":1, "y":0},
|
||||
{"label":"2", "x":2, "y":0},
|
||||
{"label":"3", "x":3, "y":0},
|
||||
{"label":"4", "x":4, "y":0},
|
||||
{"label":"5", "x":5, "y":0},
|
||||
{"label":"6", "x":6, "y":0},
|
||||
{"label":"7", "x":7, "y":0},
|
||||
{"label":"8", "x":8, "y":0},
|
||||
{"label":"9", "x":9, "y":0},
|
||||
{"label":"0", "x":10, "y":0},
|
||||
{"label":"-", "x":11, "y":0},
|
||||
{"label":"=", "x":12, "y":0},
|
||||
{"label":"Backspace", "x":13, "y":0, "w":2},
|
||||
{"label":"Tab", "x":0, "y":1, "w":1.5},
|
||||
{"label":"Q", "x":1.5, "y":1},
|
||||
{"label":"W", "x":2.5, "y":1},
|
||||
{"label":"E", "x":3.5, "y":1},
|
||||
{"label":"R", "x":4.5, "y":1},
|
||||
{"label":"T", "x":5.5, "y":1},
|
||||
{"label":"Y", "x":6.5, "y":1},
|
||||
{"label":"U", "x":7.5, "y":1},
|
||||
{"label":"I", "x":8.5, "y":1},
|
||||
{"label":"O", "x":9.5, "y":1},
|
||||
{"label":"P", "x":10.5, "y":1},
|
||||
{"label":"[", "x":11.5, "y":1},
|
||||
{"label":"]", "x":12.5, "y":1},
|
||||
{"label":"Backspace", "x":13.5, "y":1, "w":1.5},
|
||||
{"label":"Caps Lock", "x":0, "y":2, "w":1.75},
|
||||
{"label":"A", "x":1.75, "y":2},
|
||||
{"label":"S", "x":2.75, "y":2},
|
||||
{"label":"D", "x":3.75, "y":2},
|
||||
{"label":"F", "x":4.75, "y":2},
|
||||
{"label":"G", "x":5.75, "y":2},
|
||||
{"label":"H", "x":6.75, "y":2},
|
||||
{"label":"J", "x":7.75, "y":2},
|
||||
{"label":"K", "x":8.75, "y":2},
|
||||
{"label":"L", "x":9.75, "y":2},
|
||||
{"label":";", "x":10.75, "y":2},
|
||||
{"label":"'", "x":11.75, "y":2},
|
||||
{"label":"Enter", "x":12.75, "y":2, "w":2.25},
|
||||
{"label":"Shift", "x":0, "y":3, "w":2.25},
|
||||
{"label":"Z", "x":2.25, "y":3},
|
||||
{"label":"X", "x":3.25, "y":3},
|
||||
{"label":"C", "x":4.25, "y":3},
|
||||
{"label":"V", "x":5.25, "y":3},
|
||||
{"label":"B", "x":6.25, "y":3},
|
||||
{"label":"N", "x":7.25, "y":3},
|
||||
{"label":"M", "x":8.25, "y":3},
|
||||
{"label":",", "x":9.25, "y":3},
|
||||
{"label":".", "x":10.25, "y":3},
|
||||
{"label":"/", "x":11.25, "y":3},
|
||||
{"label":"Shift", "x":12.25, "y":3, "w":1.75},
|
||||
{"label":"Fn", "x":14, "y":3},
|
||||
{"label":"Ctrl", "x":0, "y":4, "w":1.5},
|
||||
{"label":"GUI", "x":1.5, "y":4},
|
||||
{"label":"Alt", "x":2.5, "y":4, "w":1.5},
|
||||
{"label":"Space", "x":4, "y":4, "w":7},
|
||||
{"label":"Alt", "x":11, "y":4, "w":1.5},
|
||||
{"label":"GUI", "x":12.5, "y":4},
|
||||
{"label":"Ctrl", "x":13.5, "y":4, "w":1.5}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
81
keyboards/xelus/xs60/hotswap/keymaps/default/keymap.c
Normal file
81
keyboards/xelus/xs60/hotswap/keymaps/default/keymap.c
Normal file
@ -0,0 +1,81 @@
|
||||
/* Copyright 2022 Harrison Chan (Xelus)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Default layout for XS60
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// Default layer: Pressing caps-lock momentarily switches to Layer 1.
|
||||
// This is the default layer. Pressing an empty keycode on another layer will take you here.
|
||||
[0] = LAYOUT_60_ansi_tsangan_split_rshift(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL , KC_BSLS,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, MO(1),
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL
|
||||
),
|
||||
|
||||
[1] = LAYOUT_60_ansi_tsangan_split_rshift(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,
|
||||
KC_CAPS, KC_TRNS, KC_UP , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE,
|
||||
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_PGUP, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END
|
||||
)
|
||||
};
|
||||
|
||||
#ifdef RGBLIGHT_LAYERS
|
||||
const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, 1, HSV_ORANGE}
|
||||
);
|
||||
|
||||
const rgblight_segment_t PROGMEM my_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, 1, HSV_CYAN}
|
||||
);
|
||||
|
||||
const rgblight_segment_t PROGMEM my_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, 1, HSV_PURPLE}
|
||||
);
|
||||
|
||||
const rgblight_segment_t PROGMEM my_layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, 1, HSV_GREEN}
|
||||
);
|
||||
|
||||
// Now define the array of layers. Later layers take precedence
|
||||
const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
|
||||
my_capslock_layer,
|
||||
my_layer1_layer, // Overrides caps lock layer
|
||||
my_layer2_layer, // Overrides other layers
|
||||
my_layer3_layer // Overrides other layers
|
||||
);
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
// Enable the LED layers
|
||||
rgblight_layers = my_rgb_layers;
|
||||
}
|
||||
|
||||
bool led_update_user(led_t led_state) {
|
||||
rgblight_set_layer_state(0, led_state.caps_lock);
|
||||
return true;
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
rgblight_set_layer_state(1, layer_state_cmp(state, 1));
|
||||
rgblight_set_layer_state(2, layer_state_cmp(state, 2));
|
||||
rgblight_set_layer_state(3, layer_state_cmp(state, 3));
|
||||
return state;
|
||||
}
|
||||
#endif
|
@ -1,4 +1,4 @@
|
||||
/* Copyright 2021 Harrison Chan (Xelus)
|
||||
/* Copyright 2022 Harrison Chan (Xelus)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
128
keyboards/xelus/xs60/hotswap/keymaps/via/keymap.c
Normal file
128
keyboards/xelus/xs60/hotswap/keymaps/via/keymap.c
Normal file
@ -0,0 +1,128 @@
|
||||
/* Copyright 2022 Harrison Chan (Xelus)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// Default layer: Pressing caps-lock momentarily switches to Layer 1.
|
||||
// This is the default layer. Pressing an empty keycode on another layer will take you here.
|
||||
[0] = LAYOUT_60_ansi_tsangan_split_rshift(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL , KC_BSLS,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL
|
||||
),
|
||||
|
||||
[1] = LAYOUT_60_ansi_tsangan_split_rshift(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,
|
||||
KC_CAPS, KC_TRNS, KC_UP , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE,
|
||||
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_PGUP, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END
|
||||
),
|
||||
|
||||
[2] = LAYOUT_60_ansi_tsangan_split_rshift(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
[3] = LAYOUT_60_ansi_tsangan_split_rshift(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
[4] = LAYOUT_60_ansi_tsangan_split_rshift(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
[5] = LAYOUT_60_ansi_tsangan_split_rshift(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
[6] = LAYOUT_60_ansi_tsangan_split_rshift(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
[7] = LAYOUT_60_ansi_tsangan_split_rshift(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
)
|
||||
};
|
||||
|
||||
#ifdef RGBLIGHT_LAYERS
|
||||
const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, 1, HSV_ORANGE}
|
||||
);
|
||||
|
||||
const rgblight_segment_t PROGMEM my_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, 1, HSV_CYAN}
|
||||
);
|
||||
|
||||
const rgblight_segment_t PROGMEM my_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, 1, HSV_PURPLE}
|
||||
);
|
||||
|
||||
const rgblight_segment_t PROGMEM my_layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, 1, HSV_GREEN}
|
||||
);
|
||||
|
||||
// Now define the array of layers. Later layers take precedence
|
||||
const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
|
||||
my_capslock_layer,
|
||||
my_layer1_layer, // Overrides caps lock layer
|
||||
my_layer2_layer, // Overrides other layers
|
||||
my_layer3_layer // Overrides other layers
|
||||
);
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
// Enable the LED layers
|
||||
rgblight_layers = my_rgb_layers;
|
||||
}
|
||||
|
||||
bool led_update_user(led_t led_state) {
|
||||
rgblight_set_layer_state(0, led_state.caps_lock);
|
||||
return true;
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
rgblight_set_layer_state(1, layer_state_cmp(state, 1));
|
||||
rgblight_set_layer_state(2, layer_state_cmp(state, 2));
|
||||
rgblight_set_layer_state(3, layer_state_cmp(state, 3));
|
||||
return state;
|
||||
}
|
||||
#endif
|
@ -1,4 +1,4 @@
|
||||
/* Copyright 2021 Harrison Chan (Xelus)
|
||||
/* Copyright 2022 Harrison Chan (Xelus)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
16
keyboards/xelus/xs60/hotswap/readme.md
Normal file
16
keyboards/xelus/xs60/hotswap/readme.md
Normal file
@ -0,0 +1,16 @@
|
||||
# XS60HS
|
||||
|
||||
XS60HS - ANSI, tsangan bottom row.
|
||||
|
||||
* Keyboard Maintainer: [Xelus22](https://github.com/Xelus22)
|
||||
* Hardware Supported: Group buys
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make xelus/xs60/hotswap:default
|
||||
|
||||
Reset your keyboard in 3 ways:
|
||||
* Bootmagic reset: hold down the top left key (usually ESC) and plugin the keyboard
|
||||
* Physical reset button: on the back of the PCB, there should be a small golden button you can press
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
27
keyboards/xelus/xs60/hotswap/rules.mk
Normal file
27
keyboards/xelus/xs60/hotswap/rules.mk
Normal file
@ -0,0 +1,27 @@
|
||||
# MCU name
|
||||
MCU = STM32L422
|
||||
|
||||
# Bootloader selection
|
||||
BOOTLOADER = stm32-dfu
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = yes # 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
|
||||
|
||||
EEPROM_DRIVER = i2c
|
||||
|
||||
RGBLIGHT_ENABLE = yes
|
||||
WS2812_DRIVER = bitbang
|
||||
|
||||
LTO_ENABLE = yes
|
||||
OPT = 2
|
||||
|
||||
# LAYOUTS = LAYOUT_60_ansi_tsangan_split_rshift
|
50
keyboards/xelus/xs60/soldered/config.h
Normal file
50
keyboards/xelus/xs60/soldered/config.h
Normal file
@ -0,0 +1,50 @@
|
||||
/* Copyright 2022 Harrison Chan (Xelus)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
// I2C setup
|
||||
#define I2C1_SCL_PAL_MODE 4
|
||||
#define I2C1_SDA_PAL_MODE 4
|
||||
#define I2C1_TIMINGR_PRESC 0U
|
||||
#define I2C1_TIMINGR_SCLDEL 7U
|
||||
#define I2C1_TIMINGR_SDADEL 0U
|
||||
#define I2C1_TIMINGR_SCLH 45U
|
||||
#define I2C1_TIMINGR_SCLL 149U
|
||||
|
||||
// I2C EEPROM
|
||||
#define EEPROM_I2C_24LC64
|
||||
|
||||
// More EEPROM for layers
|
||||
|
||||
// RGBLIGHT
|
||||
#define RGB_DI_PIN A10
|
||||
#define RGBLED_NUM 8 // actually only has 1
|
||||
#define RGBLIGHT_LAYERS
|
||||
#define WS2812_EXTERNAL_PULLUP
|
||||
#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF
|
||||
|
||||
// Bitbang WS2812
|
||||
#define NOP_FUDGE 0.4
|
22
keyboards/xelus/xs60/soldered/halconf.h
Normal file
22
keyboards/xelus/xs60/soldered/halconf.h
Normal file
@ -0,0 +1,22 @@
|
||||
/* Copyright 2022 Harrison Chan (Xelus)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define HAL_USE_I2C TRUE
|
||||
|
||||
#include_next <halconf.h>
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"keyboard_name": "XS60",
|
||||
"keyboard_name": "XS60 Soldered",
|
||||
"manufacturer": "Xelus",
|
||||
"url": "",
|
||||
"maintainer": "Xelus22",
|
||||
@ -8,6 +8,11 @@
|
||||
"pid": "0x5860",
|
||||
"device_version": "0.0.1"
|
||||
},
|
||||
"diode_direction": "COL2ROW",
|
||||
"matrix_pins": {
|
||||
"cols": ["B0", "B1", "A8", "A9", "B5", "A6", "C14", "C15", "A0", "A5", "A4", "A3", "A2", "A1"],
|
||||
"rows": ["B4", "B3", "A15", "A14", "A7"]
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT_60_ansi_split_bs_rshift": {
|
||||
"layout": [
|
@ -1,4 +1,4 @@
|
||||
/* Copyright 2021 Harrison Chan (Xelus)
|
||||
/* Copyright 2022 Harrison Chan (Xelus)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -36,3 +36,47 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
#ifdef RGBLIGHT_LAYERS
|
||||
const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, 1, HSV_ORANGE}
|
||||
);
|
||||
|
||||
const rgblight_segment_t PROGMEM my_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, 1, HSV_CYAN}
|
||||
);
|
||||
|
||||
const rgblight_segment_t PROGMEM my_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, 1, HSV_PURPLE}
|
||||
);
|
||||
|
||||
const rgblight_segment_t PROGMEM my_layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, 1, HSV_GREEN}
|
||||
);
|
||||
|
||||
// Now define the array of layers. Later layers take precedence
|
||||
const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
|
||||
my_capslock_layer,
|
||||
my_layer1_layer, // Overrides caps lock layer
|
||||
my_layer2_layer, // Overrides other layers
|
||||
my_layer3_layer // Overrides other layers
|
||||
);
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
// Enable the LED layers
|
||||
rgblight_layers = my_rgb_layers;
|
||||
}
|
||||
|
||||
bool led_update_user(led_t led_state) {
|
||||
rgblight_set_layer_state(0, led_state.caps_lock);
|
||||
return true;
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
rgblight_set_layer_state(1, layer_state_cmp(state, 1));
|
||||
rgblight_set_layer_state(2, layer_state_cmp(state, 2));
|
||||
rgblight_set_layer_state(3, layer_state_cmp(state, 3));
|
||||
return state;
|
||||
}
|
||||
#endif
|
19
keyboards/xelus/xs60/soldered/keymaps/via/config.h
Normal file
19
keyboards/xelus/xs60/soldered/keymaps/via/config.h
Normal file
@ -0,0 +1,19 @@
|
||||
/* Copyright 2022 Harrison Chan (Xelus)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
// More layers
|
||||
#define DYNAMIC_KEYMAP_LAYER_COUNT 8
|
@ -1,4 +1,4 @@
|
||||
/* Copyright 2021 Harrison Chan (Xelus)
|
||||
/* Copyright 2022 Harrison Chan (Xelus)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -83,3 +83,47 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
#ifdef RGBLIGHT_LAYERS
|
||||
const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, 1, HSV_ORANGE}
|
||||
);
|
||||
|
||||
const rgblight_segment_t PROGMEM my_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, 1, HSV_CYAN}
|
||||
);
|
||||
|
||||
const rgblight_segment_t PROGMEM my_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, 1, HSV_PURPLE}
|
||||
);
|
||||
|
||||
const rgblight_segment_t PROGMEM my_layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, 1, HSV_GREEN}
|
||||
);
|
||||
|
||||
// Now define the array of layers. Later layers take precedence
|
||||
const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
|
||||
my_capslock_layer,
|
||||
my_layer1_layer, // Overrides caps lock layer
|
||||
my_layer2_layer, // Overrides other layers
|
||||
my_layer3_layer // Overrides other layers
|
||||
);
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
// Enable the LED layers
|
||||
rgblight_layers = my_rgb_layers;
|
||||
}
|
||||
|
||||
bool led_update_user(led_t led_state) {
|
||||
rgblight_set_layer_state(0, led_state.caps_lock);
|
||||
return true;
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
rgblight_set_layer_state(1, layer_state_cmp(state, 1));
|
||||
rgblight_set_layer_state(2, layer_state_cmp(state, 2));
|
||||
rgblight_set_layer_state(3, layer_state_cmp(state, 3));
|
||||
return state;
|
||||
}
|
||||
#endif
|
1
keyboards/xelus/xs60/soldered/keymaps/via/rules.mk
Normal file
1
keyboards/xelus/xs60/soldered/keymaps/via/rules.mk
Normal file
@ -0,0 +1 @@
|
||||
VIA_ENABLE = yes
|
23
keyboards/xelus/xs60/soldered/mcuconf.h
Normal file
23
keyboards/xelus/xs60/soldered/mcuconf.h
Normal file
@ -0,0 +1,23 @@
|
||||
/* Copyright 2022 Harrison Chan (Xelus)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_I2C_USE_I2C1
|
||||
#define STM32_I2C_USE_I2C1 TRUE
|
||||
|
@ -1,4 +1,4 @@
|
||||
# XS60
|
||||
# XS60 Soldered
|
||||
|
||||
XS60 ANSI, normal + tsangan bottom row.
|
||||
|
||||
@ -7,10 +7,9 @@ XS60 ANSI, normal + tsangan bottom row.
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make xelus/xs60:default
|
||||
make xelus/xs60/soldered:default
|
||||
|
||||
Reset your keyboard in 3 ways:
|
||||
* Software reset on Fn + Backspace
|
||||
* Bootmagic reset: hold down the top left key (usually ESC) and plugin the keyboard
|
||||
* Physical reset button: on the back of the PCB, there should be a small golden button you can press
|
||||
|
@ -18,6 +18,9 @@ AUDIO_ENABLE = no # Audio output
|
||||
|
||||
EEPROM_DRIVER = i2c
|
||||
|
||||
RGBLIGHT_ENABLE = yes
|
||||
WS2812_DRIVER = bitbang
|
||||
|
||||
LTO_ENABLE = yes
|
||||
OPT = 2
|
||||
|
20
keyboards/xelus/xs60/soldered/soldered.c
Normal file
20
keyboards/xelus/xs60/soldered/soldered.c
Normal file
@ -0,0 +1,20 @@
|
||||
/* Copyright 2022 Harrison Chan (Xelus)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "soldered.h"
|
||||
|
||||
// tested and working
|
||||
void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); }
|
@ -1,4 +1,4 @@
|
||||
/* Copyright 2021 Harrison Chan (Xelus)
|
||||
/* Copyright 2022 Harrison Chan (Xelus)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
Loading…
Reference in New Issue
Block a user