@ -0,0 +1,46 @@ | |||
/* Copyright 2023 CMM.S Freather | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General 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 "quantum.h" | |||
const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( | |||
{0, 13, HSV_WHITE} | |||
); | |||
const rgblight_segment_t PROGMEM my_capsoff_layer[] = RGBLIGHT_LAYER_SEGMENTS( | |||
{0, 1, HSV_BLACK} | |||
); | |||
// 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_capsoff_layer | |||
); | |||
void keyboard_post_init_kb(void){ | |||
rgblight_layers = my_rgb_layers; | |||
keyboard_post_init_user(); | |||
} | |||
bool led_update_kb(led_t led_state){ | |||
bool res = led_update_user(led_state); | |||
if (res) { | |||
rgblight_set_layer_state(0, led_state.caps_lock); | |||
rgblight_set_layer_state(1, !led_state.caps_lock); | |||
} | |||
return res; | |||
} |
@ -0,0 +1,699 @@ | |||
{ | |||
"manufacturer": "Freather", | |||
"keyboard_name": "Atelier_Haven Haven60", | |||
"maintainer": "Freather", | |||
"bootloader": "atmel-dfu", | |||
"diode_direction": "COL2ROW", | |||
"features": { | |||
"bootmagic": true, | |||
"extrakey": true, | |||
"mousekey": true, | |||
"nkro": true, | |||
"rgblight": true | |||
}, | |||
"matrix_pins": { | |||
"cols": ["C7", "D4", "D6", "D7", "B4", "B5", "B6", "D5", "D3", "D2", "D1", "D0", "B1", "B0"], | |||
"rows": ["F0", "E6", "C6", "F4", "F1"] | |||
}, | |||
"processor": "atmega32u4", | |||
"url": "https://keyspensory.store/products", | |||
"usb": { | |||
"device_version": "1.0.0", | |||
"pid": "0x4660", | |||
"vid": "0x4446" | |||
}, | |||
"ws2812": { | |||
"pin": "F5" | |||
}, | |||
"rgblight": { | |||
"led_count": 13, | |||
"saturation_steps": 8, | |||
"brightness_steps": 8, | |||
"sleep": true, | |||
"max_brightness": 125, | |||
"layers": { | |||
"enabled": true | |||
}, | |||
"animations": { | |||
"alternating": true, | |||
"breathing": true, | |||
"christmas": true, | |||
"knight": true, | |||
"rainbow_mood": true, | |||
"rainbow_swirl": true, | |||
"snake": true, | |||
"static_gradient": true, | |||
"twinkle": true | |||
} | |||
}, | |||
"community_layouts": ["60_ansi_tsangan", "60_tsangan_hhkb", "60_ansi_wkl", "60_ansi_wkl_split_bs_rshift", "60_hhkb", "60_iso_tsangan", "60_iso_tsangan_split_bs_rshift", "60_iso_wkl", "60_iso_wkl_split_bs_rshift"], | |||
"layouts": { | |||
"LAYOUT_all": { | |||
"layout": [ | |||
{"matrix": [0, 0], "x": 0, "y": 0}, | |||
{"matrix": [0, 1], "x": 1, "y": 0}, | |||
{"matrix": [0, 2], "x": 2, "y": 0}, | |||
{"matrix": [0, 3], "x": 3, "y": 0}, | |||
{"matrix": [0, 4], "x": 4, "y": 0}, | |||
{"matrix": [0, 5], "x": 5, "y": 0}, | |||
{"matrix": [0, 6], "x": 6, "y": 0}, | |||
{"matrix": [0, 7], "x": 7, "y": 0}, | |||
{"matrix": [0, 8], "x": 8, "y": 0}, | |||
{"matrix": [0, 9], "x": 9, "y": 0}, | |||
{"matrix": [0, 10], "x": 10, "y": 0}, | |||
{"matrix": [0, 11], "x": 11, "y": 0}, | |||
{"matrix": [0, 12], "x": 12, "y": 0}, | |||
{"matrix": [0, 13], "x": 13, "y": 0}, | |||
{"matrix": [2, 12], "x": 14, "y": 0}, | |||
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, | |||
{"matrix": [1, 1], "x": 1.5, "y": 1}, | |||
{"matrix": [1, 2], "x": 2.5, "y": 1}, | |||
{"matrix": [1, 3], "x": 3.5, "y": 1}, | |||
{"matrix": [1, 4], "x": 4.5, "y": 1}, | |||
{"matrix": [1, 5], "x": 5.5, "y": 1}, | |||
{"matrix": [1, 6], "x": 6.5, "y": 1}, | |||
{"matrix": [1, 7], "x": 7.5, "y": 1}, | |||
{"matrix": [1, 8], "x": 8.5, "y": 1}, | |||
{"matrix": [1, 9], "x": 9.5, "y": 1}, | |||
{"matrix": [1, 10], "x": 10.5, "y": 1}, | |||
{"matrix": [1, 11], "x": 11.5, "y": 1}, | |||
{"matrix": [1, 12], "x": 12.5, "y": 1}, | |||
{"matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, | |||
{"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, | |||
{"matrix": [2, 1], "x": 1.75, "y": 2}, | |||
{"matrix": [2, 2], "x": 2.75, "y": 2}, | |||
{"matrix": [2, 3], "x": 3.75, "y": 2}, | |||
{"matrix": [2, 4], "x": 4.75, "y": 2}, | |||
{"matrix": [2, 5], "x": 5.75, "y": 2}, | |||
{"matrix": [2, 6], "x": 6.75, "y": 2}, | |||
{"matrix": [2, 7], "x": 7.75, "y": 2}, | |||
{"matrix": [2, 8], "x": 8.75, "y": 2}, | |||
{"matrix": [2, 9], "x": 9.75, "y": 2}, | |||
{"matrix": [2, 10], "x": 10.75, "y": 2}, | |||
{"matrix": [2, 11], "x": 11.75, "y": 2}, | |||
{"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25}, | |||
{"matrix": [3, 0], "x": 0, "y": 3, "w": 1.25}, | |||
{"matrix": [3, 1], "x": 1.25, "y": 3}, | |||
{"matrix": [3, 2], "x": 2.25, "y": 3}, | |||
{"matrix": [3, 3], "x": 3.25, "y": 3}, | |||
{"matrix": [3, 4], "x": 4.25, "y": 3}, | |||
{"matrix": [3, 5], "x": 5.25, "y": 3}, | |||
{"matrix": [3, 6], "x": 6.25, "y": 3}, | |||
{"matrix": [3, 7], "x": 7.25, "y": 3}, | |||
{"matrix": [3, 8], "x": 8.25, "y": 3}, | |||
{"matrix": [3, 9], "x": 9.25, "y": 3}, | |||
{"matrix": [3, 10], "x": 10.25, "y": 3}, | |||
{"matrix": [3, 11], "x": 11.25, "y": 3}, | |||
{"matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, | |||
{"matrix": [3, 13], "x": 14, "y": 3}, | |||
{"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 1], "x": 1.5, "y": 4}, | |||
{"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 6], "x": 4, "y": 4, "w": 7}, | |||
{"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 12], "x": 12.5, "y": 4}, | |||
{"matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5} | |||
] | |||
}, | |||
"LAYOUT_60_ansi_tsangan": { | |||
"layout": [ | |||
{"matrix": [0, 0], "x": 0, "y": 0}, | |||
{"matrix": [0, 1], "x": 1, "y": 0}, | |||
{"matrix": [0, 2], "x": 2, "y": 0}, | |||
{"matrix": [0, 3], "x": 3, "y": 0}, | |||
{"matrix": [0, 4], "x": 4, "y": 0}, | |||
{"matrix": [0, 5], "x": 5, "y": 0}, | |||
{"matrix": [0, 6], "x": 6, "y": 0}, | |||
{"matrix": [0, 7], "x": 7, "y": 0}, | |||
{"matrix": [0, 8], "x": 8, "y": 0}, | |||
{"matrix": [0, 9], "x": 9, "y": 0}, | |||
{"matrix": [0, 10], "x": 10, "y": 0}, | |||
{"matrix": [0, 11], "x": 11, "y": 0}, | |||
{"matrix": [0, 12], "x": 12, "y": 0}, | |||
{"matrix": [0, 13], "x": 13, "y": 0, "w": 2}, | |||
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, | |||
{"matrix": [1, 1], "x": 1.5, "y": 1}, | |||
{"matrix": [1, 2], "x": 2.5, "y": 1}, | |||
{"matrix": [1, 3], "x": 3.5, "y": 1}, | |||
{"matrix": [1, 4], "x": 4.5, "y": 1}, | |||
{"matrix": [1, 5], "x": 5.5, "y": 1}, | |||
{"matrix": [1, 6], "x": 6.5, "y": 1}, | |||
{"matrix": [1, 7], "x": 7.5, "y": 1}, | |||
{"matrix": [1, 8], "x": 8.5, "y": 1}, | |||
{"matrix": [1, 9], "x": 9.5, "y": 1}, | |||
{"matrix": [1, 10], "x": 10.5, "y": 1}, | |||
{"matrix": [1, 11], "x": 11.5, "y": 1}, | |||
{"matrix": [1, 12], "x": 12.5, "y": 1}, | |||
{"matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, | |||
{"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, | |||
{"matrix": [2, 1], "x": 1.75, "y": 2}, | |||
{"matrix": [2, 2], "x": 2.75, "y": 2}, | |||
{"matrix": [2, 3], "x": 3.75, "y": 2}, | |||
{"matrix": [2, 4], "x": 4.75, "y": 2}, | |||
{"matrix": [2, 5], "x": 5.75, "y": 2}, | |||
{"matrix": [2, 6], "x": 6.75, "y": 2}, | |||
{"matrix": [2, 7], "x": 7.75, "y": 2}, | |||
{"matrix": [2, 8], "x": 8.75, "y": 2}, | |||
{"matrix": [2, 9], "x": 9.75, "y": 2}, | |||
{"matrix": [2, 10], "x": 10.75, "y": 2}, | |||
{"matrix": [2, 11], "x": 11.75, "y": 2}, | |||
{"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25}, | |||
{"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, | |||
{"matrix": [3, 2], "x": 2.25, "y": 3}, | |||
{"matrix": [3, 3], "x": 3.25, "y": 3}, | |||
{"matrix": [3, 4], "x": 4.25, "y": 3}, | |||
{"matrix": [3, 5], "x": 5.25, "y": 3}, | |||
{"matrix": [3, 6], "x": 6.25, "y": 3}, | |||
{"matrix": [3, 7], "x": 7.25, "y": 3}, | |||
{"matrix": [3, 8], "x": 8.25, "y": 3}, | |||
{"matrix": [3, 9], "x": 9.25, "y": 3}, | |||
{"matrix": [3, 10], "x": 10.25, "y": 3}, | |||
{"matrix": [3, 11], "x": 11.25, "y": 3}, | |||
{"matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75}, | |||
{"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 1], "x": 1.5, "y": 4}, | |||
{"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 6], "x": 4, "y": 4, "w": 7}, | |||
{"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 12], "x": 12.5, "y": 4}, | |||
{"matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5} | |||
] | |||
}, | |||
"LAYOUT_60_tsangan_hhkb": { | |||
"layout": [ | |||
{"matrix": [0, 0], "x": 0, "y": 0}, | |||
{"matrix": [0, 1], "x": 1, "y": 0}, | |||
{"matrix": [0, 2], "x": 2, "y": 0}, | |||
{"matrix": [0, 3], "x": 3, "y": 0}, | |||
{"matrix": [0, 4], "x": 4, "y": 0}, | |||
{"matrix": [0, 5], "x": 5, "y": 0}, | |||
{"matrix": [0, 6], "x": 6, "y": 0}, | |||
{"matrix": [0, 7], "x": 7, "y": 0}, | |||
{"matrix": [0, 8], "x": 8, "y": 0}, | |||
{"matrix": [0, 9], "x": 9, "y": 0}, | |||
{"matrix": [0, 10], "x": 10, "y": 0}, | |||
{"matrix": [0, 11], "x": 11, "y": 0}, | |||
{"matrix": [0, 12], "x": 12, "y": 0}, | |||
{"matrix": [0, 13], "x": 13, "y": 0}, | |||
{"matrix": [2, 12], "x": 14, "y": 0}, | |||
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, | |||
{"matrix": [1, 1], "x": 1.5, "y": 1}, | |||
{"matrix": [1, 2], "x": 2.5, "y": 1}, | |||
{"matrix": [1, 3], "x": 3.5, "y": 1}, | |||
{"matrix": [1, 4], "x": 4.5, "y": 1}, | |||
{"matrix": [1, 5], "x": 5.5, "y": 1}, | |||
{"matrix": [1, 6], "x": 6.5, "y": 1}, | |||
{"matrix": [1, 7], "x": 7.5, "y": 1}, | |||
{"matrix": [1, 8], "x": 8.5, "y": 1}, | |||
{"matrix": [1, 9], "x": 9.5, "y": 1}, | |||
{"matrix": [1, 10], "x": 10.5, "y": 1}, | |||
{"matrix": [1, 11], "x": 11.5, "y": 1}, | |||
{"matrix": [1, 12], "x": 12.5, "y": 1}, | |||
{"matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, | |||
{"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, | |||
{"matrix": [2, 1], "x": 1.75, "y": 2}, | |||
{"matrix": [2, 2], "x": 2.75, "y": 2}, | |||
{"matrix": [2, 3], "x": 3.75, "y": 2}, | |||
{"matrix": [2, 4], "x": 4.75, "y": 2}, | |||
{"matrix": [2, 5], "x": 5.75, "y": 2}, | |||
{"matrix": [2, 6], "x": 6.75, "y": 2}, | |||
{"matrix": [2, 7], "x": 7.75, "y": 2}, | |||
{"matrix": [2, 8], "x": 8.75, "y": 2}, | |||
{"matrix": [2, 9], "x": 9.75, "y": 2}, | |||
{"matrix": [2, 10], "x": 10.75, "y": 2}, | |||
{"matrix": [2, 11], "x": 11.75, "y": 2}, | |||
{"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25}, | |||
{"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, | |||
{"matrix": [3, 2], "x": 2.25, "y": 3}, | |||
{"matrix": [3, 3], "x": 3.25, "y": 3}, | |||
{"matrix": [3, 4], "x": 4.25, "y": 3}, | |||
{"matrix": [3, 5], "x": 5.25, "y": 3}, | |||
{"matrix": [3, 6], "x": 6.25, "y": 3}, | |||
{"matrix": [3, 7], "x": 7.25, "y": 3}, | |||
{"matrix": [3, 8], "x": 8.25, "y": 3}, | |||
{"matrix": [3, 9], "x": 9.25, "y": 3}, | |||
{"matrix": [3, 10], "x": 10.25, "y": 3}, | |||
{"matrix": [3, 11], "x": 11.25, "y": 3}, | |||
{"matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, | |||
{"matrix": [3, 13], "x": 14, "y": 3}, | |||
{"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 1], "x": 1.5, "y": 4}, | |||
{"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 6], "x": 4, "y": 4, "w": 7}, | |||
{"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 12], "x": 12.5, "y": 4}, | |||
{"matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5} | |||
] | |||
}, | |||
"LAYOUT_60_ansi_wkl": { | |||
"layout": [ | |||
{"matrix": [0, 0], "x": 0, "y": 0}, | |||
{"matrix": [0, 1], "x": 1, "y": 0}, | |||
{"matrix": [0, 2], "x": 2, "y": 0}, | |||
{"matrix": [0, 3], "x": 3, "y": 0}, | |||
{"matrix": [0, 4], "x": 4, "y": 0}, | |||
{"matrix": [0, 5], "x": 5, "y": 0}, | |||
{"matrix": [0, 6], "x": 6, "y": 0}, | |||
{"matrix": [0, 7], "x": 7, "y": 0}, | |||
{"matrix": [0, 8], "x": 8, "y": 0}, | |||
{"matrix": [0, 9], "x": 9, "y": 0}, | |||
{"matrix": [0, 10], "x": 10, "y": 0}, | |||
{"matrix": [0, 11], "x": 11, "y": 0}, | |||
{"matrix": [0, 12], "x": 12, "y": 0}, | |||
{"matrix": [0, 13], "x": 13, "y": 0, "w": 2}, | |||
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, | |||
{"matrix": [1, 1], "x": 1.5, "y": 1}, | |||
{"matrix": [1, 2], "x": 2.5, "y": 1}, | |||
{"matrix": [1, 3], "x": 3.5, "y": 1}, | |||
{"matrix": [1, 4], "x": 4.5, "y": 1}, | |||
{"matrix": [1, 5], "x": 5.5, "y": 1}, | |||
{"matrix": [1, 6], "x": 6.5, "y": 1}, | |||
{"matrix": [1, 7], "x": 7.5, "y": 1}, | |||
{"matrix": [1, 8], "x": 8.5, "y": 1}, | |||
{"matrix": [1, 9], "x": 9.5, "y": 1}, | |||
{"matrix": [1, 10], "x": 10.5, "y": 1}, | |||
{"matrix": [1, 11], "x": 11.5, "y": 1}, | |||
{"matrix": [1, 12], "x": 12.5, "y": 1}, | |||
{"matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, | |||
{"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, | |||
{"matrix": [2, 1], "x": 1.75, "y": 2}, | |||
{"matrix": [2, 2], "x": 2.75, "y": 2}, | |||
{"matrix": [2, 3], "x": 3.75, "y": 2}, | |||
{"matrix": [2, 4], "x": 4.75, "y": 2}, | |||
{"matrix": [2, 5], "x": 5.75, "y": 2}, | |||
{"matrix": [2, 6], "x": 6.75, "y": 2}, | |||
{"matrix": [2, 7], "x": 7.75, "y": 2}, | |||
{"matrix": [2, 8], "x": 8.75, "y": 2}, | |||
{"matrix": [2, 9], "x": 9.75, "y": 2}, | |||
{"matrix": [2, 10], "x": 10.75, "y": 2}, | |||
{"matrix": [2, 11], "x": 11.75, "y": 2}, | |||
{"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25}, | |||
{"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, | |||
{"matrix": [3, 2], "x": 2.25, "y": 3}, | |||
{"matrix": [3, 3], "x": 3.25, "y": 3}, | |||
{"matrix": [3, 4], "x": 4.25, "y": 3}, | |||
{"matrix": [3, 5], "x": 5.25, "y": 3}, | |||
{"matrix": [3, 6], "x": 6.25, "y": 3}, | |||
{"matrix": [3, 7], "x": 7.25, "y": 3}, | |||
{"matrix": [3, 8], "x": 8.25, "y": 3}, | |||
{"matrix": [3, 9], "x": 9.25, "y": 3}, | |||
{"matrix": [3, 10], "x": 10.25, "y": 3}, | |||
{"matrix": [3, 11], "x": 11.25, "y": 3}, | |||
{"matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75}, | |||
{"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 6], "x": 4, "y": 4, "w": 7}, | |||
{"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5} | |||
] | |||
}, | |||
"LAYOUT_60_ansi_wkl_split_bs_rshift": { | |||
"layout": [ | |||
{"matrix": [0, 0], "x": 0, "y": 0}, | |||
{"matrix": [0, 1], "x": 1, "y": 0}, | |||
{"matrix": [0, 2], "x": 2, "y": 0}, | |||
{"matrix": [0, 3], "x": 3, "y": 0}, | |||
{"matrix": [0, 4], "x": 4, "y": 0}, | |||
{"matrix": [0, 5], "x": 5, "y": 0}, | |||
{"matrix": [0, 6], "x": 6, "y": 0}, | |||
{"matrix": [0, 7], "x": 7, "y": 0}, | |||
{"matrix": [0, 8], "x": 8, "y": 0}, | |||
{"matrix": [0, 9], "x": 9, "y": 0}, | |||
{"matrix": [0, 10], "x": 10, "y": 0}, | |||
{"matrix": [0, 11], "x": 11, "y": 0}, | |||
{"matrix": [0, 12], "x": 12, "y": 0}, | |||
{"matrix": [0, 13], "x": 13, "y": 0}, | |||
{"matrix": [2, 12], "x": 14, "y": 0}, | |||
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, | |||
{"matrix": [1, 1], "x": 1.5, "y": 1}, | |||
{"matrix": [1, 2], "x": 2.5, "y": 1}, | |||
{"matrix": [1, 3], "x": 3.5, "y": 1}, | |||
{"matrix": [1, 4], "x": 4.5, "y": 1}, | |||
{"matrix": [1, 5], "x": 5.5, "y": 1}, | |||
{"matrix": [1, 6], "x": 6.5, "y": 1}, | |||
{"matrix": [1, 7], "x": 7.5, "y": 1}, | |||
{"matrix": [1, 8], "x": 8.5, "y": 1}, | |||
{"matrix": [1, 9], "x": 9.5, "y": 1}, | |||
{"matrix": [1, 10], "x": 10.5, "y": 1}, | |||
{"matrix": [1, 11], "x": 11.5, "y": 1}, | |||
{"matrix": [1, 12], "x": 12.5, "y": 1}, | |||
{"matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, | |||
{"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, | |||
{"matrix": [2, 1], "x": 1.75, "y": 2}, | |||
{"matrix": [2, 2], "x": 2.75, "y": 2}, | |||
{"matrix": [2, 3], "x": 3.75, "y": 2}, | |||
{"matrix": [2, 4], "x": 4.75, "y": 2}, | |||
{"matrix": [2, 5], "x": 5.75, "y": 2}, | |||
{"matrix": [2, 6], "x": 6.75, "y": 2}, | |||
{"matrix": [2, 7], "x": 7.75, "y": 2}, | |||
{"matrix": [2, 8], "x": 8.75, "y": 2}, | |||
{"matrix": [2, 9], "x": 9.75, "y": 2}, | |||
{"matrix": [2, 10], "x": 10.75, "y": 2}, | |||
{"matrix": [2, 11], "x": 11.75, "y": 2}, | |||
{"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25}, | |||
{"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, | |||
{"matrix": [3, 2], "x": 2.25, "y": 3}, | |||
{"matrix": [3, 3], "x": 3.25, "y": 3}, | |||
{"matrix": [3, 4], "x": 4.25, "y": 3}, | |||
{"matrix": [3, 5], "x": 5.25, "y": 3}, | |||
{"matrix": [3, 6], "x": 6.25, "y": 3}, | |||
{"matrix": [3, 7], "x": 7.25, "y": 3}, | |||
{"matrix": [3, 8], "x": 8.25, "y": 3}, | |||
{"matrix": [3, 9], "x": 9.25, "y": 3}, | |||
{"matrix": [3, 10], "x": 10.25, "y": 3}, | |||
{"matrix": [3, 11], "x": 11.25, "y": 3}, | |||
{"matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, | |||
{"matrix": [3, 13], "x": 14, "y": 3}, | |||
{"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 6], "x": 4, "y": 4, "w": 7}, | |||
{"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5} | |||
] | |||
}, | |||
"LAYOUT_60_hhkb": { | |||
"layout": [ | |||
{"matrix": [0, 0], "x": 0, "y": 0}, | |||
{"matrix": [0, 1], "x": 1, "y": 0}, | |||
{"matrix": [0, 2], "x": 2, "y": 0}, | |||
{"matrix": [0, 3], "x": 3, "y": 0}, | |||
{"matrix": [0, 4], "x": 4, "y": 0}, | |||
{"matrix": [0, 5], "x": 5, "y": 0}, | |||
{"matrix": [0, 6], "x": 6, "y": 0}, | |||
{"matrix": [0, 7], "x": 7, "y": 0}, | |||
{"matrix": [0, 8], "x": 8, "y": 0}, | |||
{"matrix": [0, 9], "x": 9, "y": 0}, | |||
{"matrix": [0, 10], "x": 10, "y": 0}, | |||
{"matrix": [0, 11], "x": 11, "y": 0}, | |||
{"matrix": [0, 12], "x": 12, "y": 0}, | |||
{"matrix": [0, 13], "x": 13, "y": 0}, | |||
{"matrix": [2, 12], "x": 14, "y": 0}, | |||
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, | |||
{"matrix": [1, 1], "x": 1.5, "y": 1}, | |||
{"matrix": [1, 2], "x": 2.5, "y": 1}, | |||
{"matrix": [1, 3], "x": 3.5, "y": 1}, | |||
{"matrix": [1, 4], "x": 4.5, "y": 1}, | |||
{"matrix": [1, 5], "x": 5.5, "y": 1}, | |||
{"matrix": [1, 6], "x": 6.5, "y": 1}, | |||
{"matrix": [1, 7], "x": 7.5, "y": 1}, | |||
{"matrix": [1, 8], "x": 8.5, "y": 1}, | |||
{"matrix": [1, 9], "x": 9.5, "y": 1}, | |||
{"matrix": [1, 10], "x": 10.5, "y": 1}, | |||
{"matrix": [1, 11], "x": 11.5, "y": 1}, | |||
{"matrix": [1, 12], "x": 12.5, "y": 1}, | |||
{"matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, | |||
{"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, | |||
{"matrix": [2, 1], "x": 1.75, "y": 2}, | |||
{"matrix": [2, 2], "x": 2.75, "y": 2}, | |||
{"matrix": [2, 3], "x": 3.75, "y": 2}, | |||
{"matrix": [2, 4], "x": 4.75, "y": 2}, | |||
{"matrix": [2, 5], "x": 5.75, "y": 2}, | |||
{"matrix": [2, 6], "x": 6.75, "y": 2}, | |||
{"matrix": [2, 7], "x": 7.75, "y": 2}, | |||
{"matrix": [2, 8], "x": 8.75, "y": 2}, | |||
{"matrix": [2, 9], "x": 9.75, "y": 2}, | |||
{"matrix": [2, 10], "x": 10.75, "y": 2}, | |||
{"matrix": [2, 11], "x": 11.75, "y": 2}, | |||
{"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25}, | |||
{"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, | |||
{"matrix": [3, 2], "x": 2.25, "y": 3}, | |||
{"matrix": [3, 3], "x": 3.25, "y": 3}, | |||
{"matrix": [3, 4], "x": 4.25, "y": 3}, | |||
{"matrix": [3, 5], "x": 5.25, "y": 3}, | |||
{"matrix": [3, 6], "x": 6.25, "y": 3}, | |||
{"matrix": [3, 7], "x": 7.25, "y": 3}, | |||
{"matrix": [3, 8], "x": 8.25, "y": 3}, | |||
{"matrix": [3, 9], "x": 9.25, "y": 3}, | |||
{"matrix": [3, 10], "x": 10.25, "y": 3}, | |||
{"matrix": [3, 11], "x": 11.25, "y": 3}, | |||
{"matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, | |||
{"matrix": [3, 13], "x": 14, "y": 3}, | |||
{"matrix": [4, 1], "x": 1.5, "y": 4}, | |||
{"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 6], "x": 4, "y": 4, "w": 7}, | |||
{"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 12], "x": 12.5, "y": 4} | |||
] | |||
}, | |||
"LAYOUT_60_iso_tsangan": { | |||
"layout": [ | |||
{"matrix": [0, 0], "x": 0, "y": 0}, | |||
{"matrix": [0, 1], "x": 1, "y": 0}, | |||
{"matrix": [0, 2], "x": 2, "y": 0}, | |||
{"matrix": [0, 3], "x": 3, "y": 0}, | |||
{"matrix": [0, 4], "x": 4, "y": 0}, | |||
{"matrix": [0, 5], "x": 5, "y": 0}, | |||
{"matrix": [0, 6], "x": 6, "y": 0}, | |||
{"matrix": [0, 7], "x": 7, "y": 0}, | |||
{"matrix": [0, 8], "x": 8, "y": 0}, | |||
{"matrix": [0, 9], "x": 9, "y": 0}, | |||
{"matrix": [0, 10], "x": 10, "y": 0}, | |||
{"matrix": [0, 11], "x": 11, "y": 0}, | |||
{"matrix": [0, 12], "x": 12, "y": 0}, | |||
{"matrix": [0, 13], "x": 13, "y": 0, "w": 2}, | |||
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, | |||
{"matrix": [1, 1], "x": 1.5, "y": 1}, | |||
{"matrix": [1, 2], "x": 2.5, "y": 1}, | |||
{"matrix": [1, 3], "x": 3.5, "y": 1}, | |||
{"matrix": [1, 4], "x": 4.5, "y": 1}, | |||
{"matrix": [1, 5], "x": 5.5, "y": 1}, | |||
{"matrix": [1, 6], "x": 6.5, "y": 1}, | |||
{"matrix": [1, 7], "x": 7.5, "y": 1}, | |||
{"matrix": [1, 8], "x": 8.5, "y": 1}, | |||
{"matrix": [1, 9], "x": 9.5, "y": 1}, | |||
{"matrix": [1, 10], "x": 10.5, "y": 1}, | |||
{"matrix": [1, 11], "x": 11.5, "y": 1}, | |||
{"matrix": [1, 12], "x": 12.5, "y": 1}, | |||
{"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, | |||
{"matrix": [2, 1], "x": 1.75, "y": 2}, | |||
{"matrix": [2, 2], "x": 2.75, "y": 2}, | |||
{"matrix": [2, 3], "x": 3.75, "y": 2}, | |||
{"matrix": [2, 4], "x": 4.75, "y": 2}, | |||
{"matrix": [2, 5], "x": 5.75, "y": 2}, | |||
{"matrix": [2, 6], "x": 6.75, "y": 2}, | |||
{"matrix": [2, 7], "x": 7.75, "y": 2}, | |||
{"matrix": [2, 8], "x": 8.75, "y": 2}, | |||
{"matrix": [2, 9], "x": 9.75, "y": 2}, | |||
{"matrix": [2, 10], "x": 10.75, "y": 2}, | |||
{"matrix": [2, 11], "x": 11.75, "y": 2}, | |||
{"matrix": [1, 13], "x": 12.75, "y": 2}, | |||
{"matrix": [2, 13], "x": 13.75, "y": 1, "w": 1.25, "h": 2}, | |||
{"matrix": [3, 0], "x": 0, "y": 3, "w": 1.25}, | |||
{"matrix": [3, 1], "x": 1.25, "y": 3}, | |||
{"matrix": [3, 2], "x": 2.25, "y": 3}, | |||
{"matrix": [3, 3], "x": 3.25, "y": 3}, | |||
{"matrix": [3, 4], "x": 4.25, "y": 3}, | |||
{"matrix": [3, 5], "x": 5.25, "y": 3}, | |||
{"matrix": [3, 6], "x": 6.25, "y": 3}, | |||
{"matrix": [3, 7], "x": 7.25, "y": 3}, | |||
{"matrix": [3, 8], "x": 8.25, "y": 3}, | |||
{"matrix": [3, 9], "x": 9.25, "y": 3}, | |||
{"matrix": [3, 10], "x": 10.25, "y": 3}, | |||
{"matrix": [3, 11], "x": 11.25, "y": 3}, | |||
{"matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75}, | |||
{"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 1], "x": 1.5, "y": 4}, | |||
{"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 6], "x": 4, "y": 4, "w": 7}, | |||
{"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 12], "x": 12.5, "y": 4}, | |||
{"matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5} | |||
] | |||
}, | |||
"LAYOUT_60_iso_tsangan_split_bs_rshift": { | |||
"layout": [ | |||
{"matrix": [0, 0], "x": 0, "y": 0}, | |||
{"matrix": [0, 1], "x": 1, "y": 0}, | |||
{"matrix": [0, 2], "x": 2, "y": 0}, | |||
{"matrix": [0, 3], "x": 3, "y": 0}, | |||
{"matrix": [0, 4], "x": 4, "y": 0}, | |||
{"matrix": [0, 5], "x": 5, "y": 0}, | |||
{"matrix": [0, 6], "x": 6, "y": 0}, | |||
{"matrix": [0, 7], "x": 7, "y": 0}, | |||
{"matrix": [0, 8], "x": 8, "y": 0}, | |||
{"matrix": [0, 9], "x": 9, "y": 0}, | |||
{"matrix": [0, 10], "x": 10, "y": 0}, | |||
{"matrix": [0, 11], "x": 11, "y": 0}, | |||
{"matrix": [0, 12], "x": 12, "y": 0}, | |||
{"matrix": [0, 13], "x": 13, "y": 0}, | |||
{"matrix": [2, 12], "x": 14, "y": 0}, | |||
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, | |||
{"matrix": [1, 1], "x": 1.5, "y": 1}, | |||
{"matrix": [1, 2], "x": 2.5, "y": 1}, | |||
{"matrix": [1, 3], "x": 3.5, "y": 1}, | |||
{"matrix": [1, 4], "x": 4.5, "y": 1}, | |||
{"matrix": [1, 5], "x": 5.5, "y": 1}, | |||
{"matrix": [1, 6], "x": 6.5, "y": 1}, | |||
{"matrix": [1, 7], "x": 7.5, "y": 1}, | |||
{"matrix": [1, 8], "x": 8.5, "y": 1}, | |||
{"matrix": [1, 9], "x": 9.5, "y": 1}, | |||
{"matrix": [1, 10], "x": 10.5, "y": 1}, | |||
{"matrix": [1, 11], "x": 11.5, "y": 1}, | |||
{"matrix": [1, 12], "x": 12.5, "y": 1}, | |||
{"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, | |||
{"matrix": [2, 1], "x": 1.75, "y": 2}, | |||
{"matrix": [2, 2], "x": 2.75, "y": 2}, | |||
{"matrix": [2, 3], "x": 3.75, "y": 2}, | |||
{"matrix": [2, 4], "x": 4.75, "y": 2}, | |||
{"matrix": [2, 5], "x": 5.75, "y": 2}, | |||
{"matrix": [2, 6], "x": 6.75, "y": 2}, | |||
{"matrix": [2, 7], "x": 7.75, "y": 2}, | |||
{"matrix": [2, 8], "x": 8.75, "y": 2}, | |||
{"matrix": [2, 9], "x": 9.75, "y": 2}, | |||
{"matrix": [2, 10], "x": 10.75, "y": 2}, | |||
{"matrix": [2, 11], "x": 11.75, "y": 2}, | |||
{"matrix": [1, 13], "x": 12.75, "y": 2}, | |||
{"matrix": [2, 13], "x": 13.75, "y": 1, "w": 1.25, "h": 2}, | |||
{"matrix": [3, 0], "x": 0, "y": 3, "w": 1.25}, | |||
{"matrix": [3, 1], "x": 1.25, "y": 3}, | |||
{"matrix": [3, 2], "x": 2.25, "y": 3}, | |||
{"matrix": [3, 3], "x": 3.25, "y": 3}, | |||
{"matrix": [3, 4], "x": 4.25, "y": 3}, | |||
{"matrix": [3, 5], "x": 5.25, "y": 3}, | |||
{"matrix": [3, 6], "x": 6.25, "y": 3}, | |||
{"matrix": [3, 7], "x": 7.25, "y": 3}, | |||
{"matrix": [3, 8], "x": 8.25, "y": 3}, | |||
{"matrix": [3, 9], "x": 9.25, "y": 3}, | |||
{"matrix": [3, 10], "x": 10.25, "y": 3}, | |||
{"matrix": [3, 11], "x": 11.25, "y": 3}, | |||
{"matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, | |||
{"matrix": [3, 13], "x": 14, "y": 3}, | |||
{"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 1], "x": 1.5, "y": 4}, | |||
{"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 6], "x": 4, "y": 4, "w": 7}, | |||
{"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 12], "x": 12.5, "y": 4}, | |||
{"matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5} | |||
] | |||
}, | |||
"LAYOUT_60_iso_wkl": { | |||
"layout": [ | |||
{"matrix": [0, 0], "x": 0, "y": 0}, | |||
{"matrix": [0, 1], "x": 1, "y": 0}, | |||
{"matrix": [0, 2], "x": 2, "y": 0}, | |||
{"matrix": [0, 3], "x": 3, "y": 0}, | |||
{"matrix": [0, 4], "x": 4, "y": 0}, | |||
{"matrix": [0, 5], "x": 5, "y": 0}, | |||
{"matrix": [0, 6], "x": 6, "y": 0}, | |||
{"matrix": [0, 7], "x": 7, "y": 0}, | |||
{"matrix": [0, 8], "x": 8, "y": 0}, | |||
{"matrix": [0, 9], "x": 9, "y": 0}, | |||
{"matrix": [0, 10], "x": 10, "y": 0}, | |||
{"matrix": [0, 11], "x": 11, "y": 0}, | |||
{"matrix": [0, 12], "x": 12, "y": 0}, | |||
{"matrix": [0, 13], "x": 13, "y": 0, "w": 2}, | |||
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, | |||
{"matrix": [1, 1], "x": 1.5, "y": 1}, | |||
{"matrix": [1, 2], "x": 2.5, "y": 1}, | |||
{"matrix": [1, 3], "x": 3.5, "y": 1}, | |||
{"matrix": [1, 4], "x": 4.5, "y": 1}, | |||
{"matrix": [1, 5], "x": 5.5, "y": 1}, | |||
{"matrix": [1, 6], "x": 6.5, "y": 1}, | |||
{"matrix": [1, 7], "x": 7.5, "y": 1}, | |||
{"matrix": [1, 8], "x": 8.5, "y": 1}, | |||
{"matrix": [1, 9], "x": 9.5, "y": 1}, | |||
{"matrix": [1, 10], "x": 10.5, "y": 1}, | |||
{"matrix": [1, 11], "x": 11.5, "y": 1}, | |||
{"matrix": [1, 12], "x": 12.5, "y": 1}, | |||
{"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, | |||
{"matrix": [2, 1], "x": 1.75, "y": 2}, | |||
{"matrix": [2, 2], "x": 2.75, "y": 2}, | |||
{"matrix": [2, 3], "x": 3.75, "y": 2}, | |||
{"matrix": [2, 4], "x": 4.75, "y": 2}, | |||
{"matrix": [2, 5], "x": 5.75, "y": 2}, | |||
{"matrix": [2, 6], "x": 6.75, "y": 2}, | |||
{"matrix": [2, 7], "x": 7.75, "y": 2}, | |||
{"matrix": [2, 8], "x": 8.75, "y": 2}, | |||
{"matrix": [2, 9], "x": 9.75, "y": 2}, | |||
{"matrix": [2, 10], "x": 10.75, "y": 2}, | |||
{"matrix": [2, 11], "x": 11.75, "y": 2}, | |||
{"matrix": [1, 13], "x": 12.75, "y": 2}, | |||
{"matrix": [2, 13], "x": 13.75, "y": 1, "w": 1.25, "h": 2}, | |||
{"matrix": [3, 0], "x": 0, "y": 3, "w": 1.25}, | |||
{"matrix": [3, 1], "x": 1.25, "y": 3}, | |||
{"matrix": [3, 2], "x": 2.25, "y": 3}, | |||
{"matrix": [3, 3], "x": 3.25, "y": 3}, | |||
{"matrix": [3, 4], "x": 4.25, "y": 3}, | |||
{"matrix": [3, 5], "x": 5.25, "y": 3}, | |||
{"matrix": [3, 6], "x": 6.25, "y": 3}, | |||
{"matrix": [3, 7], "x": 7.25, "y": 3}, | |||
{"matrix": [3, 8], "x": 8.25, "y": 3}, | |||
{"matrix": [3, 9], "x": 9.25, "y": 3}, | |||
{"matrix": [3, 10], "x": 10.25, "y": 3}, | |||
{"matrix": [3, 11], "x": 11.25, "y": 3}, | |||
{"matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75}, | |||
{"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 6], "x": 4, "y": 4, "w": 7}, | |||
{"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5} | |||
] | |||
}, | |||
"LAYOUT_60_iso_wkl_split_bs_rshift": { | |||
"layout": [ | |||
{"matrix": [0, 0], "x": 0, "y": 0}, | |||
{"matrix": [0, 1], "x": 1, "y": 0}, | |||
{"matrix": [0, 2], "x": 2, "y": 0}, | |||
{"matrix": [0, 3], "x": 3, "y": 0}, | |||
{"matrix": [0, 4], "x": 4, "y": 0}, | |||
{"matrix": [0, 5], "x": 5, "y": 0}, | |||
{"matrix": [0, 6], "x": 6, "y": 0}, | |||
{"matrix": [0, 7], "x": 7, "y": 0}, | |||
{"matrix": [0, 8], "x": 8, "y": 0}, | |||
{"matrix": [0, 9], "x": 9, "y": 0}, | |||
{"matrix": [0, 10], "x": 10, "y": 0}, | |||
{"matrix": [0, 11], "x": 11, "y": 0}, | |||
{"matrix": [0, 12], "x": 12, "y": 0}, | |||
{"matrix": [0, 13], "x": 13, "y": 0}, | |||
{"matrix": [2, 12], "x": 14, "y": 0}, | |||
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, | |||
{"matrix": [1, 1], "x": 1.5, "y": 1}, | |||
{"matrix": [1, 2], "x": 2.5, "y": 1}, | |||
{"matrix": [1, 3], "x": 3.5, "y": 1}, | |||
{"matrix": [1, 4], "x": 4.5, "y": 1}, | |||
{"matrix": [1, 5], "x": 5.5, "y": 1}, | |||
{"matrix": [1, 6], "x": 6.5, "y": 1}, | |||
{"matrix": [1, 7], "x": 7.5, "y": 1}, | |||
{"matrix": [1, 8], "x": 8.5, "y": 1}, | |||
{"matrix": [1, 9], "x": 9.5, "y": 1}, | |||
{"matrix": [1, 10], "x": 10.5, "y": 1}, | |||
{"matrix": [1, 11], "x": 11.5, "y": 1}, | |||
{"matrix": [1, 12], "x": 12.5, "y": 1}, | |||
{"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, | |||
{"matrix": [2, 1], "x": 1.75, "y": 2}, | |||
{"matrix": [2, 2], "x": 2.75, "y": 2}, | |||
{"matrix": [2, 3], "x": 3.75, "y": 2}, | |||
{"matrix": [2, 4], "x": 4.75, "y": 2}, | |||
{"matrix": [2, 5], "x": 5.75, "y": 2}, | |||
{"matrix": [2, 6], "x": 6.75, "y": 2}, | |||
{"matrix": [2, 7], "x": 7.75, "y": 2}, | |||
{"matrix": [2, 8], "x": 8.75, "y": 2}, | |||
{"matrix": [2, 9], "x": 9.75, "y": 2}, | |||
{"matrix": [2, 10], "x": 10.75, "y": 2}, | |||
{"matrix": [2, 11], "x": 11.75, "y": 2}, | |||
{"matrix": [1, 13], "x": 12.75, "y": 2}, | |||
{"matrix": [2, 13], "x": 13.75, "y": 1, "w": 1.25, "h": 2}, | |||
{"matrix": [3, 0], "x": 0, "y": 3, "w": 1.25}, | |||
{"matrix": [3, 1], "x": 1.25, "y": 3}, | |||
{"matrix": [3, 2], "x": 2.25, "y": 3}, | |||
{"matrix": [3, 3], "x": 3.25, "y": 3}, | |||
{"matrix": [3, 4], "x": 4.25, "y": 3}, | |||
{"matrix": [3, 5], "x": 5.25, "y": 3}, | |||
{"matrix": [3, 6], "x": 6.25, "y": 3}, | |||
{"matrix": [3, 7], "x": 7.25, "y": 3}, | |||
{"matrix": [3, 8], "x": 8.25, "y": 3}, | |||
{"matrix": [3, 9], "x": 9.25, "y": 3}, | |||
{"matrix": [3, 10], "x": 10.25, "y": 3}, | |||
{"matrix": [3, 11], "x": 11.25, "y": 3}, | |||
{"matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, | |||
{"matrix": [3, 13], "x": 14, "y": 3}, | |||
{"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 6], "x": 4, "y": 4, "w": 7}, | |||
{"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5} | |||
] | |||
} | |||
} | |||
} |
@ -0,0 +1,21 @@ | |||
// Copyright 2023 QMK | |||
// SPDX-License-Identifier: GPL-2.0-or-later | |||
#include QMK_KEYBOARD_H | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
[0] = LAYOUT_all( | |||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, | |||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, | |||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, | |||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, | |||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL | |||
), | |||
[1] = LAYOUT_all( | |||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RGHT, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______ | |||
) | |||
}; |
@ -0,0 +1,21 @@ | |||
// Copyright 2023 QMK | |||
// SPDX-License-Identifier: GPL-2.0-or-later | |||
#include QMK_KEYBOARD_H | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
[0] = LAYOUT_all( | |||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, | |||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, | |||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, | |||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, | |||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL | |||
), | |||
[1] = LAYOUT_all( | |||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RGHT, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______ | |||
) | |||
}; |
@ -0,0 +1 @@ | |||
VIA_ENABLE = yes |
@ -0,0 +1,28 @@ | |||
# haven60 | |||
![haven60](https://i.imgur.com/Uja750Oh.png) | |||
Haven60 PCB for Atelier Haven Haven60% keyboard | |||
both hotswap and solder pcbs use same firmware | |||
* Keyboard Maintainer: [Freather](https://github.com/Freather) | |||
* Hardware Supported: atmega32u4-mu | |||
* Hardware Availability: keyspensory.store | |||
Make example for this keyboard (after setting up your build environment): | |||
make ah/haven60:default | |||
Flashing example for this keyboard: | |||
make ah/haven60:default:flash | |||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | |||
## Bootloader | |||
Enter the bootloader in 3 ways: | |||
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard | |||
* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead | |||
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available |
@ -0,0 +1 @@ | |||
# This file intentionally left blank |
@ -0,0 +1,22 @@ | |||
/* Copyright 2024 Archetype Made, Inc. | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General 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 RP2040_BOOTLOADER_DOUBLE_TAP_RESET | |||
#define BACKLIGHT_PWM_DRIVER PWMD5 | |||
#define BACKLIGHT_PWM_CHANNEL RP2040_PWM_CHANNEL_A |
@ -0,0 +1,21 @@ | |||
/* Copyright 2024 Archetype Made, Inc. | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General 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_PWM TRUE | |||
#include_next <halconf.h> |
@ -0,0 +1,98 @@ | |||
{ | |||
"manufacturer": "Archetype", | |||
"keyboard_name": "Minerva LX", | |||
"maintainer": "Archetype", | |||
"backlight": { | |||
"pin": "GP7" | |||
}, | |||
"bootloader": "rp2040", | |||
"diode_direction": "COL2ROW", | |||
"features": { | |||
"backlight": true, | |||
"bootmagic": true, | |||
"extrakey": true, | |||
"mousekey": true | |||
}, | |||
"matrix_pins": { | |||
"cols": ["GP0", "GP29", "GP28", "GP27", "GP26", "GP25", "GP24", "GP23", "GP22", "GP21", "GP20", "GP19", "GP18", "GP17", "GP16"], | |||
"rows": ["GP11", "GP12", "GP13", "GP14", "GP15"] | |||
}, | |||
"processor": "RP2040", | |||
"url": "", | |||
"usb": { | |||
"device_version": "1.0.0", | |||
"pid": "0x0100", | |||
"vid": "0x5453" | |||
}, | |||
"layouts": { | |||
"LAYOUT": { | |||
"layout": [ | |||
{"matrix": [0, 0], "x": 0, "y": 0}, | |||
{"matrix": [0, 1], "x": 1, "y": 0}, | |||
{"matrix": [0, 2], "x": 2, "y": 0}, | |||
{"matrix": [0, 3], "x": 3, "y": 0}, | |||
{"matrix": [0, 4], "x": 4, "y": 0}, | |||
{"matrix": [0, 5], "x": 5, "y": 0}, | |||
{"matrix": [0, 6], "x": 6, "y": 0}, | |||
{"matrix": [0, 7], "x": 7, "y": 0}, | |||
{"matrix": [0, 8], "x": 8, "y": 0}, | |||
{"matrix": [0, 9], "x": 9, "y": 0}, | |||
{"matrix": [0, 10], "x": 10, "y": 0}, | |||
{"matrix": [0, 11], "x": 11, "y": 0}, | |||
{"matrix": [0, 12], "x": 12, "y": 0}, | |||
{"matrix": [2, 12], "x": 13, "y": 0}, | |||
{"matrix": [0, 13], "x": 14, "y": 0}, | |||
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, | |||
{"matrix": [1, 1], "x": 1.5, "y": 1}, | |||
{"matrix": [1, 2], "x": 2.5, "y": 1}, | |||
{"matrix": [1, 3], "x": 3.5, "y": 1}, | |||
{"matrix": [1, 4], "x": 4.5, "y": 1}, | |||
{"matrix": [1, 5], "x": 5.5, "y": 1}, | |||
{"matrix": [1, 6], "x": 6.5, "y": 1}, | |||
{"matrix": [1, 7], "x": 7.5, "y": 1}, | |||
{"matrix": [1, 8], "x": 8.5, "y": 1}, | |||
{"matrix": [1, 9], "x": 9.5, "y": 1}, | |||
{"matrix": [1, 10], "x": 10.5, "y": 1}, | |||
{"matrix": [1, 11], "x": 11.5, "y": 1}, | |||
{"matrix": [1, 12], "x": 12.5, "y": 1}, | |||
{"matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, | |||
{"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, | |||
{"matrix": [2, 1], "x": 1.75, "y": 2}, | |||
{"matrix": [2, 2], "x": 2.75, "y": 2}, | |||
{"matrix": [2, 3], "x": 3.75, "y": 2}, | |||
{"matrix": [2, 4], "x": 4.75, "y": 2}, | |||
{"matrix": [2, 5], "x": 5.75, "y": 2}, | |||
{"matrix": [2, 6], "x": 6.75, "y": 2}, | |||
{"matrix": [2, 7], "x": 7.75, "y": 2}, | |||
{"matrix": [2, 8], "x": 8.75, "y": 2}, | |||
{"matrix": [2, 9], "x": 9.75, "y": 2}, | |||
{"matrix": [2, 10], "x": 10.75, "y": 2}, | |||
{"matrix": [2, 11], "x": 11.75, "y": 2}, | |||
{"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25}, | |||
{"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, | |||
{"matrix": [3, 1], "x": 2.25, "y": 3}, | |||
{"matrix": [3, 2], "x": 3.25, "y": 3}, | |||
{"matrix": [3, 3], "x": 4.25, "y": 3}, | |||
{"matrix": [3, 4], "x": 5.25, "y": 3}, | |||
{"matrix": [3, 5], "x": 6.25, "y": 3}, | |||
{"matrix": [3, 6], "x": 7.25, "y": 3}, | |||
{"matrix": [3, 7], "x": 8.25, "y": 3}, | |||
{"matrix": [3, 8], "x": 9.25, "y": 3}, | |||
{"matrix": [3, 9], "x": 10.25, "y": 3}, | |||
{"matrix": [3, 10], "x": 11.25, "y": 3}, | |||
{"matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, | |||
{"matrix": [3, 13], "x": 14, "y": 3}, | |||
{"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 1], "x": 1.5, "y": 4}, | |||
{"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 4], "x": 4, "y": 4, "w": 3}, | |||
{"matrix": [4, 6], "x": 4, "y": 4, "w": 7}, | |||
{"matrix": [4, 8], "x": 8, "y": 4, "w": 3}, | |||
{"matrix": [4, 9], "x": 10, "y": 5.25, "w": 1.25}, | |||
{"matrix": [4, 10], "x": 11, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 12], "x": 12.5, "y": 4}, | |||
{"matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5} | |||
] | |||
} | |||
} | |||
} |
@ -0,0 +1,35 @@ | |||
/* Copyright 2024 Archetype Made, Inc. | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General 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] = { | |||
[0] = LAYOUT( | |||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, | |||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, | |||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, | |||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, | |||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL | |||
), | |||
[1] = LAYOUT( | |||
QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | |||
) | |||
}; |
@ -0,0 +1,35 @@ | |||
/* Copyright 2024 Archetype Made, Inc. | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General 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] = { | |||
[0] = LAYOUT( | |||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, | |||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, | |||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, | |||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, | |||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL | |||
), | |||
[1] = LAYOUT( | |||
QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | |||
) | |||
}; |
@ -0,0 +1,2 @@ | |||
VIA_ENABLE = yes | |||
LTO_ENABLE = yes |
@ -0,0 +1,22 @@ | |||
/* Copyright 2024 Archetype Made, Inc. | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General 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 RP_PWM_USE_PWM5 | |||
#define RP_PWM_USE_PWM5 TRUE |
@ -0,0 +1,24 @@ | |||
# Minerva LX | |||
![Minerva LX](https://i.imgur.com/f97nsrx.jpg) | |||
The following is the QMK Firmware for the Minerva LX PCB. | |||
* Keyboard Maintainer: [Archetype](https://github.com/archetype-made) | |||
* Hardware Supported: RP2040-based proprietary PCB. | |||
* Hardware Availability: https://archetypemade.com/minerva-is-here/ | |||
Make example for this keyboard (after setting up your build environment): | |||
make archetype/minervalx:default | |||
Flashing example for this keyboard: | |||
make archetype/minervalx:default:flash | |||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | |||
## Bootloader Enter the bootloader in 3 ways: | |||
* **Bootmagic reset**: Hold down the key ESC key and plug in the keyboard (Top Left most switch) | |||
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if available | |||
* **Physical Reset Button**: With the PCB unplugged, hold down the button labled `RESET` on the back of the PCB while pluggin in the USB. |
@ -0,0 +1 @@ | |||
# This file intentionally left blank |
@ -0,0 +1,11 @@ | |||
// Copyright 2024 Filip Strzałka (@philvec) | |||
// SPDX-License-Identifier: GPL-3.0-or-later | |||
#pragma once | |||
#define SERIAL_USART_FULL_DUPLEX | |||
#define AUDIO_PIN GP4 | |||
#define AUDIO_PWM_DRIVER PWMD2 | |||
#define AUDIO_PWM_CHANNEL RP2040_PWM_CHANNEL_A | |||
#define AUDIO_INIT_DELAY |
@ -0,0 +1,9 @@ | |||
// Copyright 2024 Filip Strzałka (@philvec) | |||
// SPDX-License-Identifier: GPL-3.0-or-later | |||
#pragma once | |||
#include_next <halconf.h> | |||
#undef HAL_USE_PWM | |||
#define HAL_USE_PWM TRUE |
@ -0,0 +1,320 @@ | |||
{ | |||
"manufacturer": "Arrow Mechanics", | |||
"keyboard_name": "WINGS Mark 1", | |||
"maintainer": "arrowmechanics", | |||
"bootloader": "rp2040", | |||
"diode_direction": "ROW2COL", | |||
"encoder": { | |||
"rotary": [ | |||
{"pin_a": "GP6", "pin_b": "GP7", "resolution": 2} | |||
] | |||
}, | |||
"features": { | |||
"audio": true, | |||
"bootmagic": true, | |||
"encoder": true, | |||
"extrakey": true, | |||
"mousekey": true, | |||
"rgb_matrix": true | |||
}, | |||
"matrix_pins": { | |||
"cols": ["GP8", "GP9", "GP10", "GP11", "GP12", "GP13", "GP14", "GP15", "GP16"], | |||
"rows": ["GP22", "GP21", "GP20", "GP19", "GP18", "GP17"] | |||
}, | |||
"processor": "RP2040", | |||
"rgb_matrix": { | |||
"animations": { | |||
"alphas_mods": true, | |||
"band_pinwheel_sat": true, | |||
"band_pinwheel_val": true, | |||
"band_sat": true, | |||
"band_spiral_sat": true, | |||
"band_spiral_val": true, | |||
"band_val": true, | |||
"breathing": true, | |||
"cycle_all": true, | |||
"cycle_left_right": true, | |||
"cycle_out_in": true, | |||
"cycle_out_in_dual": true, | |||
"cycle_pinwheel": true, | |||
"cycle_spiral": true, | |||
"cycle_up_down": true, | |||
"digital_rain": true, | |||
"dual_beacon": true, | |||
"gradient_left_right": true, | |||
"gradient_up_down": true, | |||
"hue_breathing": true, | |||
"hue_pendulum": true, | |||
"hue_wave": true, | |||
"jellybean_raindrops": true, | |||
"multisplash": true, | |||
"pixel_flow": true, | |||
"pixel_fractal": true, | |||
"pixel_rain": true, | |||
"rainbow_beacon": true, | |||
"rainbow_moving_chevron": true, | |||
"rainbow_pinwheels": true, | |||
"raindrops": true, | |||
"solid_multisplash": true, | |||
"solid_reactive": true, | |||
"solid_reactive_cross": true, | |||
"solid_reactive_multicross": true, | |||
"solid_reactive_multinexus": true, | |||
"solid_reactive_multiwide": true, | |||
"solid_reactive_nexus": true, | |||
"solid_reactive_simple": true, | |||
"solid_reactive_wide": true, | |||
"solid_splash": true, | |||
"splash": true, | |||
"typing_heatmap": true | |||
}, | |||
"default": { | |||
"animation": "breathing", | |||
"hue": 192 | |||
}, | |||
"driver": "ws2812", | |||
"layout": [ | |||
{"matrix": [0, 7], "x": 93, "y": 2, "flags": 4}, | |||
{"matrix": [0, 6], "x": 80, "y": 1, "flags": 4}, | |||
{"matrix": [0, 5], "x": 67, "y": 0, "flags": 4}, | |||
{"matrix": [0, 4], "x": 54, "y": 1, "flags": 4}, | |||
{"matrix": [0, 3], "x": 42, "y": 3, "flags": 4}, | |||
{"matrix": [0, 2], "x": 29, "y": 5, "flags": 4}, | |||
{"matrix": [0, 1], "x": 16, "y": 5, "flags": 4}, | |||
{"matrix": [0, 0], "x": 3, "y": 5, "flags": 4}, | |||
{"matrix": [1, 0], "x": 3, "y": 17, "flags": 4}, | |||
{"matrix": [1, 1], "x": 16, "y": 17, "flags": 4}, | |||
{"matrix": [1, 2], "x": 29, "y": 17, "flags": 4}, | |||
{"matrix": [1, 3], "x": 42, "y": 15, "flags": 4}, | |||
{"matrix": [1, 4], "x": 54, "y": 13, "flags": 4}, | |||
{"matrix": [1, 5], "x": 67, "y": 12, "flags": 4}, | |||
{"matrix": [1, 6], "x": 80, "y": 13, "flags": 4}, | |||
{"matrix": [1, 7], "x": 93, "y": 14, "flags": 4}, | |||
{"matrix": [2, 8], "x": 106, "y": 25, "flags": 4}, | |||
{"matrix": [2, 7], "x": 93, "y": 25, "flags": 4}, | |||
{"matrix": [2, 6], "x": 80, "y": 25, "flags": 4}, | |||
{"matrix": [2, 5], "x": 67, "y": 24, "flags": 4}, | |||
{"matrix": [2, 4], "x": 54, "y": 25, "flags": 4}, | |||
{"matrix": [2, 3], "x": 42, "y": 27, "flags": 4}, | |||
{"matrix": [2, 2], "x": 26, "y": 29, "flags": 4}, | |||
{"matrix": [2, 0], "x": 6, "y": 29, "flags": 4}, | |||
{"matrix": [3, 0], "x": 3, "y": 40, "flags": 4}, | |||
{"matrix": [3, 2], "x": 22, "y": 40, "flags": 4}, | |||
{"matrix": [3, 3], "x": 42, "y": 38, "flags": 4}, | |||
{"matrix": [3, 4], "x": 54, "y": 36, "flags": 4}, | |||
{"matrix": [3, 5], "x": 67, "y": 35, "flags": 4}, | |||
{"matrix": [3, 6], "x": 80, "y": 36, "flags": 4}, | |||
{"matrix": [3, 7], "x": 93, "y": 37, "flags": 4}, | |||
{"matrix": [3, 8], "x": 106, "y": 37, "flags": 4}, | |||
{"matrix": [4, 8], "x": 106, "y": 49, "flags": 4}, | |||
{"matrix": [4, 7], "x": 93, "y": 49, "flags": 4}, | |||
{"matrix": [4, 6], "x": 80, "y": 48, "flags": 4}, | |||
{"matrix": [4, 5], "x": 67, "y": 47, "flags": 4}, | |||
{"matrix": [4, 4], "x": 54, "y": 48, "flags": 4}, | |||
{"matrix": [4, 3], "x": 42, "y": 50, "flags": 4}, | |||
{"matrix": [4, 1], "x": 21, "y": 52, "flags": 4}, | |||
{"matrix": [4, 0], "x": 0, "y": 52, "flags": 4}, | |||
{"matrix": [5, 0], "x": 0, "y": 64, "flags": 4}, | |||
{"matrix": [5, 1], "x": 13, "y": 64, "flags": 4}, | |||
{"matrix": [5, 2], "x": 26, "y": 64, "flags": 4}, | |||
{"matrix": [5, 3], "x": 43, "y": 62, "flags": 4}, | |||
{"matrix": [5, 4], "x": 59, "y": 60, "flags": 4}, | |||
{"matrix": [5, 6], "x": 75, "y": 60, "flags": 4}, | |||
{"matrix": [5, 7], "x": 98, "y": 61, "flags": 4}, | |||
{"matrix": [6, 1], "x": 131, "y": 2, "flags": 4}, | |||
{"matrix": [6, 2], "x": 144, "y": 1, "flags": 4}, | |||
{"matrix": [6, 3], "x": 157, "y": 0, "flags": 4}, | |||
{"matrix": [6, 4], "x": 170, "y": 1, "flags": 4}, | |||
{"matrix": [6, 5], "x": 182, "y": 3, "flags": 4}, | |||
{"matrix": [6, 6], "x": 195, "y": 5, "flags": 4}, | |||
{"matrix": [6, 7], "x": 208, "y": 5, "flags": 4}, | |||
{"matrix": [6, 8], "x": 221, "y": 5, "flags": 4}, | |||
{"matrix": [7, 8], "x": 214, "y": 17, "flags": 4}, | |||
{"matrix": [7, 6], "x": 195, "y": 17, "flags": 4}, | |||
{"matrix": [7, 5], "x": 182, "y": 15, "flags": 4}, | |||
{"matrix": [7, 4], "x": 170, "y": 13, "flags": 4}, | |||
{"matrix": [7, 3], "x": 157, "y": 12, "flags": 4}, | |||
{"matrix": [7, 2], "x": 144, "y": 13, "flags": 4}, | |||
{"matrix": [7, 1], "x": 131, "y": 14, "flags": 4}, | |||
{"matrix": [8, 0], "x": 118, "y": 25, "flags": 4}, | |||
{"matrix": [8, 1], "x": 131, "y": 25, "flags": 4}, | |||
{"matrix": [8, 2], "x": 144, "y": 25, "flags": 4}, | |||
{"matrix": [8, 3], "x": 157, "y": 24, "flags": 4}, | |||
{"matrix": [8, 4], "x": 170, "y": 25, "flags": 4}, | |||
{"matrix": [8, 5], "x": 182, "y": 27, "flags": 4}, | |||
{"matrix": [8, 6], "x": 195, "y": 29, "flags": 4}, | |||
{"matrix": [8, 7], "x": 208, "y": 29, "flags": 4}, | |||
{"matrix": [8, 8], "x": 221, "y": 29, "flags": 4}, | |||
{"matrix": [9, 8], "x": 216, "y": 40, "flags": 4}, | |||
{"matrix": [9, 6], "x": 195, "y": 40, "flags": 4}, | |||
{"matrix": [9, 5], "x": 182, "y": 38, "flags": 4}, | |||
{"matrix": [9, 4], "x": 170, "y": 36, "flags": 4}, | |||
{"matrix": [9, 3], "x": 157, "y": 35, "flags": 4}, | |||
{"matrix": [9, 2], "x": 144, "y": 36, "flags": 4}, | |||
{"matrix": [9, 1], "x": 131, "y": 37, "flags": 4}, | |||
{"matrix": [9, 0], "x": 118, "y": 37, "flags": 4}, | |||
{"matrix": [10, 0], "x": 118, "y": 49, "flags": 4}, | |||
{"matrix": [10, 1], "x": 131, "y": 49, "flags": 4}, | |||
{"matrix": [10, 2], "x": 144, "y": 48, "flags": 4}, | |||
{"matrix": [10, 3], "x": 157, "y": 47, "flags": 4}, | |||
{"matrix": [10, 4], "x": 170, "y": 48, "flags": 4}, | |||
{"matrix": [10, 5], "x": 182, "y": 50, "flags": 4}, | |||
{"matrix": [10, 6], "x": 197, "y": 52, "flags": 4}, | |||
{"matrix": [10, 7], "x": 211, "y": 52, "flags": 4}, | |||
{"matrix": [10, 8], "x": 224, "y": 52, "flags": 4}, | |||
{"matrix": [11, 8], "x": 224, "y": 64, "flags": 4}, | |||
{"matrix": [11, 7], "x": 211, "y": 64, "flags": 4}, | |||
{"matrix": [11, 6], "x": 198, "y": 64, "flags": 4}, | |||
{"matrix": [11, 5], "x": 181, "y": 62, "flags": 4}, | |||
{"matrix": [11, 4], "x": 165, "y": 60, "flags": 4}, | |||
{"matrix": [11, 2], "x": 149, "y": 60, "flags": 4}, | |||
{"matrix": [11, 1], "x": 126, "y": 61, "flags": 4} | |||
], | |||
"split_count": [47, 48] | |||
}, | |||
"split": { | |||
"enabled": true, | |||
"transport": { | |||
"sync": { | |||
"layer_state": true, | |||
"matrix_state": true | |||
} | |||
} | |||
}, | |||
"tags": ["columnar", "split", "rgb", "hotswap", "encoder"], | |||
"url": "https://arrowmechanics.com", | |||
"usb": { | |||
"device_version": "1.0.0", | |||
"pid": "0x3134", | |||
"vid": "0xA880" | |||
}, | |||
"ws2812": { | |||
"driver": "vendor", | |||
"pin": "GP26" | |||
}, | |||
"layouts": { | |||
"LAYOUT": { | |||
"layout": [ | |||
{"matrix": [0, 0], "x": 0.25, "y": 0.43}, | |||
{"matrix": [0, 1], "x": 1.25, "y": 0.43}, | |||
{"matrix": [0, 2], "x": 2.25, "y": 0.43}, | |||
{"matrix": [0, 3], "x": 3.25, "y": 0.25}, | |||
{"matrix": [0, 4], "x": 4.25, "y": 0.08}, | |||
{"matrix": [0, 5], "x": 5.25, "y": 0}, | |||
{"matrix": [0, 6], "x": 6.25, "y": 0.08}, | |||
{"matrix": [0, 7], "x": 7.25, "y": 0.15}, | |||
{"matrix": [6, 1], "x": 10.45, "y": 0.15}, | |||
{"matrix": [6, 2], "x": 11.45, "y": 0.08}, | |||
{"matrix": [6, 3], "x": 12.45, "y": 0}, | |||
{"matrix": [6, 4], "x": 13.45, "y": 0.08}, | |||
{"matrix": [6, 5], "x": 14.45, "y": 0.25}, | |||
{"matrix": [6, 6], "x": 15.45, "y": 0.43}, | |||
{"matrix": [6, 7], "x": 16.45, "y": 0.43}, | |||
{"matrix": [6, 8], "x": 17.45, "y": 0.43}, | |||
{"matrix": [1, 0], "x": 0.25, "y": 1.43}, | |||
{"matrix": [1, 1], "x": 1.25, "y": 1.43}, | |||
{"matrix": [1, 2], "x": 2.25, "y": 1.43}, | |||
{"matrix": [1, 3], "x": 3.25, "y": 1.25}, | |||
{"matrix": [1, 4], "x": 4.25, "y": 1.08}, | |||
{"matrix": [1, 5], "x": 5.25, "y": 1}, | |||
{"matrix": [1, 6], "x": 6.25, "y": 1.08}, | |||
{"matrix": [1, 7], "x": 7.25, "y": 1.15}, | |||
{"matrix": [1, 8], "x": 8.25, "y": 1.15, "encoder": 0}, | |||
{"matrix": [7, 0], "x": 9.45, "y": 1.15}, | |||
{"matrix": [7, 1], "x": 10.45, "y": 1.15}, | |||
{"matrix": [7, 2], "x": 11.45, "y": 1.08}, | |||
{"matrix": [7, 3], "x": 12.45, "y": 1}, | |||
{"matrix": [7, 4], "x": 13.45, "y": 1.08}, | |||
{"matrix": [7, 5], "x": 14.45, "y": 1.25}, | |||
{"matrix": [7, 6], "x": 15.45, "y": 1.43}, | |||
{"matrix": [7, 8], "x": 16.45, "y": 1.43, "w": 2}, | |||
{"matrix": [2, 0], "x": 0.25, "y": 2.43, "w": 1.5}, | |||
{"matrix": [2, 2], "x": 1.75, "y": 2.43, "w": 1.5}, | |||
{"matrix": [2, 3], "x": 3.25, "y": 2.25}, | |||
{"matrix": [2, 4], "x": 4.25, "y": 2.08}, | |||
{"matrix": [2, 5], "x": 5.25, "y": 2}, | |||
{"matrix": [2, 6], "x": 6.25, "y": 2.08}, | |||
{"matrix": [2, 7], "x": 7.25, "y": 2.15}, | |||
{"matrix": [2, 8], "x": 8.25, "y": 2.15}, | |||
{"matrix": [8, 0], "x": 9.45, "y": 2.15}, | |||
{"matrix": [8, 1], "x": 10.45, "y": 2.15}, | |||
{"matrix": [8, 2], "x": 11.45, "y": 2.08}, | |||
{"matrix": [8, 3], "x": 12.45, "y": 2}, | |||
{"matrix": [8, 4], "x": 13.45, "y": 2.08}, | |||
{"matrix": [8, 5], "x": 14.45, "y": 2.25}, | |||
{"matrix": [8, 6], "x": 15.45, "y": 2.43}, | |||
{"matrix": [8, 7], "x": 16.45, "y": 2.43}, | |||
{"matrix": [8, 8], "x": 17.45, "y": 2.43}, | |||
{"matrix": [3, 0], "x": 0, "y": 3.43, "w": 1.5}, | |||
{"matrix": [3, 2], "x": 1.5, "y": 3.43, "w": 1.75}, | |||
{"matrix": [3, 3], "x": 3.25, "y": 3.25}, | |||
{"matrix": [3, 4], "x": 4.25, "y": 3.08}, | |||
{"matrix": [3, 5], "x": 5.25, "y": 3}, | |||
{"matrix": [3, 6], "x": 6.25, "y": 3.08}, | |||
{"matrix": [3, 7], "x": 7.25, "y": 3.15}, | |||
{"matrix": [3, 8], "x": 8.25, "y": 3.15}, | |||
{"matrix": [9, 0], "x": 9.45, "y": 3.15}, | |||
{"matrix": [9, 1], "x": 10.45, "y": 3.15}, | |||
{"matrix": [9, 2], "x": 11.45, "y": 3.08}, | |||
{"matrix": [9, 3], "x": 12.45, "y": 3}, | |||
{"matrix": [9, 4], "x": 13.45, "y": 3.08}, | |||
{"matrix": [9, 5], "x": 14.45, "y": 3.25}, | |||
{"matrix": [9, 6], "x": 15.45, "y": 3.43}, | |||
{"matrix": [9, 8], "x": 16.45, "y": 3.43, "w": 2.25}, | |||
{"matrix": [4, 0], "x": 0, "y": 4.43}, | |||
{"matrix": [4, 1], "x": 1, "y": 4.43, "w": 2.25}, | |||
{"matrix": [4, 3], "x": 3.25, "y": 4.25}, | |||
{"matrix": [4, 4], "x": 4.25, "y": 4.08}, | |||
{"matrix": [4, 5], "x": 5.25, "y": 4}, | |||
{"matrix": [4, 6], "x": 6.25, "y": 4.08}, | |||
{"matrix": [4, 7], "x": 7.25, "y": 4.15}, | |||
{"matrix": [4, 8], "x": 8.25, "y": 4.15}, | |||
{"matrix": [10, 0], "x": 9.45, "y": 4.15}, | |||
{"matrix": [10, 1], "x": 10.45, "y": 4.15}, | |||
{"matrix": [10, 2], "x": 11.45, "y": 4.08}, | |||
{"matrix": [10, 3], "x": 12.45, "y": 4}, | |||
{"matrix": [10, 4], "x": 13.45, "y": 4.08}, | |||
{"matrix": [10, 5], "x": 14.45, "y": 4.25}, | |||
{"matrix": [10, 6], "x": 15.45, "y": 4.43, "w": 1.25}, | |||
{"matrix": [10, 7], "x": 16.7, "y": 4.43}, | |||
{"matrix": [10, 8], "x": 17.7, "y": 4.43}, | |||
{"matrix": [5, 0], "x": 0, "y": 5.43}, | |||
{"matrix": [5, 1], "x": 1, "y": 5.43}, | |||
{"matrix": [5, 2], "x": 2, "y": 5.43}, | |||
{"matrix": [5, 3], "x": 3.25, "y": 5.25, "w": 1.25}, | |||
{"matrix": [5, 4], "x": 4.5, "y": 5.08, "w": 1.25}, | |||
{"matrix": [5, 6], "x": 5.75, "y": 5.08, "w": 1.25}, | |||
{"matrix": [5, 7], "x": 7, "y": 5.15, "w": 2.25}, | |||
{"matrix": [11, 1], "x": 9.45, "y": 5.15, "w": 2.25}, | |||
{"matrix": [11, 2], "x": 11.7, "y": 5.08, "w": 1.25}, | |||
{"matrix": [11, 4], "x": 12.95, "y": 5.08, "w": 1.25}, | |||
{"matrix": [11, 5], "x": 14.2, "y": 5.25, "w": 1.25}, | |||
{"matrix": [11, 6], "x": 15.7, "y": 5.43}, | |||
{"matrix": [11, 7], "x": 16.7, "y": 5.43}, | |||
{"matrix": [11, 8], "x": 17.7, "y": 5.43} | |||
] | |||
} | |||
} | |||
} |
@ -0,0 +1,25 @@ | |||
// Copyright 2024 Filip Strzałka (@philvec) | |||
// SPDX-License-Identifier: GPL-3.0-or-later | |||
#include QMK_KEYBOARD_H | |||
enum layers { | |||
BASE, | |||
}; | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
[BASE] = LAYOUT( | |||
KC_VOLU, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_EQL, KC_PSCR, KC_DEL, | |||
KC_VOLD, KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, RGB_MOD, KC_BTN1, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_BSPC, | |||
KC_MPLY, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, C(KC_C), C(KC_V), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, | |||
KC_MNXT, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, C(KC_Z), C(KC_Y), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, | |||
KC_MPRV, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_HOME, | |||
KC_LCTL, KC_NO, KC_NO, KC_LCTL, KC_LCMD, KC_LALT, KC_SPC, KC_SPC, KC_RALT, KC_RCMD, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | |||
) | |||
}; | |||
#if defined(ENCODER_MAP_ENABLE) | |||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { | |||
[BASE] = { ENCODER_CCW_CW(RGB_HUI, RGB_HUD), ENCODER_CCW_CW(KC_WH_U, KC_WH_D) }, | |||
}; | |||
#endif |
@ -0,0 +1 @@ | |||
ENCODER_MAP_ENABLE = yes |
@ -0,0 +1,9 @@ | |||
// Copyright 2024 Filip Strzałka (@philvec) | |||
// SPDX-License-Identifier: GPL-3.0-or-later | |||
#pragma once | |||
#include_next <mcuconf.h> | |||
#undef RP_PWM_USE_PWM2 | |||
#define RP_PWM_USE_PWM2 TRUE |
@ -0,0 +1,29 @@ | |||
# Arrow Mechanics WINGS Mark 1 | |||
![Arrow Mechanics WINGS Mark 1](https://i.imgur.com/oQkDmSu.png) | |||
ErgoDox-inspired SPLIT keyboard by [Arrow Mechanics](https://www.arrowmechanics.com/) | |||
* 94 GATERON Low Profile 2.0 hotswap sockets | |||
* RGB diode under each key for WS2812-driven lighting with [RGB Matrix](https://docs.qmk.fm/#/feature_rgb_matrix) | |||
* 2 rotary encoders, one per half, with push-switches | |||
* Buzzers for sound effects and/or [Music Mode](https://docs.qmk.fm/#/feature_audio?id=music-mode) | |||
* Handy magnetic connectors for joining the halves together or splitting with the use of dedicated cable | |||
* Anti-slip pads with magnetic expanding-legs for conveniently adjusting height/lean | |||
* RP2040 Chip + 16MB Flash memory - Dual-core Cortex M0+ | |||
--- | |||
* Keyboard Maintainer: [arrowmechanics](https://github.com/arrowmechanics/) | |||
* Hardware Supported: [Arrow Mechanics WINGS Keyboard set](https://www.arrowmechanics.com/produkty?view=product&id=8) | |||
* Hardware Availability: [Official Arrow Mechanics E-SHOP](https://www.arrowmechanics.com/produkty?view=product&id=8) | |||
Flashing example for this keyboard: | |||
qmk flash -kb arrowmechanics/wings -km default | |||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | |||
## Bootloader | |||
Enter the bootloader in 2 ways: | |||
* **Bootmagic reset**: Hold down the top-left corner key on power-up. | |||
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available |
@ -0,0 +1,2 @@ | |||
SERIAL_DRIVER = vendor | |||
AUDIO_DRIVER = pwm_hardware |
@ -0,0 +1,81 @@ | |||
/* Copyright 2023 Cipulot | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 3 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#define MATRIX_ROWS 5 | |||
#define MATRIX_COLS 15 | |||
#define MATRIX_ROW_PINS \ | |||
{ B14, B13, B12, A6, A7 } | |||
#define AMUX_COUNT 2 | |||
#define AMUX_MAX_COLS_COUNT 8 | |||
#define AMUX_EN_PINS \ | |||
{ B9, B8 } | |||
#define AMUX_SEL_PINS \ | |||
{ B7, B6, B5 } | |||
#define AMUX_COL_CHANNELS_SIZES \ | |||
{ 7, 8 } | |||
#define AMUX_0_COL_CHANNELS \ | |||
{ 3, 0, 1, 2, 4, 6, 7 } | |||
#define AMUX_1_COL_CHANNELS \ | |||
{ 3, 0, 1, 2, 4, 6, 7, 5 } | |||
#define AMUX_COL_CHANNELS AMUX_0_COL_CHANNELS, AMUX_1_COL_CHANNELS | |||
#define DISCHARGE_PIN A1 | |||
#define ANALOG_PORT A2 | |||
#define DEFAULT_ACTUATION_MODE 0 | |||
#define DEFAULT_MODE_0_ACTUATION_LEVEL 550 | |||
#define DEFAULT_MODE_0_RELEASE_LEVEL 500 | |||
#define DEFAULT_MODE_1_INITIAL_DEADZONE_OFFSET DEFAULT_MODE_0_ACTUATION_LEVEL | |||
#define DEFAULT_MODE_1_ACTUATION_OFFSET 70 | |||
#define DEFAULT_MODE_1_RELEASE_OFFSET 70 | |||
#define DEFAULT_EXTREMUM 1023 | |||
#define EXPECTED_NOISE_FLOOR 0 | |||
#define NOISE_FLOOR_THRESHOLD 50 | |||
#define BOTTOMING_CALIBRATION_THRESHOLD 100 | |||
#define DEFAULT_NOISE_FLOOR_SAMPLING_COUNT 30 | |||
#define DEFAULT_BOTTOMING_READING 1023 | |||
#define DEFAULT_CALIBRATION_STARTER true | |||
#define DISCHARGE_TIME 10 | |||
// #define DEBUG_MATRIX_SCAN_RATE | |||
#define EECONFIG_KB_DATA_SIZE 171 | |||
// RGB & Indicators | |||
// PWM driver with direct memory access (DMA) support | |||
#define WS2812_PWM_COMPLEMENTARY_OUTPUT | |||
#define WS2812_PWM_DRIVER PWMD1 | |||
#define WS2812_PWM_CHANNEL 3 | |||
#define WS2812_PWM_PAL_MODE 1 | |||
#define WS2812_DMA_STREAM STM32_DMA2_STREAM5 | |||
#define WS2812_DMA_CHANNEL 6 | |||
#define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM1_UP | |||
#define RGBLIGHT_DEFAULT_VAL 200 | |||
#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 5) | |||
#define NUM_INDICATOR_INDEX 2 | |||
#define CAPS_INDICATOR_INDEX 1 | |||
#define SCROLL_INDICATOR_INDEX 0 |
@ -0,0 +1,318 @@ | |||
/* Copyright 2023 Cipulot | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 3 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#include "ec_switch_matrix.h" | |||
#include "analog.h" | |||
#include "atomic_util.h" | |||
#include "math.h" | |||
#include "print.h" | |||
#include "wait.h" | |||
#if defined(__AVR__) | |||
# error "AVR platforms not supported due to a variety of reasons. Among them there are limited memory, limited number of pins and ADC not being able to give satisfactory results." | |||
#endif | |||
#define OPEN_DRAIN_SUPPORT defined(PAL_MODE_OUTPUT_OPENDRAIN) | |||
eeprom_ec_config_t eeprom_ec_config; | |||
ec_config_t ec_config; | |||
// Pin and port array | |||
const pin_t row_pins[] = MATRIX_ROW_PINS; | |||
const pin_t amux_sel_pins[] = AMUX_SEL_PINS; | |||
const pin_t amux_en_pins[] = AMUX_EN_PINS; | |||
const pin_t amux_n_col_sizes[] = AMUX_COL_CHANNELS_SIZES; | |||
const pin_t amux_n_col_channels[][AMUX_MAX_COLS_COUNT] = {AMUX_COL_CHANNELS}; | |||
#define AMUX_SEL_PINS_COUNT ARRAY_SIZE(amux_sel_pins) | |||
#define EXPECTED_AMUX_SEL_PINS_COUNT ceil(log2(AMUX_MAX_COLS_COUNT) | |||
// Checks for the correctness of the configuration | |||
_Static_assert(ARRAY_SIZE(amux_en_pins) == AMUX_COUNT, "AMUX_EN_PINS doesn't have the minimum number of bits required to enable all the multiplexers available"); | |||
// Check that number of select pins is enough to select all the channels | |||
_Static_assert(AMUX_SEL_PINS_COUNT == EXPECTED_AMUX_SEL_PINS_COUNT), "AMUX_SEL_PINS doesn't have the minimum number of bits required address all the channels"); | |||
// Check that number of elements in AMUX_COL_CHANNELS_SIZES is enough to specify the number of channels for all the multiplexers available | |||
_Static_assert(ARRAY_SIZE(amux_n_col_sizes) == AMUX_COUNT, "AMUX_COL_CHANNELS_SIZES doesn't have the minimum number of elements required to specify the number of channels for all the multiplexers available"); | |||
// static ec_config_t config; | |||
static uint16_t sw_value[MATRIX_ROWS][MATRIX_COLS]; | |||
static adc_mux adcMux; | |||
// Initialize the row pins | |||
void init_row(void) { | |||
// Set all row pins as output and low | |||
for (uint8_t idx = 0; idx < MATRIX_ROWS; idx++) { | |||
gpio_set_pin_output(row_pins[idx]); | |||
gpio_write_pin_low(row_pins[idx]); | |||
} | |||
} | |||
// Initialize the multiplexers | |||
void init_amux(void) { | |||
for (uint8_t idx = 0; idx < AMUX_COUNT; idx++) { | |||
gpio_set_pin_output(amux_en_pins[idx]); | |||
gpio_write_pin_low(amux_en_pins[idx]); | |||
} | |||
for (uint8_t idx = 0; idx < AMUX_SEL_PINS_COUNT; idx++) { | |||
gpio_set_pin_output(amux_sel_pins[idx]); | |||
} | |||
} | |||
// Select the multiplexer channel of the specified multiplexer | |||
void select_amux_channel(uint8_t channel, uint8_t col) { | |||
// Get the channel for the specified multiplexer | |||
uint8_t ch = amux_n_col_channels[channel][col]; | |||
// momentarily disable specified multiplexer | |||
gpio_write_pin_high(amux_en_pins[channel]); | |||
// Select the multiplexer channel | |||
for (uint8_t i = 0; i < AMUX_SEL_PINS_COUNT; i++) { | |||
gpio_write_pin(amux_sel_pins[i], ch & (1 << i)); | |||
} | |||
// re enable specified multiplexer | |||
gpio_write_pin_low(amux_en_pins[channel]); | |||
} | |||
// Disable all the unused multiplexers | |||
void disable_unused_amux(uint8_t channel) { | |||
// disable all the other multiplexers apart from the current selected one | |||
for (uint8_t idx = 0; idx < AMUX_COUNT; idx++) { | |||
if (idx != channel) { | |||
gpio_write_pin_high(amux_en_pins[idx]); | |||
} | |||
} | |||
} | |||
// Discharge the peak hold capacitor | |||
void discharge_capacitor(void) { | |||
#ifdef OPEN_DRAIN_SUPPORT | |||
gpio_write_pin_low(DISCHARGE_PIN); | |||
#else | |||
gpio_write_pin_low(DISCHARGE_PIN); | |||
gpio_set_pin_output(DISCHARGE_PIN); | |||
#endif | |||
} | |||
// Charge the peak hold capacitor | |||
void charge_capacitor(uint8_t row) { | |||
#ifdef OPEN_DRAIN_SUPPORT | |||
gpio_write_pin_high(DISCHARGE_PIN); | |||
#else | |||
gpio_set_pin_input(DISCHARGE_PIN); | |||
#endif | |||
gpio_write_pin_high(row_pins[row]); | |||
} | |||
// Initialize the peripherals pins | |||
int ec_init(void) { | |||
// Initialize ADC | |||
palSetLineMode(ANALOG_PORT, PAL_MODE_INPUT_ANALOG); | |||
adcMux = pinToMux(ANALOG_PORT); | |||
// Dummy call to make sure that adcStart() has been called in the appropriate state | |||
adc_read(adcMux); | |||
// Initialize discharge pin as discharge mode | |||
gpio_write_pin_low(DISCHARGE_PIN); | |||
#ifdef OPEN_DRAIN_SUPPORT | |||
gpio_set_pin_output_open_drain(DISCHARGE_PIN); | |||
#else | |||
gpio_set_pin_output(DISCHARGE_PIN); | |||
#endif | |||
// Initialize drive lines | |||
init_row(); | |||
// Initialize AMUXs | |||
init_amux(); | |||
return 0; | |||
} | |||
// Get the noise floor | |||
void ec_noise_floor(void) { | |||
// Initialize the noise floor | |||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | |||
for (uint8_t col = 0; col < MATRIX_COLS; col++) { | |||
ec_config.noise_floor[row][col] = 0; | |||
} | |||
} | |||
// Sample the noise floor | |||
for (uint8_t i = 0; i < DEFAULT_NOISE_FLOOR_SAMPLING_COUNT; i++) { | |||
for (uint8_t amux = 0; amux < AMUX_COUNT; amux++) { | |||
disable_unused_amux(amux); | |||
for (uint8_t col = 0; col < amux_n_col_sizes[amux]; col++) { | |||
uint8_t sum = 0; | |||
for (uint8_t i = 0; i < (amux > 0 ? amux : 0); i++) | |||
sum += amux_n_col_sizes[i]; | |||
uint8_t adjusted_col = col + sum; | |||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | |||
ec_config.noise_floor[row][adjusted_col] += ec_readkey_raw(amux, row, col); | |||
} | |||
} | |||
} | |||
wait_ms(5); | |||
} | |||
// Average the noise floor | |||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | |||
for (uint8_t col = 0; col < MATRIX_COLS; col++) { | |||
ec_config.noise_floor[row][col] /= DEFAULT_NOISE_FLOOR_SAMPLING_COUNT; | |||
} | |||
} | |||
} | |||
// Scan key values and update matrix state | |||
bool ec_matrix_scan(matrix_row_t current_matrix[]) { | |||
bool updated = false; | |||
for (uint8_t amux = 0; amux < AMUX_COUNT; amux++) { | |||
disable_unused_amux(amux); | |||
for (uint8_t col = 0; col < amux_n_col_sizes[amux]; col++) { | |||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | |||
uint8_t sum = 0; | |||
for (uint8_t i = 0; i < (amux > 0 ? amux : 0); i++) | |||
sum += amux_n_col_sizes[i]; | |||
uint8_t adjusted_col = col + sum; | |||
sw_value[row][adjusted_col] = ec_readkey_raw(amux, row, col); | |||
if (ec_config.bottoming_calibration) { | |||
if (ec_config.bottoming_calibration_starter[row][adjusted_col]) { | |||
ec_config.bottoming_reading[row][adjusted_col] = sw_value[row][adjusted_col]; | |||
ec_config.bottoming_calibration_starter[row][adjusted_col] = false; | |||
} else if (sw_value[row][adjusted_col] > ec_config.bottoming_reading[row][adjusted_col]) { | |||
ec_config.bottoming_reading[row][adjusted_col] = sw_value[row][adjusted_col]; | |||
} | |||
} else { | |||
updated |= ec_update_key(¤t_matrix[row], row, adjusted_col, sw_value[row][adjusted_col]); | |||
} | |||
} | |||
} | |||
} | |||
return ec_config.bottoming_calibration ? false : updated; | |||
} | |||
// Read the capacitive sensor value | |||
uint16_t ec_readkey_raw(uint8_t channel, uint8_t row, uint8_t col) { | |||
uint16_t sw_value = 0; | |||
// Select the multiplexer | |||
select_amux_channel(channel, col); | |||
// Set the row pin to low state to avoid ghosting | |||
gpio_write_pin_low(row_pins[row]); | |||
ATOMIC_BLOCK_FORCEON { | |||
// Set the row pin to high state and have capacitor charge | |||
charge_capacitor(row); | |||
// Read the ADC value | |||
sw_value = adc_read(adcMux); | |||
} | |||
// Discharge peak hold capacitor | |||
discharge_capacitor(); | |||
// Waiting for the ghost capacitor to discharge fully | |||
wait_us(DISCHARGE_TIME); | |||
return sw_value; | |||
} | |||
// Update press/release state of key | |||
bool ec_update_key(matrix_row_t* current_row, uint8_t row, uint8_t col, uint16_t sw_value) { | |||
bool current_state = (*current_row >> col) & 1; | |||
// Real Time Noise Floor Calibration | |||
if (sw_value < (ec_config.noise_floor[row][col] - NOISE_FLOOR_THRESHOLD)) { | |||
uprintf("Noise Floor Change: %d, %d, %d\n", row, col, sw_value); | |||
ec_config.noise_floor[row][col] = sw_value; | |||
ec_config.rescaled_mode_0_actuation_threshold[row][col] = rescale(ec_config.mode_0_actuation_threshold, 0, 1023, ec_config.noise_floor[row][col], eeprom_ec_config.bottoming_reading[row][col]); | |||
ec_config.rescaled_mode_0_release_threshold[row][col] = rescale(ec_config.mode_0_release_threshold, 0, 1023, ec_config.noise_floor[row][col], eeprom_ec_config.bottoming_reading[row][col]); | |||
ec_config.rescaled_mode_1_initial_deadzone_offset[row][col] = rescale(ec_config.mode_1_initial_deadzone_offset, 0, 1023, ec_config.noise_floor[row][col], eeprom_ec_config.bottoming_reading[row][col]); | |||
} | |||
// Normal board-wide APC | |||
if (ec_config.actuation_mode == 0) { | |||
if (current_state && sw_value < ec_config.rescaled_mode_0_release_threshold[row][col]) { | |||
*current_row &= ~(1 << col); | |||
uprintf("Key released: %d, %d, %d\n", row, col, sw_value); | |||
return true; | |||
} | |||
if ((!current_state) && sw_value > ec_config.rescaled_mode_0_actuation_threshold[row][col]) { | |||
*current_row |= (1 << col); | |||
uprintf("Key pressed: %d, %d, %d\n", row, col, sw_value); | |||
return true; | |||
} | |||
} | |||
// Rapid Trigger | |||
else if (ec_config.actuation_mode == 1) { | |||
// Is key in active zone? | |||
if (sw_value > ec_config.rescaled_mode_1_initial_deadzone_offset[row][col]) { | |||
// Is key pressed while in active zone? | |||
if (current_state) { | |||
// Is the key still moving down? | |||
if (sw_value > ec_config.extremum[row][col]) { | |||
ec_config.extremum[row][col] = sw_value; | |||
uprintf("Key pressed: %d, %d, %d\n", row, col, sw_value); | |||
} | |||
// Has key moved up enough to be released? | |||
else if (sw_value < ec_config.extremum[row][col] - ec_config.mode_1_release_offset) { | |||
ec_config.extremum[row][col] = sw_value; | |||
*current_row &= ~(1 << col); | |||
uprintf("Key released: %d, %d, %d\n", row, col, sw_value); | |||
return true; | |||
} | |||
} | |||
// Key is not pressed while in active zone | |||
else { | |||
// Is the key still moving up? | |||
if (sw_value < ec_config.extremum[row][col]) { | |||
ec_config.extremum[row][col] = sw_value; | |||
} | |||
// Has key moved down enough to be pressed? | |||
else if (sw_value > ec_config.extremum[row][col] + ec_config.mode_1_actuation_offset) { | |||
ec_config.extremum[row][col] = sw_value; | |||
*current_row |= (1 << col); | |||
uprintf("Key pressed: %d, %d, %d\n", row, col, sw_value); | |||
return true; | |||
} | |||
} | |||
} | |||
// Key is not in active zone | |||
else { | |||
// Check to avoid key being stuck in pressed state near the active zone threshold | |||
if (sw_value < ec_config.extremum[row][col]) { | |||
ec_config.extremum[row][col] = sw_value; | |||
*current_row &= ~(1 << col); | |||
return true; | |||
} | |||
} | |||
} | |||
return false; | |||
} | |||
// Print the matrix values | |||
void ec_print_matrix(void) { | |||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | |||
for (uint8_t col = 0; col < MATRIX_COLS - 1; col++) { | |||
uprintf("%4d,", sw_value[row][col]); | |||
} | |||
uprintf("%4d\n", sw_value[row][MATRIX_COLS - 1]); | |||
} | |||
print("\n"); | |||
} | |||
// Rescale the value to a different range | |||
uint16_t rescale(uint16_t x, uint16_t in_min, uint16_t in_max, uint16_t out_min, uint16_t out_max) { | |||
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; | |||
} |
@ -0,0 +1,84 @@ | |||
/* Copyright 2023 Cipulot | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 3 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#pragma once | |||
#include <stdint.h> | |||
#include <stdbool.h> | |||
#include "matrix.h" | |||
#include "eeconfig.h" | |||
#include "util.h" | |||
typedef struct _indicator_config_t { | |||
uint8_t h; | |||
uint8_t s; | |||
uint8_t v; | |||
bool enabled; | |||
} indicator_config; | |||
typedef struct PACKED { | |||
indicator_config num; | |||
indicator_config caps; | |||
indicator_config scroll; | |||
uint8_t actuation_mode; // 0: normal board-wide APC, 1: Rapid trigger from specific board-wide actuation point, 2: Rapid trigger from resting point | |||
uint16_t mode_0_actuation_threshold; // threshold for key press in mode 0 | |||
uint16_t mode_0_release_threshold; // threshold for key release in mode 0 | |||
uint16_t mode_1_initial_deadzone_offset; // threshold for key press in mode 1 | |||
uint8_t mode_1_actuation_offset; // offset for key press in mode 1 and 2 (1-255) | |||
uint8_t mode_1_release_offset; // offset for key release in mode 1 and 2 (1-255) | |||
uint16_t bottoming_reading[MATRIX_ROWS][MATRIX_COLS]; // bottoming reading | |||
} eeprom_ec_config_t; | |||
typedef struct { | |||
uint8_t actuation_mode; // 0: normal board-wide APC, 1: Rapid trigger from specific board-wide actuation point (it can be very near that baseline noise and be "full travel") | |||
uint16_t mode_0_actuation_threshold; // threshold for key press in mode 0 | |||
uint16_t mode_0_release_threshold; // threshold for key release in mode 0 | |||
uint16_t mode_1_initial_deadzone_offset; // threshold for key press in mode 1 (initial deadzone) | |||
uint16_t rescaled_mode_0_actuation_threshold[MATRIX_ROWS][MATRIX_COLS]; // threshold for key press in mode 0 rescaled to actual scale | |||
uint16_t rescaled_mode_0_release_threshold[MATRIX_ROWS][MATRIX_COLS]; // threshold for key release in mode 0 rescaled to actual scale | |||
uint16_t rescaled_mode_1_initial_deadzone_offset[MATRIX_ROWS][MATRIX_COLS]; // threshold for key press in mode 1 (initial deadzone) rescaled to actual scale | |||
uint8_t mode_1_actuation_offset; // offset for key press in mode 1 (1-255) | |||
uint8_t mode_1_release_offset; // offset for key release in mode 1 (1-255) | |||
uint16_t extremum[MATRIX_ROWS][MATRIX_COLS]; // extremum values for mode 1 | |||
uint16_t noise_floor[MATRIX_ROWS][MATRIX_COLS]; // noise floor detected during startup | |||
bool bottoming_calibration; // calibration mode for bottoming out values (true: calibration mode, false: normal mode) | |||
bool bottoming_calibration_starter[MATRIX_ROWS][MATRIX_COLS]; // calibration mode for bottoming out values (true: calibration mode, false: normal mode) | |||
uint16_t bottoming_reading[MATRIX_ROWS][MATRIX_COLS]; // bottoming reading | |||
} ec_config_t; | |||
// Check if the size of the reserved persistent memory is the same as the size of struct eeprom_ec_config_t | |||
_Static_assert(sizeof(eeprom_ec_config_t) == EECONFIG_KB_DATA_SIZE, "Mismatch in keyboard EECONFIG stored data"); | |||
extern eeprom_ec_config_t eeprom_ec_config; | |||
extern ec_config_t ec_config; | |||
void init_row(void); | |||
void init_amux(void); | |||
void select_amux_channel(uint8_t channel, uint8_t col); | |||
void disable_unused_amux(uint8_t channel); | |||
void discharge_capacitor(void); | |||
void charge_capacitor(uint8_t row); | |||
int ec_init(void); | |||
void ec_noise_floor(void); | |||
bool ec_matrix_scan(matrix_row_t current_matrix[]); | |||
uint16_t ec_readkey_raw(uint8_t channel, uint8_t row, uint8_t col); | |||
bool ec_update_key(matrix_row_t* current_row, uint8_t row, uint8_t col, uint16_t sw_value); | |||
void ec_print_matrix(void); | |||
uint16_t rescale(uint16_t x, uint16_t in_min, uint16_t in_max, uint16_t out_min, uint16_t out_max); | |||
bool indicators_callback(void); |
@ -0,0 +1,119 @@ | |||
/* Copyright 2023 Cipulot | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 3 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#include "ec_switch_matrix.h" | |||
#include "quantum.h" | |||
void eeconfig_init_kb(void) { | |||
// Default values | |||
eeprom_ec_config.num.h = 0; | |||
eeprom_ec_config.num.s = 0; | |||
eeprom_ec_config.num.v = 60; | |||
eeprom_ec_config.num.enabled = true; | |||
eeprom_ec_config.caps.h = 0; | |||
eeprom_ec_config.caps.s = 0; | |||
eeprom_ec_config.caps.v = 60; | |||
eeprom_ec_config.caps.enabled = true; | |||
eeprom_ec_config.scroll.h = 0; | |||
eeprom_ec_config.scroll.s = 0; | |||
eeprom_ec_config.scroll.v = 60; | |||
eeprom_ec_config.scroll.enabled = true; | |||
eeprom_ec_config.actuation_mode = DEFAULT_ACTUATION_MODE; | |||
eeprom_ec_config.mode_0_actuation_threshold = DEFAULT_MODE_0_ACTUATION_LEVEL; | |||
eeprom_ec_config.mode_0_release_threshold = DEFAULT_MODE_0_RELEASE_LEVEL; | |||
eeprom_ec_config.mode_1_initial_deadzone_offset = DEFAULT_MODE_1_INITIAL_DEADZONE_OFFSET; | |||
eeprom_ec_config.mode_1_actuation_offset = DEFAULT_MODE_1_ACTUATION_OFFSET; | |||
eeprom_ec_config.mode_1_release_offset = DEFAULT_MODE_1_RELEASE_OFFSET; | |||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | |||
for (uint8_t col = 0; col < MATRIX_COLS; col++) { | |||
eeprom_ec_config.bottoming_reading[row][col] = DEFAULT_BOTTOMING_READING; | |||
} | |||
} | |||
// Write default value to EEPROM now | |||
eeconfig_update_kb_datablock(&eeprom_ec_config); | |||
eeconfig_init_user(); | |||
} | |||
// On Keyboard startup | |||
void keyboard_post_init_kb(void) { | |||
// Read custom menu variables from memory | |||
eeconfig_read_kb_datablock(&eeprom_ec_config); | |||
// Set runtime values to EEPROM values | |||
ec_config.actuation_mode = eeprom_ec_config.actuation_mode; | |||
ec_config.mode_0_actuation_threshold = eeprom_ec_config.mode_0_actuation_threshold; | |||
ec_config.mode_0_release_threshold = eeprom_ec_config.mode_0_release_threshold; | |||
ec_config.mode_1_initial_deadzone_offset = eeprom_ec_config.mode_1_initial_deadzone_offset; | |||
ec_config.mode_1_actuation_offset = eeprom_ec_config.mode_1_actuation_offset; | |||
ec_config.mode_1_release_offset = eeprom_ec_config.mode_1_release_offset; | |||
ec_config.bottoming_calibration = false; | |||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | |||
for (uint8_t col = 0; col < MATRIX_COLS; col++) { | |||
ec_config.bottoming_calibration_starter[row][col] = true; | |||
ec_config.bottoming_reading[row][col] = eeprom_ec_config.bottoming_reading[row][col]; | |||
ec_config.rescaled_mode_0_actuation_threshold[row][col] = rescale(ec_config.mode_0_actuation_threshold, 0, 1023, ec_config.noise_floor[row][col], eeprom_ec_config.bottoming_reading[row][col]); | |||
ec_config.rescaled_mode_0_release_threshold[row][col] = rescale(ec_config.mode_0_release_threshold, 0, 1023, ec_config.noise_floor[row][col], eeprom_ec_config.bottoming_reading[row][col]); | |||
ec_config.rescaled_mode_1_initial_deadzone_offset[row][col] = rescale(ec_config.mode_1_initial_deadzone_offset, 0, 1023, ec_config.noise_floor[row][col], eeprom_ec_config.bottoming_reading[row][col]); | |||
} | |||
} | |||
// Set the RGB LEDs range that will be used for the effects | |||
rgblight_set_effect_range(3, 66); | |||
// Call the indicator callback to set the indicator color | |||
indicators_callback(); | |||
keyboard_post_init_user(); | |||
} | |||
// This function gets called when caps, num, scroll change | |||
bool led_update_kb(led_t led_state) { | |||
indicators_callback(); | |||
return true; | |||
} | |||
// This function is called when layers change | |||
layer_state_t layer_state_set_user(layer_state_t state) { | |||
indicators_callback(); | |||
return state; | |||
} | |||
// INDICATOR CALLBACK ------------------------------------------------------------------------------ | |||
/* LED index to physical position | |||
* | |||
* LED2 | LED1 | LED0 | |||
* -----+------+-------- | |||
* Num | Caps | Scroll | | |||
*/ | |||
bool indicators_callback(void) { | |||
if ((eeprom_ec_config.num.enabled) && (host_keyboard_led_state().num_lock)) | |||
sethsv(eeprom_ec_config.num.h, eeprom_ec_config.num.s, eeprom_ec_config.num.v, (rgb_led_t *)&led[NUM_INDICATOR_INDEX]); | |||
else | |||
sethsv(0, 0, 0, (rgb_led_t *)&led[NUM_INDICATOR_INDEX]); | |||
if ((eeprom_ec_config.caps.enabled) && (host_keyboard_led_state().caps_lock)) | |||
sethsv(eeprom_ec_config.caps.h, eeprom_ec_config.caps.s, eeprom_ec_config.caps.v, (rgb_led_t *)&led[CAPS_INDICATOR_INDEX]); | |||
else | |||
sethsv(0, 0, 0, (rgb_led_t *)&led[CAPS_INDICATOR_INDEX]); | |||
if ((eeprom_ec_config.scroll.enabled) && (host_keyboard_led_state().scroll_lock)) | |||
sethsv(eeprom_ec_config.scroll.h, eeprom_ec_config.scroll.s, eeprom_ec_config.scroll.v, (rgb_led_t *)&led[SCROLL_INDICATOR_INDEX]); | |||
else | |||
sethsv(0, 0, 0, (rgb_led_t *)&led[SCROLL_INDICATOR_INDEX]); | |||
return true; | |||
} |
@ -0,0 +1,23 @@ | |||
/* Copyright 2023 Cipulot | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 3 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#pragma once | |||
#define HAL_USE_ADC TRUE | |||
#define HAL_USE_PWM TRUE | |||
#define HAL_USE_PAL TRUE | |||
#include_next <halconf.h> |
@ -0,0 +1,133 @@ | |||
{ | |||
"manufacturer": "Cipulot", | |||
"keyboard_name": "EC Type-K", | |||
"maintainer": "Cipulot", | |||
"bootloader": "stm32-dfu", | |||
"build": { | |||
"lto": true | |||
}, | |||
"diode_direction": "COL2ROW", | |||
"eeprom": { | |||
"wear_leveling": { | |||
"backing_size": 4096 | |||
} | |||
}, | |||
"features": { | |||
"bootmagic": false, | |||
"console": true, | |||
"extrakey": true, | |||
"mousekey": true, | |||
"nkro": true, | |||
"rgblight": true | |||
}, | |||
"processor": "STM32F411", | |||
"qmk": { | |||
"locking": { | |||
"enabled": true, | |||
"resync": true | |||
} | |||
}, | |||
"rgblight": { | |||
"animations": { | |||
"alternating": true, | |||
"breathing": true, | |||
"christmas": true, | |||
"knight": true, | |||
"rainbow_mood": true, | |||
"rainbow_swirl": true, | |||
"rgb_test": true, | |||
"snake": true, | |||
"static_gradient": true, | |||
"twinkle": true | |||
}, | |||
"led_count": 69, | |||
"led_map": [0, 1, 2, 3, 4, 5, 66, 67, 68, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65], | |||
"max_brightness": 200 | |||
}, | |||
"usb": { | |||
"device_version": "0.0.1", | |||
"pid": "0x6BB4", | |||
"shared_endpoint": { | |||
"keyboard": true | |||
}, | |||
"vid": "0x6369" | |||
}, | |||
"ws2812": { | |||
"driver": "pwm", | |||
"pin": "B15" | |||
}, | |||
"layouts": { | |||
"LAYOUT": { | |||
"layout": [ | |||
{"matrix": [1, 0], "x": 0.75, "y": 0}, | |||
{"matrix": [0, 0], "x": 2.5, "y": 0}, | |||
{"matrix": [0, 1], "x": 3.5, "y": 0}, | |||
{"matrix": [0, 2], "x": 4.5, "y": 0}, | |||
{"matrix": [0, 3], "x": 5.5, "y": 0}, | |||
{"matrix": [0, 4], "x": 6.5, "y": 0}, | |||
{"matrix": [0, 5], "x": 7.5, "y": 0}, | |||
{"matrix": [0, 6], "x": 8.5, "y": 0}, | |||
{"matrix": [0, 7], "x": 10.5, "y": 0}, | |||
{"matrix": [0, 8], "x": 11.5, "y": 0}, | |||
{"matrix": [0, 9], "x": 12.5, "y": 0}, | |||
{"matrix": [0, 10], "x": 13.5, "y": 0}, | |||
{"matrix": [0, 11], "x": 14.5, "y": 0}, | |||
{"matrix": [0, 12], "x": 15.5, "y": 0}, | |||
{"matrix": [0, 13], "x": 16.5, "y": 0}, | |||
{"matrix": [0, 14], "x": 17.5, "y": 0}, | |||
{"matrix": [2, 0], "x": 0.5, "y": 1}, | |||
{"matrix": [1, 1], "x": 2.25, "y": 1, "w": 1.5}, | |||
{"matrix": [1, 2], "x": 3.75, "y": 1}, | |||
{"matrix": [1, 3], "x": 4.75, "y": 1}, | |||
{"matrix": [1, 4], "x": 5.75, "y": 1}, | |||
{"matrix": [1, 5], "x": 6.75, "y": 1}, | |||
{"matrix": [1, 6], "x": 7.75, "y": 1}, | |||
{"matrix": [1, 7], "x": 10.25, "y": 1}, | |||
{"matrix": [1, 8], "x": 11.25, "y": 1}, | |||
{"matrix": [1, 9], "x": 12.25, "y": 1}, | |||
{"matrix": [1, 10], "x": 13.25, "y": 1}, | |||
{"matrix": [1, 11], "x": 14.25, "y": 1}, | |||
{"matrix": [1, 12], "x": 15.25, "y": 1}, | |||
{"matrix": [1, 13], "x": 16.25, "y": 1}, | |||
{"matrix": [1, 14], "x": 17.25, "y": 1, "w": 1.5}, | |||
{"matrix": [3, 0], "x": 0.25, "y": 2}, | |||
{"matrix": [2, 1], "x": 2, "y": 2, "w": 1.75}, | |||
{"matrix": [2, 2], "x": 3.75, "y": 2}, | |||
{"matrix": [2, 3], "x": 4.75, "y": 2}, | |||
{"matrix": [2, 4], "x": 5.75, "y": 2}, | |||
{"matrix": [2, 5], "x": 6.75, "y": 2}, | |||
{"matrix": [2, 6], "x": 7.75, "y": 2}, | |||
{"matrix": [2, 7], "x": 10.75, "y": 2}, | |||
{"matrix": [2, 8], "x": 11.75, "y": 2}, | |||
{"matrix": [2, 9], "x": 12.75, "y": 2}, | |||
{"matrix": [2, 10], "x": 13.75, "y": 2}, | |||
{"matrix": [2, 11], "x": 14.75, "y": 2}, | |||
{"matrix": [2, 12], "x": 15.75, "y": 2}, | |||
{"matrix": [2, 14], "x": 16.75, "y": 2, "w": 2.25}, | |||
{"matrix": [4, 0], "x": 0, "y": 3}, | |||
{"matrix": [3, 1], "x": 1.75, "y": 3, "w": 2.25}, | |||
{"matrix": [3, 2], "x": 4, "y": 3}, | |||
{"matrix": [3, 3], "x": 5, "y": 3}, | |||
{"matrix": [3, 4], "x": 6, "y": 3}, | |||
{"matrix": [3, 5], "x": 7, "y": 3}, | |||
{"matrix": [3, 6], "x": 8, "y": 3}, | |||
{"matrix": [3, 7], "x": 10.5, "y": 3}, | |||
{"matrix": [3, 8], "x": 11.5, "y": 3}, | |||
{"matrix": [3, 9], "x": 12.5, "y": 3}, | |||
{"matrix": [3, 10], "x": 13.5, "y": 3}, | |||
{"matrix": [3, 11], "x": 14.5, "y": 3}, | |||
{"matrix": [3, 12], "x": 15.5, "y": 3}, | |||
{"matrix": [3, 13], "x": 16.5, "y": 3, "w": 1.25}, | |||
{"matrix": [3, 14], "x": 17.75, "y": 3}, | |||
{"matrix": [4, 1], "x": 1.75, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 3], "x": 5, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 5], "x": 6.5, "y": 4, "w": 2}, | |||
{"matrix": [4, 6], "x": 8.5, "y": 4}, | |||
{"matrix": [4, 7], "x": 10, "y": 4}, | |||
{"matrix": [4, 8], "x": 11, "y": 4, "w": 2}, | |||
{"matrix": [4, 10], "x": 13, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 13], "x": 16.75, "y": 4, "w": 1.5} | |||
] | |||
} | |||
} | |||
} |
@ -0,0 +1,41 @@ | |||
/* Copyright 2023 Cipulot | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 3 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#include QMK_KEYBOARD_H | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
// clang-format off | |||
[0] = LAYOUT( | |||
KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, | |||
KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, | |||
KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENTER, | |||
KC_LGUI, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), | |||
KC_LCTL, KC_LALT, KC_SPC, KC_LGUI, KC_RGUI, KC_SPC, KC_RALT, MO(1) | |||
), | |||
[1] = LAYOUT( | |||
_______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, | |||
KC_HOME, _______, _______, KC_UP, _______, _______, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUSE, _______, _______, _______, | |||
KC_END, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, MO(2), _______ | |||
), | |||
[2] = LAYOUT( | |||
QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
NK_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______) | |||
}; |
@ -0,0 +1,41 @@ | |||
/* Copyright 2023 Cipulot | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 3 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#include QMK_KEYBOARD_H | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
// clang-format off | |||
[0] = LAYOUT( | |||
KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, | |||
KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, | |||
KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENTER, | |||
KC_LGUI, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), | |||
KC_LCTL, KC_LALT, KC_SPC, KC_LGUI, KC_RGUI, KC_SPC, KC_RALT, MO(1) | |||
), | |||
[1] = LAYOUT( | |||
_______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, | |||
KC_HOME, _______, _______, KC_UP, _______, _______, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUSE, _______, _______, _______, | |||
KC_END, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, MO(2), _______ | |||
), | |||
[2] = LAYOUT( | |||
QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
NK_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______) | |||
}; |
@ -0,0 +1,3 @@ | |||
VIA_ENABLE = yes | |||
SRC += via_ec_indicators.c |
@ -0,0 +1,502 @@ | |||
/* Copyright 2023 Cipulot | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 3 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#include "keyboards/cipulot/common/eeprom_tools.h" | |||
#include "ec_switch_matrix.h" | |||
#include "action.h" | |||
#include "print.h" | |||
#include "via.h" | |||
#ifdef VIA_ENABLE | |||
void ec_rescale_values(uint8_t item); | |||
void ec_save_threshold_data(uint8_t option); | |||
void ec_save_bottoming_reading(void); | |||
void ec_show_calibration_data(void); | |||
void ec_clear_bottoming_calibration_data(void); | |||
// Declaring enums for VIA config menu | |||
enum via_enums { | |||
// clang-format off | |||
id_num_indicator_enabled = 1, | |||
id_num_indicator_brightness = 2, | |||
id_num_indicator_color = 3, | |||
id_caps_indicator_enabled = 4, | |||
id_caps_indicator_brightness = 5, | |||
id_caps_indicator_color = 6, | |||
id_scroll_indicator_enabled = 7, | |||
id_scroll_indicator_brightness = 8, | |||
id_scroll_indicator_color = 9, | |||
id_actuation_mode = 10, | |||
id_mode_0_actuation_threshold = 11, | |||
id_mode_0_release_threshold = 12, | |||
id_save_threshold_data = 13, | |||
id_mode_1_initial_deadzone_offset = 14, | |||
id_mode_1_actuation_offset = 15, | |||
id_mode_1_release_offset = 16, | |||
id_bottoming_calibration = 17, | |||
id_noise_floor_calibration = 18, | |||
id_show_calibration_data = 19, | |||
id_clear_bottoming_calibration_data = 20 | |||
// clang-format on | |||
}; | |||
// Handle the data received by the keyboard from the VIA menus | |||
void via_config_set_value(uint8_t *data) { | |||
// data = [ value_id, value_data ] | |||
uint8_t *value_id = &(data[0]); | |||
uint8_t *value_data = &(data[1]); | |||
switch (*value_id) { | |||
case id_num_indicator_enabled: { | |||
if (value_data[0] == 1) { | |||
eeprom_ec_config.num.enabled = true; | |||
uprintf("#########################\n"); | |||
uprintf("# Num indicator enabled #\n"); | |||
uprintf("#########################\n"); | |||
} else { | |||
eeprom_ec_config.num.enabled = false; | |||
uprintf("##########################\n"); | |||
uprintf("# Num indicator disabled #\n"); | |||
uprintf("##########################\n"); | |||
} | |||
EEPROM_KB_PARTIAL_UPDATE(eeprom_ec_config, num.enabled); | |||
break; | |||
} | |||
case id_num_indicator_brightness: { | |||
eeprom_ec_config.num.v = value_data[0]; | |||
uprintf("Num indicator brightness: %d\n", eeprom_ec_config.num.v); | |||
EEPROM_KB_PARTIAL_UPDATE(eeprom_ec_config, num.v); | |||
break; | |||
} | |||
case id_num_indicator_color: { | |||
eeprom_ec_config.num.h = value_data[0]; | |||
eeprom_ec_config.num.s = value_data[1]; | |||
uprintf("Num indicator color: %d, %d\n", eeprom_ec_config.num.h, eeprom_ec_config.num.s); | |||
EEPROM_KB_PARTIAL_UPDATE(eeprom_ec_config, num.h); | |||
EEPROM_KB_PARTIAL_UPDATE(eeprom_ec_config, num.s); | |||
break; | |||
} | |||
case id_caps_indicator_enabled: { | |||
if (value_data[0] == 1) { | |||
eeprom_ec_config.caps.enabled = true; | |||
uprintf("##########################\n"); | |||
uprintf("# Caps indicator enabled #\n"); | |||
uprintf("##########################\n"); | |||
} else { | |||
eeprom_ec_config.caps.enabled = false; | |||
uprintf("###########################\n"); | |||
uprintf("# Caps indicator disabled #\n"); | |||
uprintf("###########################\n"); | |||
} | |||
EEPROM_KB_PARTIAL_UPDATE(eeprom_ec_config, caps.enabled); | |||
break; | |||
} | |||
case id_caps_indicator_brightness: { | |||
eeprom_ec_config.caps.v = value_data[0]; | |||
uprintf("Caps indicator brightness: %d\n", eeprom_ec_config.caps.v); | |||
EEPROM_KB_PARTIAL_UPDATE(eeprom_ec_config, caps.v); | |||
break; | |||
} | |||
case id_caps_indicator_color: { | |||
eeprom_ec_config.caps.h = value_data[0]; | |||
eeprom_ec_config.caps.s = value_data[1]; | |||
uprintf("Caps indicator color: %d, %d\n", eeprom_ec_config.caps.h, eeprom_ec_config.caps.s); | |||
EEPROM_KB_PARTIAL_UPDATE(eeprom_ec_config, caps.h); | |||
EEPROM_KB_PARTIAL_UPDATE(eeprom_ec_config, caps.s); | |||
break; | |||
} | |||
case id_scroll_indicator_enabled: { | |||
if (value_data[0] == 1) { | |||
eeprom_ec_config.scroll.enabled = true; | |||
uprintf("############################\n"); | |||
uprintf("# Scroll indicator enabled #\n"); | |||
uprintf("############################\n"); | |||
} else { | |||
eeprom_ec_config.scroll.enabled = false; | |||
uprintf("#############################\n"); | |||
uprintf("# Scroll indicator disabled #\n"); | |||
uprintf("#############################\n"); | |||
} | |||
EEPROM_KB_PARTIAL_UPDATE(eeprom_ec_config, scroll.enabled); | |||
break; | |||
} | |||
case id_scroll_indicator_brightness: { | |||
eeprom_ec_config.scroll.v = value_data[0]; | |||
uprintf("Scroll indicator brightness: %d\n", eeprom_ec_config.scroll.v); | |||
EEPROM_KB_PARTIAL_UPDATE(eeprom_ec_config, scroll.v); | |||
break; | |||
} | |||
case id_scroll_indicator_color: { | |||
eeprom_ec_config.scroll.h = value_data[0]; | |||
eeprom_ec_config.scroll.s = value_data[1]; | |||
uprintf("Scroll indicator color: %d, %d\n", eeprom_ec_config.scroll.h, eeprom_ec_config.scroll.s); | |||
EEPROM_KB_PARTIAL_UPDATE(eeprom_ec_config, scroll.h); | |||
EEPROM_KB_PARTIAL_UPDATE(eeprom_ec_config, scroll.s); | |||
break; | |||
} | |||
case id_actuation_mode: { | |||
eeprom_ec_config.actuation_mode = value_data[0]; | |||
ec_config.actuation_mode = eeprom_ec_config.actuation_mode; | |||
if (ec_config.actuation_mode == 0) { | |||
uprintf("#########################\n"); | |||
uprintf("# Actuation Mode: APC #\n"); | |||
uprintf("#########################\n"); | |||
} else if (ec_config.actuation_mode == 1) { | |||
uprintf("#################################\n"); | |||
uprintf("# Actuation Mode: Rapid Trigger #\n"); | |||
uprintf("#################################\n"); | |||
} | |||
EEPROM_KB_PARTIAL_UPDATE(eeprom_ec_config, actuation_mode); | |||
break; | |||
} | |||
case id_mode_0_actuation_threshold: { | |||
ec_config.mode_0_actuation_threshold = value_data[1] | (value_data[0] << 8); | |||
uprintf("APC Mode Actuation Threshold: %d\n", ec_config.mode_0_actuation_threshold); | |||
break; | |||
} | |||
case id_mode_0_release_threshold: { | |||
eeprom_ec_config.mode_0_release_threshold = value_data[1] | (value_data[0] << 8); | |||
ec_config.mode_0_release_threshold = eeprom_ec_config.mode_0_release_threshold; | |||
uprintf("APC Mode Release Threshold: %d\n", ec_config.mode_0_release_threshold); | |||
break; | |||
} | |||
case id_mode_1_initial_deadzone_offset: { | |||
ec_config.mode_1_initial_deadzone_offset = value_data[1] | (value_data[0] << 8); | |||
uprintf("Rapid Trigger Mode Initial Deadzone Offset: %d\n", ec_config.mode_1_initial_deadzone_offset); | |||
break; | |||
} | |||
case id_mode_1_actuation_offset: { | |||
ec_config.mode_1_actuation_offset = value_data[0]; | |||
uprintf("Rapid Trigger Mode Actuation Sensitivity: %d\n", ec_config.mode_1_actuation_offset); | |||
break; | |||
} | |||
case id_mode_1_release_offset: { | |||
ec_config.mode_1_release_offset = value_data[0]; | |||
uprintf("Rapid Trigger Mode Release Sensitivity: %d\n", ec_config.mode_1_release_offset); | |||
break; | |||
} | |||
case id_bottoming_calibration: { | |||
if (value_data[0] == 1) { | |||
ec_config.bottoming_calibration = true; | |||
uprintf("##############################\n"); | |||
uprintf("# Bottoming calibration mode #\n"); | |||
uprintf("##############################\n"); | |||
} else { | |||
ec_config.bottoming_calibration = false; | |||
ec_save_bottoming_reading(); | |||
uprintf("## Bottoming calibration done ##\n"); | |||
ec_show_calibration_data(); | |||
} | |||
break; | |||
} | |||
case id_save_threshold_data: { | |||
ec_save_threshold_data(value_data[0]); | |||
break; | |||
} | |||
case id_noise_floor_calibration: { | |||
if (value_data[0] == 0) { | |||
ec_noise_floor(); | |||
ec_rescale_values(0); | |||
ec_rescale_values(1); | |||
ec_rescale_values(2); | |||
uprintf("#############################\n"); | |||
uprintf("# Noise floor data acquired #\n"); | |||
uprintf("#############################\n"); | |||
break; | |||
} | |||
} | |||
case id_show_calibration_data: { | |||
// Show calibration data once if the user toggle the switch | |||
if (value_data[0] == 0) { | |||
ec_show_calibration_data(); | |||
break; | |||
} | |||
} | |||
case id_clear_bottoming_calibration_data: { | |||
if (value_data[0] == 0) { | |||
ec_clear_bottoming_calibration_data(); | |||
} | |||
} | |||
default: { | |||
// Unhandled value. | |||
break; | |||
} | |||
} | |||
// Call the indicator callback to set the indicator color | |||
indicators_callback(); | |||
} | |||
// Handle the data sent by the keyboard to the VIA menus | |||
void via_config_get_value(uint8_t *data) { | |||
// data = [ value_id, value_data ] | |||
uint8_t *value_id = &(data[0]); | |||
uint8_t *value_data = &(data[1]); | |||
switch (*value_id) { | |||
case id_num_indicator_enabled: { | |||
value_data[0] = eeprom_ec_config.num.enabled; | |||
break; | |||
} | |||
case id_num_indicator_brightness: { | |||
value_data[0] = eeprom_ec_config.num.v; | |||
break; | |||
} | |||
case id_num_indicator_color: { | |||
value_data[0] = eeprom_ec_config.num.h; | |||
value_data[1] = eeprom_ec_config.num.s; | |||
break; | |||
} | |||
case id_caps_indicator_enabled: { | |||
value_data[0] = eeprom_ec_config.caps.enabled; | |||
break; | |||
} | |||
case id_caps_indicator_brightness: { | |||
value_data[0] = eeprom_ec_config.caps.v; | |||
break; | |||
} | |||
case id_caps_indicator_color: { | |||
value_data[0] = eeprom_ec_config.caps.h; | |||
value_data[1] = eeprom_ec_config.caps.s; | |||
break; | |||
} | |||
case id_scroll_indicator_enabled: { | |||
value_data[0] = eeprom_ec_config.scroll.enabled; | |||
break; | |||
} | |||
case id_scroll_indicator_brightness: { | |||
value_data[0] = eeprom_ec_config.scroll.v; | |||
break; | |||
} | |||
case id_scroll_indicator_color: { | |||
value_data[0] = eeprom_ec_config.scroll.h; | |||
value_data[1] = eeprom_ec_config.scroll.s; | |||
break; | |||
} | |||
case id_actuation_mode: { | |||
value_data[0] = eeprom_ec_config.actuation_mode; | |||
break; | |||
} | |||
case id_mode_0_actuation_threshold: { | |||
value_data[0] = eeprom_ec_config.mode_0_actuation_threshold >> 8; | |||
value_data[1] = eeprom_ec_config.mode_0_actuation_threshold & 0xFF; | |||
break; | |||
} | |||
case id_mode_0_release_threshold: { | |||
value_data[0] = eeprom_ec_config.mode_0_release_threshold >> 8; | |||
value_data[1] = eeprom_ec_config.mode_0_release_threshold & 0xFF; | |||
break; | |||
} | |||
case id_mode_1_initial_deadzone_offset: { | |||
value_data[0] = eeprom_ec_config.mode_1_initial_deadzone_offset >> 8; | |||
value_data[1] = eeprom_ec_config.mode_1_initial_deadzone_offset & 0xFF; | |||
break; | |||
} | |||
case id_mode_1_actuation_offset: { | |||
value_data[0] = eeprom_ec_config.mode_1_actuation_offset; | |||
break; | |||
} | |||
case id_mode_1_release_offset: { | |||
value_data[0] = eeprom_ec_config.mode_1_release_offset; | |||
break; | |||
} | |||
default: { | |||
// Unhandled value. | |||
break; | |||
} | |||
} | |||
} | |||
// Handle the commands sent and received by the keyboard with VIA | |||
void via_custom_value_command_kb(uint8_t *data, uint8_t length) { | |||
// data = [ command_id, channel_id, value_id, value_data ] | |||
uint8_t *command_id = &(data[0]); | |||
uint8_t *channel_id = &(data[1]); | |||
uint8_t *value_id_and_data = &(data[2]); | |||
if (*channel_id == id_custom_channel) { | |||
switch (*command_id) { | |||
case id_custom_set_value: { | |||
via_config_set_value(value_id_and_data); | |||
break; | |||
} | |||
case id_custom_get_value: { | |||
via_config_get_value(value_id_and_data); | |||
break; | |||
} | |||
case id_custom_save: { | |||
// Bypass the save function in favor of pinpointed saves | |||
break; | |||
} | |||
default: { | |||
// Unhandled message. | |||
*command_id = id_unhandled; | |||
break; | |||
} | |||
} | |||
return; | |||
} | |||
*command_id = id_unhandled; | |||
} | |||
// Rescale the values received by VIA to fit the new range | |||
void ec_rescale_values(uint8_t item) { | |||
switch (item) { | |||
// Rescale the APC mode actuation thresholds | |||
case 0: | |||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | |||
for (uint8_t col = 0; col < MATRIX_COLS; col++) { | |||
ec_config.rescaled_mode_0_actuation_threshold[row][col] = rescale(ec_config.mode_0_actuation_threshold, 0, 1023, ec_config.noise_floor[row][col], eeprom_ec_config.bottoming_reading[row][col]); | |||
} | |||
} | |||
break; | |||
// Rescale the APC mode release thresholds | |||
case 1: | |||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | |||
for (uint8_t col = 0; col < MATRIX_COLS; col++) { | |||
ec_config.rescaled_mode_0_release_threshold[row][col] = rescale(ec_config.mode_0_release_threshold, 0, 1023, ec_config.noise_floor[row][col], eeprom_ec_config.bottoming_reading[row][col]); | |||
} | |||
} | |||
break; | |||
// Rescale the Rapid Trigger mode initial deadzone offsets | |||
case 2: | |||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | |||
for (uint8_t col = 0; col < MATRIX_COLS; col++) { | |||
ec_config.rescaled_mode_1_initial_deadzone_offset[row][col] = rescale(ec_config.mode_1_initial_deadzone_offset, 0, 1023, ec_config.noise_floor[row][col], eeprom_ec_config.bottoming_reading[row][col]); | |||
} | |||
} | |||
break; | |||
default: | |||
// Unhandled item. | |||
break; | |||
} | |||
} | |||
void ec_save_threshold_data(uint8_t option) { | |||
// Save APC mode thresholds and rescale them for runtime usage | |||
if (option == 0) { | |||
eeprom_ec_config.mode_0_actuation_threshold = ec_config.mode_0_actuation_threshold; | |||
eeprom_ec_config.mode_0_release_threshold = ec_config.mode_0_release_threshold; | |||
ec_rescale_values(0); | |||
ec_rescale_values(1); | |||
} | |||
// Save Rapid Trigger mode thresholds and rescale them for runtime usage | |||
else if (option == 1) { | |||
eeprom_ec_config.mode_1_initial_deadzone_offset = ec_config.mode_1_initial_deadzone_offset; | |||
ec_rescale_values(2); | |||
} | |||
eeconfig_update_kb_datablock(&eeprom_ec_config); | |||
uprintf("####################################\n"); | |||
uprintf("# New thresholds applied and saved #\n"); | |||
uprintf("####################################\n"); | |||
} | |||
// Save the bottoming reading | |||
void ec_save_bottoming_reading(void) { | |||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | |||
for (uint8_t col = 0; col < MATRIX_COLS; col++) { | |||
// If the bottom reading doesn't go over the noise floor by 100, it is likely that: | |||
// 1. The key is not actually in the matrix | |||
// 2. The key is on an alternative layout, therefore not being pressed | |||
// 3. The key in in the current layout but not being pressed | |||
if (ec_config.bottoming_reading[row][col] < (ec_config.noise_floor[row][col] + 100)) { | |||
eeprom_ec_config.bottoming_reading[row][col] = 1023; | |||
} else { | |||
eeprom_ec_config.bottoming_reading[row][col] = ec_config.bottoming_reading[row][col]; | |||
} | |||
} | |||
} | |||
// Rescale the values to fit the new range for runtime usage | |||
ec_rescale_values(0); | |||
ec_rescale_values(1); | |||
ec_rescale_values(2); | |||
eeconfig_update_kb_datablock(&eeprom_ec_config); | |||
} | |||
// Show the calibration data | |||
void ec_show_calibration_data(void) { | |||
uprintf("\n###############\n"); | |||
uprintf("# Noise Floor #\n"); | |||
uprintf("###############\n"); | |||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | |||
for (uint8_t col = 0; col < MATRIX_COLS - 1; col++) { | |||
uprintf("%4d,", ec_config.noise_floor[row][col]); | |||
} | |||
uprintf("%4d\n", ec_config.noise_floor[row][MATRIX_COLS - 1]); | |||
} | |||
uprintf("\n######################\n"); | |||
uprintf("# Bottoming Readings #\n"); | |||
uprintf("######################\n"); | |||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | |||
for (uint8_t col = 0; col < MATRIX_COLS - 1; col++) { | |||
uprintf("%4d,", eeprom_ec_config.bottoming_reading[row][col]); | |||
} | |||
uprintf("%4d\n", eeprom_ec_config.bottoming_reading[row][MATRIX_COLS - 1]); | |||
} | |||
uprintf("\n######################################\n"); | |||
uprintf("# Rescaled APC Mode Actuation Points #\n"); | |||
uprintf("######################################\n"); | |||
uprintf("Original APC Mode Actuation Point: %4d\n", ec_config.mode_0_actuation_threshold); | |||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | |||
for (uint8_t col = 0; col < MATRIX_COLS - 1; col++) { | |||
uprintf("%4d,", ec_config.rescaled_mode_0_actuation_threshold[row][col]); | |||
} | |||
uprintf("%4d\n", ec_config.rescaled_mode_0_actuation_threshold[row][MATRIX_COLS - 1]); | |||
} | |||
uprintf("\n######################################\n"); | |||
uprintf("# Rescaled APC Mode Release Points #\n"); | |||
uprintf("######################################\n"); | |||
uprintf("Original APC Mode Release Point: %4d\n", ec_config.mode_0_release_threshold); | |||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | |||
for (uint8_t col = 0; col < MATRIX_COLS - 1; col++) { | |||
uprintf("%4d,", ec_config.rescaled_mode_0_release_threshold[row][col]); | |||
} | |||
uprintf("%4d\n", ec_config.rescaled_mode_0_release_threshold[row][MATRIX_COLS - 1]); | |||
} | |||
uprintf("\n#######################################################\n"); | |||
uprintf("# Rescaled Rapid Trigger Mode Initial Deadzone Offset #\n"); | |||
uprintf("#######################################################\n"); | |||
uprintf("Original Rapid Trigger Mode Initial Deadzone Offset: %4d\n", ec_config.mode_1_initial_deadzone_offset); | |||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | |||
for (uint8_t col = 0; col < MATRIX_COLS - 1; col++) { | |||
uprintf("%4d,", ec_config.rescaled_mode_1_initial_deadzone_offset[row][col]); | |||
} | |||
uprintf("%4d\n", ec_config.rescaled_mode_1_initial_deadzone_offset[row][MATRIX_COLS - 1]); | |||
} | |||
print("\n"); | |||
} | |||
// Clear the calibration data | |||
void ec_clear_bottoming_calibration_data(void) { | |||
// Clear the EEPROM data | |||
eeconfig_init_kb(); | |||
// Reset the runtime values to the EEPROM values | |||
keyboard_post_init_kb(); | |||
uprintf("######################################\n"); | |||
uprintf("# Bottoming calibration data cleared #\n"); | |||
uprintf("######################################\n"); | |||
} | |||
#endif // VIA_ENABLE |
@ -0,0 +1,42 @@ | |||
/* Copyright 2023 Cipulot | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 3 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#include "ec_switch_matrix.h" | |||
#include "matrix.h" | |||
extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values | |||
extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values | |||
// Custom matrix init function | |||
void matrix_init_custom(void) { | |||
// Initialize EC | |||
ec_init(); | |||
// Get the noise floor at boot | |||
ec_noise_floor(); | |||
} | |||
// Custom matrix scan function | |||
bool matrix_scan_custom(matrix_row_t current_matrix[]) { | |||
bool updated = ec_matrix_scan(current_matrix); | |||
return updated; | |||
} | |||
// Bootmagic overriden to avoid conflicts with EC | |||
void bootmagic_scan(void) { | |||
; | |||
} |
@ -0,0 +1,28 @@ | |||
/* Copyright 2023 Cipulot | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 3 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#pragma once | |||
#include_next <mcuconf.h> | |||
#undef STM32_ADC_USE_ADC1 | |||
#define STM32_ADC_USE_ADC1 TRUE | |||
#undef STM32_PWM_USE_ADVANCED | |||
#define STM32_PWM_USE_ADVANCED TRUE | |||
#undef STM32_PWM_USE_TIM1 | |||
#define STM32_PWM_USE_TIM1 TRUE |
@ -0,0 +1,26 @@ | |||
# EC Type-K | |||
![EC Type-K](https://i.imgur.com/hFQ0qCfh.png) | |||
EC Type-K Keyboard by gok. | |||
* Keyboard Maintainer: [cipulot](https://github.com/cipulot) | |||
* Hardware Supported: EC Type-K | |||
* Hardware Availability: [gok](https://www.gok.design/) | |||
Make example for this keyboard (after setting up your build environment): | |||
make cipulot/ec_typek:default | |||
Flashing example for this keyboard: | |||
make cipulot/ec_typek:default:flash | |||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | |||
## Bootloader | |||
Enter the bootloader in 2 ways: | |||
* **Physical Boot0 pins**: Short the Boot0 pins on the back of the PCB while plugging in the keyboard | |||
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available |
@ -0,0 +1,4 @@ | |||
CUSTOM_MATRIX = lite | |||
ANALOG_DRIVER_REQUIRED = yes | |||
SRC += matrix.c ec_switch_matrix.c | |||
OPT = 2 |
@ -0,0 +1,66 @@ | |||
/* Copyright 2023 Cipulot | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 3 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#pragma once | |||
#define MATRIX_ROWS 5 | |||
#define MATRIX_COLS 14 | |||
#define MATRIX_ROW_PINS \ | |||
{ B13, B14, B15, A8, A15 } | |||
#define AMUX_COUNT 2 | |||
#define AMUX_MAX_COLS_COUNT 8 | |||
#define AMUX_EN_PINS \ | |||
{ B7, B3 } | |||
#define AMUX_SEL_PINS \ | |||
{ B6, B5, B4 } | |||
#define AMUX_COL_CHANNELS_SIZES \ | |||
{ 8, 6 } | |||
#define AMUX_0_COL_CHANNELS \ | |||
{ 0, 3, 1, 2, 4, 5, 6, 7 } | |||
#define AMUX_1_COL_CHANNELS \ | |||
{ 0, 3, 1, 2, 4, 5 } | |||
#define AMUX_COL_CHANNELS AMUX_0_COL_CHANNELS, AMUX_1_COL_CHANNELS | |||
#define DISCHARGE_PIN A3 | |||
#define ANALOG_PORT A2 | |||
#define DEFAULT_ACTUATION_MODE 0 | |||
#define DEFAULT_MODE_0_ACTUATION_LEVEL 550 | |||
#define DEFAULT_MODE_0_RELEASE_LEVEL 500 | |||
#define DEFAULT_MODE_1_INITIAL_DEADZONE_OFFSET DEFAULT_MODE_0_ACTUATION_LEVEL | |||
#define DEFAULT_MODE_1_ACTUATION_OFFSET 70 | |||
#define DEFAULT_MODE_1_RELEASE_OFFSET 70 | |||
#define DEFAULT_EXTREMUM 1023 | |||
#define EXPECTED_NOISE_FLOOR 0 | |||
#define NOISE_FLOOR_THRESHOLD 50 | |||
#define BOTTOMING_CALIBRATION_THRESHOLD 100 | |||
#define DEFAULT_NOISE_FLOOR_SAMPLING_COUNT 30 | |||
#define DEFAULT_BOTTOMING_READING 1023 | |||
#define DEFAULT_CALIBRATION_STARTER true | |||
#define DISCHARGE_TIME 10 | |||
// #define DEBUG_MATRIX_SCAN_RATE | |||
#define EECONFIG_KB_DATA_SIZE 149 |
@ -0,0 +1,21 @@ | |||
/* Copyright 2023 Cipulot | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 3 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#pragma once | |||
#define HAL_USE_ADC TRUE | |||
#include_next <halconf.h> |
@ -0,0 +1,225 @@ | |||
{ | |||
"manufacturer": "Cipulot", | |||
"keyboard_name": "MNK 60 EC", | |||
"maintainer": "Cipulot", | |||
"bootloader": "stm32-dfu", | |||
"build": { | |||
"lto": true | |||
}, | |||
"diode_direction": "COL2ROW", | |||
"features": { | |||
"bootmagic": false, | |||
"extrakey": true, | |||
"mousekey": true, | |||
"nkro": true | |||
}, | |||
"processor": "STM32F401", | |||
"qmk": { | |||
"locking": { | |||
"enabled": true, | |||
"resync": true | |||
} | |||
}, | |||
"usb": { | |||
"device_version": "0.0.1", | |||
"pid": "0x6BB6", | |||
"vid": "0x6369" | |||
}, | |||
"community_layouts": ["60_ansi_wkl_split_bs_rshift", "60_hhkb", "60_tsangan_hhkb"], | |||
"layouts": { | |||
"LAYOUT_60_ansi_wkl_split_bs_rshift": { | |||
"layout": [ | |||
{"matrix": [0, 0], "x": 0, "y": 0}, | |||
{"matrix": [0, 1], "x": 1, "y": 0}, | |||
{"matrix": [0, 2], "x": 2, "y": 0}, | |||
{"matrix": [0, 3], "x": 3, "y": 0}, | |||
{"matrix": [0, 4], "x": 4, "y": 0}, | |||
{"matrix": [0, 5], "x": 5, "y": 0}, | |||
{"matrix": [0, 6], "x": 6, "y": 0}, | |||
{"matrix": [0, 7], "x": 7, "y": 0}, | |||
{"matrix": [0, 8], "x": 8, "y": 0}, | |||
{"matrix": [0, 9], "x": 9, "y": 0}, | |||
{"matrix": [0, 10], "x": 10, "y": 0}, | |||
{"matrix": [0, 11], "x": 11, "y": 0}, | |||
{"matrix": [0, 12], "x": 12, "y": 0}, | |||
{"matrix": [0, 13], "x": 13, "y": 0}, | |||
{"matrix": [2, 13], "x": 14, "y": 0}, | |||
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, | |||
{"matrix": [1, 1], "x": 1.5, "y": 1}, | |||
{"matrix": [1, 2], "x": 2.5, "y": 1}, | |||
{"matrix": [1, 3], "x": 3.5, "y": 1}, | |||
{"matrix": [1, 4], "x": 4.5, "y": 1}, | |||
{"matrix": [1, 5], "x": 5.5, "y": 1}, | |||
{"matrix": [1, 6], "x": 6.5, "y": 1}, | |||
{"matrix": [1, 7], "x": 7.5, "y": 1}, | |||
{"matrix": [1, 8], "x": 8.5, "y": 1}, | |||
{"matrix": [1, 9], "x": 9.5, "y": 1}, | |||
{"matrix": [1, 10], "x": 10.5, "y": 1}, | |||
{"matrix": [1, 11], "x": 11.5, "y": 1}, | |||
{"matrix": [1, 12], "x": 12.5, "y": 1}, | |||
{"matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, | |||
{"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, | |||
{"matrix": [2, 1], "x": 1.75, "y": 2}, | |||
{"matrix": [2, 2], "x": 2.75, "y": 2}, | |||
{"matrix": [2, 3], "x": 3.75, "y": 2}, | |||
{"matrix": [2, 4], "x": 4.75, "y": 2}, | |||
{"matrix": [2, 5], "x": 5.75, "y": 2}, | |||
{"matrix": [2, 6], "x": 6.75, "y": 2}, | |||
{"matrix": [2, 7], "x": 7.75, "y": 2}, | |||
{"matrix": [2, 8], "x": 8.75, "y": 2}, | |||
{"matrix": [2, 9], "x": 9.75, "y": 2}, | |||
{"matrix": [2, 10], "x": 10.75, "y": 2}, | |||
{"matrix": [2, 11], "x": 11.75, "y": 2}, | |||
{"matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, | |||
{"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, | |||
{"matrix": [3, 1], "x": 2.25, "y": 3}, | |||
{"matrix": [3, 2], "x": 3.25, "y": 3}, | |||
{"matrix": [3, 3], "x": 4.25, "y": 3}, | |||
{"matrix": [3, 4], "x": 5.25, "y": 3}, | |||
{"matrix": [3, 5], "x": 6.25, "y": 3}, | |||
{"matrix": [3, 6], "x": 7.25, "y": 3}, | |||
{"matrix": [3, 7], "x": 8.25, "y": 3}, | |||
{"matrix": [3, 8], "x": 9.25, "y": 3}, | |||
{"matrix": [3, 9], "x": 10.25, "y": 3}, | |||
{"matrix": [3, 10], "x": 11.25, "y": 3}, | |||
{"matrix": [3, 11], "x": 12.25, "y": 3, "w": 1.75}, | |||
{"matrix": [3, 12], "x": 14, "y": 3}, | |||
{"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 5], "x": 4, "y": 4, "w": 7}, | |||
{"matrix": [4, 10], "x": 11, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 12], "x": 13.5, "y": 4, "w": 1.5} | |||
] | |||
}, | |||
"LAYOUT_60_hhkb": { | |||
"layout": [ | |||
{"matrix": [0, 0], "x": 0, "y": 0}, | |||
{"matrix": [0, 1], "x": 1, "y": 0}, | |||
{"matrix": [0, 2], "x": 2, "y": 0}, | |||
{"matrix": [0, 3], "x": 3, "y": 0}, | |||
{"matrix": [0, 4], "x": 4, "y": 0}, | |||
{"matrix": [0, 5], "x": 5, "y": 0}, | |||
{"matrix": [0, 6], "x": 6, "y": 0}, | |||
{"matrix": [0, 7], "x": 7, "y": 0}, | |||
{"matrix": [0, 8], "x": 8, "y": 0}, | |||
{"matrix": [0, 9], "x": 9, "y": 0}, | |||
{"matrix": [0, 10], "x": 10, "y": 0}, | |||
{"matrix": [0, 11], "x": 11, "y": 0}, | |||
{"matrix": [0, 12], "x": 12, "y": 0}, | |||
{"matrix": [0, 13], "x": 13, "y": 0}, | |||
{"matrix": [2, 13], "x": 14, "y": 0}, | |||
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, | |||
{"matrix": [1, 1], "x": 1.5, "y": 1}, | |||
{"matrix": [1, 2], "x": 2.5, "y": 1}, | |||
{"matrix": [1, 3], "x": 3.5, "y": 1}, | |||
{"matrix": [1, 4], "x": 4.5, "y": 1}, | |||
{"matrix": [1, 5], "x": 5.5, "y": 1}, | |||
{"matrix": [1, 6], "x": 6.5, "y": 1}, | |||
{"matrix": [1, 7], "x": 7.5, "y": 1}, | |||
{"matrix": [1, 8], "x": 8.5, "y": 1}, | |||
{"matrix": [1, 9], "x": 9.5, "y": 1}, | |||
{"matrix": [1, 10], "x": 10.5, "y": 1}, | |||
{"matrix": [1, 11], "x": 11.5, "y": 1}, | |||
{"matrix": [1, 12], "x": 12.5, "y": 1}, | |||
{"matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, | |||
{"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, | |||
{"matrix": [2, 1], "x": 1.75, "y": 2}, | |||
{"matrix": [2, 2], "x": 2.75, "y": 2}, | |||
{"matrix": [2, 3], "x": 3.75, "y": 2}, | |||
{"matrix": [2, 4], "x": 4.75, "y": 2}, | |||
{"matrix": [2, 5], "x": 5.75, "y": 2}, | |||
{"matrix": [2, 6], "x": 6.75, "y": 2}, | |||
{"matrix": [2, 7], "x": 7.75, "y": 2}, | |||
{"matrix": [2, 8], "x": 8.75, "y": 2}, | |||
{"matrix": [2, 9], "x": 9.75, "y": 2}, | |||
{"matrix": [2, 10], "x": 10.75, "y": 2}, | |||
{"matrix": [2, 11], "x": 11.75, "y": 2}, | |||
{"matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, | |||
{"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, | |||
{"matrix": [3, 1], "x": 2.25, "y": 3}, | |||
{"matrix": [3, 2], "x": 3.25, "y": 3}, | |||
{"matrix": [3, 3], "x": 4.25, "y": 3}, | |||
{"matrix": [3, 4], "x": 5.25, "y": 3}, | |||
{"matrix": [3, 5], "x": 6.25, "y": 3}, | |||
{"matrix": [3, 6], "x": 7.25, "y": 3}, | |||
{"matrix": [3, 7], "x": 8.25, "y": 3}, | |||
{"matrix": [3, 8], "x": 9.25, "y": 3}, | |||
{"matrix": [3, 9], "x": 10.25, "y": 3}, | |||
{"matrix": [3, 10], "x": 11.25, "y": 3}, | |||
{"matrix": [3, 11], "x": 12.25, "y": 3, "w": 1.75}, | |||
{"matrix": [3, 12], "x": 14, "y": 3}, | |||
{"matrix": [4, 1], "x": 1.5, "y": 4}, | |||
{"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 5], "x": 4, "y": 4, "w": 7}, | |||
{"matrix": [4, 10], "x": 11, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 11], "x": 12.5, "y": 4} | |||
] | |||
}, | |||
"LAYOUT_60_tsangan_hhkb": { | |||
"layout": [ | |||
{"matrix": [0, 0], "x": 0, "y": 0}, | |||
{"matrix": [0, 1], "x": 1, "y": 0}, | |||
{"matrix": [0, 2], "x": 2, "y": 0}, | |||
{"matrix": [0, 3], "x": 3, "y": 0}, | |||
{"matrix": [0, 4], "x": 4, "y": 0}, | |||
{"matrix": [0, 5], "x": 5, "y": 0}, | |||
{"matrix": [0, 6], "x": 6, "y": 0}, | |||
{"matrix": [0, 7], "x": 7, "y": 0}, | |||
{"matrix": [0, 8], "x": 8, "y": 0}, | |||
{"matrix": [0, 9], "x": 9, "y": 0}, | |||
{"matrix": [0, 10], "x": 10, "y": 0}, | |||
{"matrix": [0, 11], "x": 11, "y": 0}, | |||
{"matrix": [0, 12], "x": 12, "y": 0}, | |||
{"matrix": [0, 13], "x": 13, "y": 0}, | |||
{"matrix": [2, 13], "x": 14, "y": 0}, | |||
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, | |||
{"matrix": [1, 1], "x": 1.5, "y": 1}, | |||
{"matrix": [1, 2], "x": 2.5, "y": 1}, | |||
{"matrix": [1, 3], "x": 3.5, "y": 1}, | |||
{"matrix": [1, 4], "x": 4.5, "y": 1}, | |||
{"matrix": [1, 5], "x": 5.5, "y": 1}, | |||
{"matrix": [1, 6], "x": 6.5, "y": 1}, | |||
{"matrix": [1, 7], "x": 7.5, "y": 1}, | |||
{"matrix": [1, 8], "x": 8.5, "y": 1}, | |||
{"matrix": [1, 9], "x": 9.5, "y": 1}, | |||
{"matrix": [1, 10], "x": 10.5, "y": 1}, | |||
{"matrix": [1, 11], "x": 11.5, "y": 1}, | |||
{"matrix": [1, 12], "x": 12.5, "y": 1}, | |||
{"matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, | |||
{"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, | |||
{"matrix": [2, 1], "x": 1.75, "y": 2}, | |||
{"matrix": [2, 2], "x": 2.75, "y": 2}, | |||
{"matrix": [2, 3], "x": 3.75, "y": 2}, | |||
{"matrix": [2, 4], "x": 4.75, "y": 2}, | |||
{"matrix": [2, 5], "x": 5.75, "y": 2}, | |||
{"matrix": [2, 6], "x": 6.75, "y": 2}, | |||
{"matrix": [2, 7], "x": 7.75, "y": 2}, | |||
{"matrix": [2, 8], "x": 8.75, "y": 2}, | |||
{"matrix": [2, 9], "x": 9.75, "y": 2}, | |||
{"matrix": [2, 10], "x": 10.75, "y": 2}, | |||
{"matrix": [2, 11], "x": 11.75, "y": 2}, | |||
{"matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, | |||
{"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, | |||
{"matrix": [3, 1], "x": 2.25, "y": 3}, | |||
{"matrix": [3, 2], "x": 3.25, "y": 3}, | |||
{"matrix": [3, 3], "x": 4.25, "y": 3}, | |||
{"matrix": [3, 4], "x": 5.25, "y": 3}, | |||
{"matrix": [3, 5], "x": 6.25, "y": 3}, | |||
{"matrix": [3, 6], "x": 7.25, "y": 3}, | |||
{"matrix": [3, 7], "x": 8.25, "y": 3}, | |||
{"matrix": [3, 8], "x": 9.25, "y": 3}, | |||
{"matrix": [3, 9], "x": 10.25, "y": 3}, | |||
{"matrix": [3, 10], "x": 11.25, "y": 3}, | |||
{"matrix": [3, 11], "x": 12.25, "y": 3, "w": 1.75}, | |||
{"matrix": [3, 12], "x": 14, "y": 3}, | |||
{"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 1], "x": 1.5, "y": 4}, | |||
{"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 5], "x": 4, "y": 4, "w": 7}, | |||
{"matrix": [4, 10], "x": 11, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 11], "x": 12.5, "y": 4}, | |||
{"matrix": [4, 12], "x": 13.5, "y": 4, "w": 1.5} | |||
] | |||
} | |||
} | |||
} |
@ -0,0 +1,42 @@ | |||
/* Copyright 2023 Cipulot | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 3 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#include QMK_KEYBOARD_H | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
// clang-format off | |||
[0] = LAYOUT_60_hhkb( | |||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, | |||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, | |||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENTER, | |||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), | |||
KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT), | |||
[1] = LAYOUT_60_hhkb( | |||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, | |||
KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUSE, KC_UP, _______, KC_BSPC, | |||
_______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, S(KC_8), KC_SLSH, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, _______, | |||
_______, _______, _______, _______, _______, _______, S(KC_EQL), KC_MINS, KC_END, KC_PGDN, KC_DOWN, _______, _______, | |||
_______, _______, _______, _______, MO(2)), | |||
[2] = LAYOUT_60_hhkb( | |||
QK_BOOT, NK_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______) | |||
// clang-format on | |||
}; |
@ -0,0 +1,42 @@ | |||
/* Copyright 2023 Cipulot | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 3 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#include QMK_KEYBOARD_H | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
// clang-format off | |||
[0] = LAYOUT_60_tsangan_hhkb( | |||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, | |||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, | |||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENTER, | |||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), | |||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RCTL, KC_RGUI, KC_RALT), | |||
[1] = LAYOUT_60_tsangan_hhkb( | |||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, | |||
_______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUSE, KC_UP, _______, _______, | |||
_______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, S(KC_8), KC_SLSH, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, _______, | |||
_______, _______, _______, _______, _______, _______, S(KC_EQL), KC_MINS, KC_END, KC_PGDN, KC_DOWN, _______, _______, | |||
_______, _______, _______, _______, _______, MO(2), _______), | |||
[2] = LAYOUT_60_tsangan_hhkb( | |||
QK_BOOT, NK_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______) | |||
// clang-format on | |||
}; |
@ -0,0 +1,42 @@ | |||
/* Copyright 2023 Cipulot | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 3 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#include QMK_KEYBOARD_H | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
// clang-format off | |||
[0] = LAYOUT_60_tsangan_hhkb( | |||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, | |||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, | |||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENTER, | |||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), | |||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RCTL, KC_RGUI, KC_RALT), | |||
[1] = LAYOUT_60_tsangan_hhkb( | |||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, | |||
_______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUSE, KC_UP, _______, _______, | |||
_______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, S(KC_8), KC_SLSH, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, _______, | |||
_______, _______, _______, _______, _______, _______, S(KC_EQL), KC_MINS, KC_END, KC_PGDN, KC_DOWN, _______, _______, | |||
_______, _______, _______, _______, _______, MO(2), _______), | |||
[2] = LAYOUT_60_tsangan_hhkb( | |||
QK_BOOT, NK_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______) | |||
// clang-format on | |||
}; |
@ -0,0 +1 @@ | |||
VIA_ENABLE = yes |
@ -0,0 +1,22 @@ | |||
/* Copyright 2023 Cipulot | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 3 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#pragma once | |||
#include_next <mcuconf.h> | |||
#undef STM32_ADC_USE_ADC1 | |||
#define STM32_ADC_USE_ADC1 TRUE |
@ -0,0 +1,3 @@ | |||
ifeq ($(strip $(VIA_ENABLE)), yes) | |||
SRC += keyboards/cipulot/common/via_ec.c | |||
endif |
@ -0,0 +1,26 @@ | |||
# MNK 60 EC | |||
![MNK 60 EC PCB](https://i.imgur.com/UpkCUKFh.jpeg) | |||
EC version of the Monokei MNK 66. | |||
* Keyboard Maintainer: [cipulot](https://github.com/cipulot) | |||
* Hardware Supported: MNK 60 EC PCB | |||
* Hardware Availability: [Monokei](https://monokei.co/) | |||
Make example for this keyboard (after setting up your build environment): | |||
make cipulot/mnk_60_ec:default | |||
Flashing example for this keyboard: | |||
make cipulot/mnk_60_ec:default:flash | |||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | |||
## Bootloader | |||
Enter the bootloader in 2 ways: | |||
* **Physical reset**: Long short the exposed pads on the top of the PCB | |||
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available |
@ -0,0 +1,5 @@ | |||
CUSTOM_MATRIX = lite | |||
ANALOG_DRIVER_REQUIRED = yes | |||
VPATH += keyboards/cipulot/common | |||
SRC += matrix.c ec_board.c ec_switch_matrix.c | |||
OPT = 3 |
@ -0,0 +1,66 @@ | |||
/* Copyright 2023 Cipulot | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 3 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#pragma once | |||
#define MATRIX_ROWS 5 | |||
#define MATRIX_COLS 15 | |||
#define MATRIX_ROW_PINS \ | |||
{ B14, B15, A8, B12, A15 } | |||
#define AMUX_COUNT 2 | |||
#define AMUX_MAX_COLS_COUNT 8 | |||
#define AMUX_EN_PINS \ | |||
{ B7, B3 } | |||
#define AMUX_SEL_PINS \ | |||
{ B6, B5, B4 } | |||
#define AMUX_COL_CHANNELS_SIZES \ | |||
{ 8, 7 } | |||
#define AMUX_0_COL_CHANNELS \ | |||
{ 0, 3, 1, 2, 4, 5, 6, 7 } | |||
#define AMUX_1_COL_CHANNELS \ | |||
{ 0, 3, 1, 2, 4, 5, 6 } | |||
#define AMUX_COL_CHANNELS AMUX_0_COL_CHANNELS, AMUX_1_COL_CHANNELS | |||
#define DISCHARGE_PIN A3 | |||
#define ANALOG_PORT A2 | |||
#define DEFAULT_ACTUATION_MODE 0 | |||
#define DEFAULT_MODE_0_ACTUATION_LEVEL 550 | |||
#define DEFAULT_MODE_0_RELEASE_LEVEL 500 | |||
#define DEFAULT_MODE_1_INITIAL_DEADZONE_OFFSET DEFAULT_MODE_0_ACTUATION_LEVEL | |||
#define DEFAULT_MODE_1_ACTUATION_OFFSET 70 | |||
#define DEFAULT_MODE_1_RELEASE_OFFSET 70 | |||
#define DEFAULT_EXTREMUM 1023 | |||
#define EXPECTED_NOISE_FLOOR 0 | |||
#define NOISE_FLOOR_THRESHOLD 50 | |||
#define BOTTOMING_CALIBRATION_THRESHOLD 100 | |||
#define DEFAULT_NOISE_FLOOR_SAMPLING_COUNT 30 | |||
#define DEFAULT_BOTTOMING_READING 1023 | |||
#define DEFAULT_CALIBRATION_STARTER true | |||
#define DISCHARGE_TIME 10 | |||
// #define DEBUG_MATRIX_SCAN_RATE | |||
#define EECONFIG_KB_DATA_SIZE 159 |
@ -0,0 +1,21 @@ | |||
/* Copyright 2023 Cipulot | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 3 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#pragma once | |||
#define HAL_USE_ADC TRUE | |||
#include_next <halconf.h> |
@ -0,0 +1,100 @@ | |||
{ | |||
"manufacturer": "Cipulot", | |||
"keyboard_name": "MNK 65 EC", | |||
"maintainer": "Cipulot", | |||
"bootloader": "stm32-dfu", | |||
"build": { | |||
"lto": true | |||
}, | |||
"diode_direction": "COL2ROW", | |||
"features": { | |||
"bootmagic": false, | |||
"extrakey": true, | |||
"mousekey": true, | |||
"nkro": true | |||
}, | |||
"processor": "STM32F401", | |||
"qmk": { | |||
"locking": { | |||
"enabled": true, | |||
"resync": true | |||
} | |||
}, | |||
"usb": { | |||
"device_version": "0.0.1", | |||
"pid": "0x6BB5", | |||
"vid": "0x6369" | |||
}, | |||
"layouts": { | |||
"LAYOUT_65_ansi_blocker_tsangan": { | |||
"layout": [ | |||
{"matrix": [0, 0], "x": 0, "y": 0}, | |||
{"matrix": [0, 1], "x": 1, "y": 0}, | |||
{"matrix": [0, 2], "x": 2, "y": 0}, | |||
{"matrix": [0, 3], "x": 3, "y": 0}, | |||
{"matrix": [0, 4], "x": 4, "y": 0}, | |||
{"matrix": [0, 5], "x": 5, "y": 0}, | |||
{"matrix": [0, 6], "x": 6, "y": 0}, | |||
{"matrix": [0, 7], "x": 7, "y": 0}, | |||
{"matrix": [0, 8], "x": 8, "y": 0}, | |||
{"matrix": [0, 9], "x": 9, "y": 0}, | |||
{"matrix": [0, 10], "x": 10, "y": 0}, | |||
{"matrix": [0, 11], "x": 11, "y": 0}, | |||
{"matrix": [0, 12], "x": 12, "y": 0}, | |||
{"matrix": [0, 13], "x": 13, "y": 0, "w": 2}, | |||
{"matrix": [0, 14], "x": 15, "y": 0}, | |||
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, | |||
{"matrix": [1, 1], "x": 1.5, "y": 1}, | |||
{"matrix": [1, 2], "x": 2.5, "y": 1}, | |||
{"matrix": [1, 3], "x": 3.5, "y": 1}, | |||
{"matrix": [1, 4], "x": 4.5, "y": 1}, | |||
{"matrix": [1, 5], "x": 5.5, "y": 1}, | |||
{"matrix": [1, 6], "x": 6.5, "y": 1}, | |||
{"matrix": [1, 7], "x": 7.5, "y": 1}, | |||
{"matrix": [1, 8], "x": 8.5, "y": 1}, | |||
{"matrix": [1, 9], "x": 9.5, "y": 1}, | |||
{"matrix": [1, 10], "x": 10.5, "y": 1}, | |||
{"matrix": [1, 11], "x": 11.5, "y": 1}, | |||
{"matrix": [1, 12], "x": 12.5, "y": 1}, | |||
{"matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, | |||
{"matrix": [1, 14], "x": 15, "y": 1}, | |||
{"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, | |||
{"matrix": [2, 1], "x": 1.75, "y": 2}, | |||
{"matrix": [2, 2], "x": 2.75, "y": 2}, | |||
{"matrix": [2, 3], "x": 3.75, "y": 2}, | |||
{"matrix": [2, 4], "x": 4.75, "y": 2}, | |||
{"matrix": [2, 5], "x": 5.75, "y": 2}, | |||
{"matrix": [2, 6], "x": 6.75, "y": 2}, | |||
{"matrix": [2, 7], "x": 7.75, "y": 2}, | |||
{"matrix": [2, 8], "x": 8.75, "y": 2}, | |||
{"matrix": [2, 9], "x": 9.75, "y": 2}, | |||
{"matrix": [2, 10], "x": 10.75, "y": 2}, | |||
{"matrix": [2, 11], "x": 11.75, "y": 2}, | |||
{"matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, | |||
{"matrix": [2, 14], "x": 15, "y": 2}, | |||
{"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, | |||
{"matrix": [3, 1], "x": 2.25, "y": 3}, | |||
{"matrix": [3, 2], "x": 3.25, "y": 3}, | |||
{"matrix": [3, 3], "x": 4.25, "y": 3}, | |||
{"matrix": [3, 4], "x": 5.25, "y": 3}, | |||
{"matrix": [3, 5], "x": 6.25, "y": 3}, | |||
{"matrix": [3, 6], "x": 7.25, "y": 3}, | |||
{"matrix": [3, 7], "x": 8.25, "y": 3}, | |||
{"matrix": [3, 8], "x": 9.25, "y": 3}, | |||
{"matrix": [3, 9], "x": 10.25, "y": 3}, | |||
{"matrix": [3, 10], "x": 11.25, "y": 3}, | |||
{"matrix": [3, 11], "x": 12.25, "y": 3, "w": 1.75}, | |||
{"matrix": [3, 12], "x": 14, "y": 3}, | |||
{"matrix": [3, 14], "x": 15, "y": 3}, | |||
{"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 1], "x": 1.5, "y": 4}, | |||
{"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 5], "x": 4, "y": 4, "w": 7}, | |||
{"matrix": [4, 9], "x": 11, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 11], "x": 13, "y": 4}, | |||
{"matrix": [4, 12], "x": 14, "y": 4}, | |||
{"matrix": [4, 14], "x": 15, "y": 4} | |||
] | |||
} | |||
} | |||
} |
@ -0,0 +1,43 @@ | |||
/* Copyright 2023 Cipulot | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 3 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#include QMK_KEYBOARD_H | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
// clang-format off | |||
[0] = LAYOUT_65_ansi_blocker_tsangan( | |||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, | |||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, | |||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, | |||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, | |||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT | |||
), | |||
[1] = LAYOUT_65_ansi_blocker_tsangan( | |||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, _______, | |||
_______, _______, _______, _______, _______, _______, KC_INS, _______, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUS, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______ | |||
), | |||
[2] = LAYOUT_65_ansi_blocker_tsangan( | |||
QK_BOOT, NK_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______ | |||
) | |||
// clang-format on | |||
}; |
@ -0,0 +1,43 @@ | |||
/* Copyright 2023 Cipulot | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 3 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#include QMK_KEYBOARD_H | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
// clang-format off | |||
[0] = LAYOUT_65_ansi_blocker_tsangan( | |||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, | |||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, | |||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, | |||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, | |||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT | |||
), | |||
[1] = LAYOUT_65_ansi_blocker_tsangan( | |||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, _______, | |||
_______, _______, _______, _______, _______, _______, KC_INS, _______, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUS, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______ | |||
), | |||
[2] = LAYOUT_65_ansi_blocker_tsangan( | |||
QK_BOOT, NK_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______ | |||
) | |||
// clang-format on | |||
}; |
@ -0,0 +1 @@ | |||
VIA_ENABLE = yes |
@ -0,0 +1,22 @@ | |||
/* Copyright 2023 Cipulot | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 3 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#pragma once | |||
#include_next <mcuconf.h> | |||
#undef STM32_ADC_USE_ADC1 | |||
#define STM32_ADC_USE_ADC1 TRUE |
@ -0,0 +1,3 @@ | |||
ifeq ($(strip $(VIA_ENABLE)), yes) | |||
SRC += keyboards/cipulot/common/via_ec.c | |||
endif |
@ -0,0 +1,26 @@ | |||
# Monokei MNK 65 EC | |||
![MNK 65 EC PCB](https://i.imgur.com/k5ZvGhth.jpeg) | |||
EC version of the Monokei MNK 65. | |||
* Keyboard Maintainer: [cipulot](https://github.com/cipulot) | |||
* Hardware Supported: Monokei MNK 65 EC | |||
* Hardware Availability: [Monokei](https://monokei.co/) | |||
Make example for this keyboard (after setting up your build environment): | |||
make cipulot/mnk_65_ec:default | |||
Flashing example for this keyboard: | |||
make cipulot/mnk_65_ec:default:flash | |||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | |||
## Bootloader | |||
Enter the bootloader in 2 ways: | |||
* **Physical reset**: Long short the exposed pads on the top of the PCB | |||
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available |
@ -0,0 +1,5 @@ | |||
CUSTOM_MATRIX = lite | |||
ANALOG_DRIVER_REQUIRED = yes | |||
VPATH += keyboards/cipulot/common | |||
SRC += matrix.c ec_board.c ec_switch_matrix.c | |||
OPT = 3 |
@ -0,0 +1,125 @@ | |||
{ | |||
"manufacturer": "DOIO", | |||
"keyboard_name": "KB3x-01", | |||
"maintainer": "DOIO2022", | |||
"bootloader": "stm32duino", | |||
"diode_direction": "COL2ROW", | |||
"dynamic_keymap": { | |||
"layer_count": 6 | |||
}, | |||
"encoder": { | |||
"rotary": [ | |||
{"pin_a": "B5", "pin_b": "B6", "resolution": 2}, | |||
{"pin_a": "A1", "pin_b": "A2", "resolution": 2}, | |||
{"pin_a": "A3", "pin_b": "A4", "resolution": 2} | |||
] | |||
}, | |||
"features": { | |||
"bootmagic": true, | |||
"encoder": true, | |||
"extrakey": true, | |||
"mousekey": true, | |||
"rgb_matrix": true | |||
}, | |||
"matrix_pins": { | |||
"cols": ["B14", "B13", "B12", "B0", "A7", "A6"], | |||
"rows": ["B3", "B4", "B9", "B8"] | |||
}, | |||
"processor": "STM32F103", | |||
"rgb_matrix": { | |||
"animations": { | |||
"alphas_mods": true, | |||
"band_pinwheel_sat": true, | |||
"band_pinwheel_val": true, | |||
"band_sat": true, | |||
"band_spiral_sat": true, | |||
"band_spiral_val": true, | |||
"band_val": true, | |||
"breathing": true, | |||
"cycle_all": true, | |||
"cycle_left_right": true, | |||
"cycle_out_in": true, | |||
"cycle_out_in_dual": true, | |||
"cycle_pinwheel": true, | |||
"cycle_spiral": true, | |||
"cycle_up_down": true, | |||
"digital_rain": true, | |||
"dual_beacon": true, | |||
"gradient_left_right": true, | |||
"gradient_up_down": true, | |||
"hue_breathing": true, | |||
"hue_pendulum": true, | |||
"hue_wave": true, | |||
"jellybean_raindrops": true, | |||
"multisplash": true, | |||
"pixel_flow": true, | |||
"pixel_fractal": true, | |||
"pixel_rain": true, | |||
"rainbow_beacon": true, | |||
"rainbow_moving_chevron": true, | |||
"rainbow_pinwheels": true, | |||
"raindrops": true, | |||
"solid_multisplash": true, | |||
"solid_reactive": true, | |||
"solid_reactive_cross": true, | |||
"solid_reactive_multicross": true, | |||
"solid_reactive_multinexus": true, | |||
"solid_reactive_multiwide": true, | |||
"solid_reactive_nexus": true, | |||
"solid_reactive_simple": true, | |||
"solid_reactive_wide": true, | |||
"solid_splash": true, | |||
"splash": true, | |||
"typing_heatmap": true | |||
}, | |||
"driver": "ws2812", | |||
"layout": [ | |||
{"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, | |||
{"matrix": [0, 1], "x": 75, "y": 0, "flags": 1}, | |||
{"matrix": [0, 2], "x": 149, "y": 0, "flags": 1}, | |||
{"matrix": [0, 3], "x": 224, "y": 0, "flags": 1}, | |||
{"x": 112, "y": 64, "flags": 1}, | |||
{"x": 112, "y": 64, "flags": 1}, | |||
{"x": 112, "y": 64, "flags": 1}, | |||
{"x": 112, "y": 64, "flags": 1} | |||
], | |||
"max_brightness": 200, | |||
"sleep": true | |||
}, | |||
"url": "", | |||
"usb": { | |||
"device_version": "0.0.1", | |||
"pid": "0x3F01", | |||
"vid": "0xD010" | |||
}, | |||
"ws2812": { | |||
"pin": "A10" | |||
}, | |||
"layouts": { | |||
"LAYOUT": { | |||
"layout": [ | |||
{"matrix": [3, 0], "x": 0, "y": 0}, | |||
{"matrix": [3, 1], "x": 1, "y": 0}, | |||
{"matrix": [3, 2], "x": 2, "y": 0}, | |||
{"matrix": [3, 3], "x": 6.5, "y": 0}, | |||
{"matrix": [3, 4], "x": 7.5, "y": 0}, | |||
{"matrix": [3, 5], "x": 8.5, "y": 0}, | |||
{"matrix": [0, 0], "x": 1, "y": 1.25}, | |||
{"matrix": [1, 0], "x": 4.25, "y": 1.25}, | |||
{"matrix": [2, 0], "x": 7.5, "y": 1.25}, | |||
{"matrix": [0, 3], "x": 0, "y": 2.25}, | |||
{"matrix": [0, 4], "x": 1, "y": 2.25, "encoder": 0}, | |||
{"matrix": [0, 1], "x": 2, "y": 2.25}, | |||
{"matrix": [1, 3], "x": 3.25, "y": 2.25}, | |||
{"matrix": [1, 4], "x": 4.25, "y": 2.25, "encoder": 1}, | |||
{"matrix": [1, 1], "x": 5.25, "y": 2.25}, | |||
{"matrix": [2, 3], "x": 6.5, "y": 2.25}, | |||
{"matrix": [2, 4], "x": 7.5, "y": 2.25, "encoder": 2}, | |||
{"matrix": [2, 1], "x": 8.5, "y": 2.25}, | |||
{"matrix": [0, 2], "x": 1, "y": 3.25}, | |||
{"matrix": [1, 2], "x": 4.25, "y": 3.25}, | |||
{"matrix": [2, 2], "x": 7.5, "y": 3.25} | |||
] | |||
} | |||
} | |||
} |
@ -0,0 +1,51 @@ | |||
/* Copyright 2022 DOIO | |||
* Copyright 2022 DOIO2022 <https://github.com/DOIO2022> | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#include QMK_KEYBOARD_H | |||
enum layer_names { | |||
_LAY0, | |||
_LAY1, | |||
_LAY2 | |||
}; | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
[_LAY0] = LAYOUT( | |||
TO(1), RGB_MOD, RGB_TOG, RGB_HUI, RGB_VAD, RGB_VAI, | |||
KC_MPLY, KC_UP, KC_UP, | |||
KC_MNXT, KC_TRNS, KC_MPRV, A(KC_LEFT), KC_TRNS, A(KC_RIGHT), KC_RIGHT, KC_TRNS, KC_LEFT, | |||
KC_MPLY, KC_DOWN, KC_DOWN), | |||
[_LAY1] = LAYOUT( | |||
TO(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_WH_U, S(KC_RBRC), C(KC_L), | |||
C(KC_WH_D), KC_TRNS, C(KC_WH_U), KC_DOT, KC_TRNS, KC_COMM, C(KC_B), KC_TRNS, C(KC_U), | |||
KC_WH_D, S(KC_LBRC), C(KC_M)), | |||
[_LAY2] = LAYOUT( | |||
TO(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_B, KC_UP, S(KC_I), | |||
KC_P, KC_TRNS, KC_H, KC_RIGHT, KC_TRNS, KC_LEFT, KC_O, KC_TRNS, KC_I, | |||
KC_Y, KC_DOWN, S(KC_O)) | |||
}; | |||
#ifdef ENCODER_MAP_ENABLE | |||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { | |||
[_LAY0] = { ENCODER_CCW_CW(C(KC_DOWN), C(KC_UP)), ENCODER_CCW_CW(C(KC_PMNS), C(KC_PPLS)), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, | |||
[_LAY1] = { ENCODER_CCW_CW(C(KC_PMNS), C(KC_PPLS)), ENCODER_CCW_CW(KC_LBRC, KC_RBRC), ENCODER_CCW_CW(C(S(KC_U)), C(KC_I)) }, | |||
[_LAY2] = { ENCODER_CCW_CW(KC_C, KC_V), ENCODER_CCW_CW(KC_MINS, KC_EQL), ENCODER_CCW_CW(KC_J, KC_L) } | |||
}; | |||
#endif |
@ -0,0 +1 @@ | |||
ENCODER_MAP_ENABLE = yes |
@ -0,0 +1,73 @@ | |||
/* Copyright 2022 DOIO | |||
* Copyright 2022 DOIO2022 <https://github.com/DOIO2022> | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#include QMK_KEYBOARD_H | |||
enum layer_names { | |||
_LAY0, | |||
_LAY1, | |||
_LAY2, | |||
_LAY3, | |||
_LAY4, | |||
_LAY5 | |||
}; | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
[_LAY0] = LAYOUT( | |||
TO(1), RGB_MOD, RGB_TOG, RGB_HUI, RGB_VAD, RGB_VAI, | |||
KC_MPLY, KC_UP, KC_UP, | |||
KC_MNXT, KC_TRNS, KC_MPRV, A(KC_LEFT), KC_TRNS, A(KC_RIGHT), KC_RIGHT, KC_TRNS, KC_LEFT, | |||
KC_MPLY, KC_DOWN, KC_DOWN), | |||
[_LAY1] = LAYOUT( | |||
TO(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_WH_U, S(KC_RBRC), C(KC_L), | |||
C(KC_WH_D), KC_TRNS, C(KC_WH_U), KC_DOT, KC_TRNS, KC_COMM, C(KC_B), KC_TRNS, C(KC_U), | |||
KC_WH_D, S(KC_LBRC), C(KC_M)), | |||
[_LAY2] = LAYOUT( | |||
TO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_B, KC_UP, S(KC_I), | |||
KC_P, KC_TRNS, KC_H, KC_RIGHT, KC_TRNS, KC_LEFT, KC_O, KC_TRNS, KC_I, | |||
KC_Y, KC_DOWN, S(KC_O)), | |||
[_LAY3] = LAYOUT( | |||
TO(4), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS), | |||
[_LAY4] = LAYOUT( | |||
TO(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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS), | |||
[_LAY5] = LAYOUT( | |||
TO(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), | |||
}; | |||
#ifdef ENCODER_MAP_ENABLE | |||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { | |||
[_LAY0] = { ENCODER_CCW_CW(C(KC_DOWN), C(KC_UP)), ENCODER_CCW_CW(C(KC_PMNS), C(KC_PPLS)), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, | |||
[_LAY1] = { ENCODER_CCW_CW(C(KC_PMNS), C(KC_PPLS)), ENCODER_CCW_CW(KC_LBRC, KC_RBRC), ENCODER_CCW_CW(C(S(KC_U)), C(KC_I)) }, | |||
[_LAY2] = { ENCODER_CCW_CW(KC_C, KC_V), ENCODER_CCW_CW(KC_MINS, KC_EQL), ENCODER_CCW_CW(KC_J, KC_L) }, | |||
[_LAY3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, | |||
[_LAY4] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, | |||
[_LAY5] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, | |||
}; | |||
#endif |
@ -0,0 +1,2 @@ | |||
VIA_ENABLE = yes | |||
ENCODER_MAP_ENABLE = yes |
@ -0,0 +1,26 @@ | |||
# doio/kb3x | |||
![kb3x-01](https://i.imgur.com/6DvIu9Mh.png) | |||
QMK for DOIO Knob keypad . | |||
* Keyboard Maintainer: DOIO2022 | |||
* Hardware Supported: DOIO Knob keypad | |||
Make example for this keyboard (after setting up your build environment): | |||
make doio/kb3x:default | |||
Flashing example for this keyboard: | |||
make doio/kb3x:default:flash | |||
See the build [environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | |||
## Bootloader | |||
Enter the bootloader in 3 ways: | |||
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard | |||
* **Physical reset button**: Briefly press the button on the back of the PCB | |||
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available |
@ -0,0 +1 @@ | |||
# This file intentionally left blank |
@ -1,17 +0,0 @@ | |||
// Copyright 2023 Jason Hazel (@jasonhazel) | |||
// SPDX-License-Identifier: GPL-3.0-or-later | |||
#pragma once | |||
#define TAPPING_TERM 200 | |||
#define PERMISSIVE_HOLD | |||
#define IGNORE_MOD_TAP_INTERRUPT | |||
#define TAPPING_FORCE_HOLD | |||
#define TAPPING_TERM_PER_KEY | |||
#define ONESHOT_TAP_TOGGLE 10 | |||
#define ONESHOT_TIMEOUT 500 | |||
#define DOUBLE_TAP_SHIFT_TURNS_ON_CAPS_WORD | |||
#define CIRQUE_PINNACLE_TAP_ENABLE | |||
#define CIRQUE_PINNACLE_POSITION_MODE CIRQUE_PINNACLE_ABSOLUTE_MODE | |||
#define POINTING_DEVICE_GESTURES_SCROLL_ENABLE |
@ -1,118 +0,0 @@ | |||
// Copyright 2023 Jason Hazel (@jasonhazel) | |||
// SPDX-License-Identifier: GPL-3.0-or-later | |||
#include QMK_KEYBOARD_H | |||
enum layers { | |||
_ALPHA, | |||
_SYMBOL, | |||
_NUMBER, | |||
_NAVIGATION, | |||
LAYER_LENGTH | |||
}; | |||
enum tapdances { | |||
TD_QESC, | |||
TD_SBKT, | |||
TD_CBKT, | |||
TD_PARN, | |||
TD_LTGT, | |||
TD_ATAB, | |||
TAPDANCE_LENGTH | |||
}; | |||
enum combos { | |||
COMBO_NAVIGATION, | |||
COMBO_LENGTH | |||
}; | |||
// begin tapdances | |||
#define KC_QESC TD(TD_QESC) | |||
#define KC_SBKT TD(TD_SBKT) | |||
#define KC_CBKT TD(TD_CBKT) | |||
#define KC_PARN TD(TD_PARN) | |||
#define KC_LTGT TD(TD_LTGT) | |||
#define KC_ATAB TD(TD_ATAB) | |||
#define KC_GUIX LGUI_T(KC_X) | |||
#define KC_ALTC LALT_T(KC_C) | |||
// oneshots | |||
#define KC_OSFT OSM(MOD_LSFT) | |||
#define KC_OALT OSM(MOD_LALT) | |||
// layer changing | |||
#define KC_OSYM OSL(_SYMBOL) | |||
#define KC_ONUM LT(_NUMBER, KC_BSPC) | |||
uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { | |||
switch(keycode) { | |||
case KC_GUIX: | |||
case KC_ALTC: | |||
return TAPPING_TERM * 2; | |||
default: | |||
return TAPPING_TERM; | |||
} | |||
} | |||
// tapdances | |||
tap_dance_action_t tap_dance_actions[] = { | |||
[TD_QESC] = ACTION_TAP_DANCE_DOUBLE(KC_Q, KC_ESC), | |||
[TD_SBKT] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_RBRC), | |||
[TD_CBKT] = ACTION_TAP_DANCE_DOUBLE(KC_LCBR, KC_RCBR), | |||
[TD_PARN] = ACTION_TAP_DANCE_DOUBLE(KC_LPRN, KC_RPRN), | |||
[TD_LTGT] = ACTION_TAP_DANCE_DOUBLE(KC_LABK, KC_RABK), | |||
[TD_ATAB] = ACTION_TAP_DANCE_DOUBLE(KC_A, KC_TAB) | |||
}; | |||
// end tapdances | |||
uint16_t COMBO_LEN = COMBO_LENGTH; | |||
const uint16_t PROGMEM combo_navigation[] = { KC_OSYM, KC_ONUM, COMBO_END }; | |||
combo_t key_combos[] = { | |||
[COMBO_NAVIGATION] = COMBO(combo_navigation, OSL(_NAVIGATION)), | |||
}; | |||
uint16_t get_combo_term(uint16_t index, combo_t *combo) { | |||
switch(index) { | |||
case COMBO_NAVIGATION: // extending the combo term here helps reduce sticky layers some more. | |||
return 250; | |||
default: | |||
return COMBO_TERM; | |||
} | |||
} | |||
// end combos | |||
// begin layers | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
[_ALPHA] = LAYOUT_split_3x5_3( | |||
KC_QESC, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, | |||
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, | |||
KC_Z, KC_GUIX, KC_ALTC, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, | |||
KC_LCTL, KC_OSYM, KC_OSFT, KC_SPC, KC_ONUM, KC_ENT | |||
), | |||
[_SYMBOL] = LAYOUT_split_3x5_3( | |||
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_PIPE, KC_NO, | |||
KC_GRV, KC_TILD, KC_UNDS, KC_EQL, KC_NO, KC_SBKT, KC_CBKT, KC_PARN, KC_LTGT, KC_BACKSLASH, | |||
KC_NO, KC_NO, KC_PLUS, KC_MINS, KC_NO, KC_NO, KC_NO, KC_COLN, KC_DOT, KC_SCLN, | |||
KC_LCTL, KC_OSYM, KC_OSFT, KC_SPC, KC_ONUM, KC_ENT | |||
), | |||
[_NUMBER] = LAYOUT_split_3x5_3( | |||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, | |||
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, | |||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DOT, KC_NO, | |||
KC_LCTL, KC_OSYM, KC_OSFT, KC_SPC, KC_ONUM, KC_ENT | |||
), | |||
[_NAVIGATION] = LAYOUT_split_3x5_3( | |||
KC_NO, KC_F2, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_UP, KC_END, KC_BSPC, | |||
KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_ENT, | |||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_DEL, | |||
KC_LCTL, KC_OSYM, KC_OSFT, KC_SPC, KC_ONUM, KC_ENT | |||
) | |||
}; | |||
@ -1,4 +0,0 @@ | |||
MOUSEKEY_ENABLE = yes | |||
EXTRAKEY_ENABLE = yes | |||
COMBO_ENABLE = yes | |||
TAP_DANCE_ENABLE = yes |
@ -0,0 +1,22 @@ | |||
/* Copyright 2024 kwstudio | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General 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 WS2812_PWM_DRIVER PWMD1 | |||
#define WS2812_PWM_CHANNEL 3 | |||
#define WS2812_DMA_STREAM STM32_DMA1_STREAM5 | |||
#define WS2812_DMA_CHANNEL 5 |
@ -0,0 +1,21 @@ | |||
/* Copyright 2024 kwstudio | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General 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_PWM TRUE | |||
#include_next <halconf.h> |
@ -0,0 +1,201 @@ | |||
{ | |||
"manufacturer": "kwstudio", | |||
"keyboard_name": "Scorpio Rev2", | |||
"maintainer": "kwstudio", | |||
"processor": "STM32F103", | |||
"bootloader": "stm32duino", | |||
"diode_direction": "COL2ROW", | |||
"features": { | |||
"bootmagic": true, | |||
"extrakey": true, | |||
"nkro": true, | |||
"rgblight": true | |||
}, | |||
"matrix_pins": { | |||
"cols": ["A4", "A2", "A5", "A6", "A7", "A3", "B10", "B13", "B3", "B4", "B9", "B8", "B5", "B7", "B6"], | |||
"rows": ["B11", "B0", "B14", "B12", "A1"] | |||
}, | |||
"rgblight": { | |||
"animations": { | |||
"alternating": true, | |||
"breathing": true, | |||
"christmas": true, | |||
"knight": true, | |||
"rainbow_mood": true, | |||
"rainbow_swirl": true, | |||
"rgb_test": true, | |||
"snake": true, | |||
"static_gradient": true, | |||
"twinkle": true | |||
}, | |||
"brightness_steps": 10, | |||
"default": { | |||
"animation": "rainbow_swirl" | |||
}, | |||
"layers": { | |||
"enabled": true | |||
}, | |||
"led_count": 9, | |||
"saturation_steps": 8 | |||
}, | |||
"url": "", | |||
"usb": { | |||
"device_version": "1.0.0", | |||
"pid": "0x0003", | |||
"vid": "0x4B53" | |||
}, | |||
"ws2812": { | |||
"driver": "pwm", | |||
"pin": "B15" | |||
}, | |||
"layout_aliases": { | |||
"LAYOUT_all": "LAYOUT_65_ansi_blocker_tsangan_wkl_split_bs" | |||
}, | |||
"layouts": { | |||
"LAYOUT_65_ansi_blocker_tsangan_wkl_split_bs": { | |||
"layout": [ | |||
{"matrix": [0, 0], "x": 0, "y": 0}, | |||
{"matrix": [0, 1], "x": 1, "y": 0}, | |||
{"matrix": [0, 2], "x": 2, "y": 0}, | |||
{"matrix": [0, 3], "x": 3, "y": 0}, | |||
{"matrix": [0, 4], "x": 4, "y": 0}, | |||
{"matrix": [0, 5], "x": 5, "y": 0}, | |||
{"matrix": [0, 6], "x": 6, "y": 0}, | |||
{"matrix": [0, 7], "x": 7, "y": 0}, | |||
{"matrix": [0, 8], "x": 8, "y": 0}, | |||
{"matrix": [0, 9], "x": 9, "y": 0}, | |||
{"matrix": [0, 10], "x": 10, "y": 0}, | |||
{"matrix": [0, 11], "x": 11, "y": 0}, | |||
{"matrix": [0, 12], "x": 12, "y": 0}, | |||
{"matrix": [0, 13], "x": 13, "y": 0}, | |||
{"matrix": [0, 14], "x": 14, "y": 0}, | |||
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, | |||
{"matrix": [1, 1], "x": 1.5, "y": 1}, | |||
{"matrix": [1, 2], "x": 2.5, "y": 1}, | |||
{"matrix": [1, 3], "x": 3.5, "y": 1}, | |||
{"matrix": [1, 4], "x": 4.5, "y": 1}, | |||
{"matrix": [1, 5], "x": 5.5, "y": 1}, | |||
{"matrix": [1, 6], "x": 6.5, "y": 1}, | |||
{"matrix": [1, 7], "x": 7.5, "y": 1}, | |||
{"matrix": [1, 8], "x": 8.5, "y": 1}, | |||
{"matrix": [1, 9], "x": 9.5, "y": 1}, | |||
{"matrix": [1, 10], "x": 10.5, "y": 1}, | |||
{"matrix": [1, 11], "x": 11.5, "y": 1}, | |||
{"matrix": [1, 12], "x": 12.5, "y": 1}, | |||
{"matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, | |||
{"matrix": [1, 14], "x": 15, "y": 1}, | |||
{"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, | |||
{"matrix": [2, 1], "x": 1.75, "y": 2}, | |||
{"matrix": [2, 2], "x": 2.75, "y": 2}, | |||
{"matrix": [2, 3], "x": 3.75, "y": 2}, | |||
{"matrix": [2, 4], "x": 4.75, "y": 2}, | |||
{"matrix": [2, 5], "x": 5.75, "y": 2}, | |||
{"matrix": [2, 6], "x": 6.75, "y": 2}, | |||
{"matrix": [2, 7], "x": 7.75, "y": 2}, | |||
{"matrix": [2, 8], "x": 8.75, "y": 2}, | |||
{"matrix": [2, 9], "x": 9.75, "y": 2}, | |||
{"matrix": [2, 10], "x": 10.75, "y": 2}, | |||
{"matrix": [2, 11], "x": 11.75, "y": 2}, | |||
{"matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, | |||
{"matrix": [2, 14], "x": 15, "y": 2}, | |||
{"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, | |||
{"matrix": [3, 1], "x": 2.25, "y": 3}, | |||
{"matrix": [3, 2], "x": 3.25, "y": 3}, | |||
{"matrix": [3, 3], "x": 4.25, "y": 3}, | |||
{"matrix": [3, 4], "x": 5.25, "y": 3}, | |||
{"matrix": [3, 5], "x": 6.25, "y": 3}, | |||
{"matrix": [3, 6], "x": 7.25, "y": 3}, | |||
{"matrix": [3, 7], "x": 8.25, "y": 3}, | |||
{"matrix": [3, 8], "x": 9.25, "y": 3}, | |||
{"matrix": [3, 9], "x": 10.25, "y": 3}, | |||
{"matrix": [3, 10], "x": 11.25, "y": 3}, | |||
{"matrix": [3, 11], "x": 12.25, "y": 3, "w": 1.75}, | |||
{"matrix": [3, 13], "x": 14, "y": 3}, | |||
{"matrix": [3, 14], "x": 15, "y": 3}, | |||
{"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 1], "x": 2.25, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 5], "x": 3.75, "y": 4, "w": 7}, | |||
{"matrix": [4, 10], "x": 10.75, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 11], "x": 13, "y": 4}, | |||
{"matrix": [4, 13], "x": 14, "y": 4}, | |||
{"matrix": [4, 14], "x": 15, "y": 4} | |||
] | |||
}, | |||
"LAYOUT_65_ansi_blocker_tsangan_wkl": { | |||
"layout": [ | |||
{"matrix": [0, 0], "x": 0, "y": 0}, | |||
{"matrix": [0, 1], "x": 1, "y": 0}, | |||
{"matrix": [0, 2], "x": 2, "y": 0}, | |||
{"matrix": [0, 3], "x": 3, "y": 0}, | |||
{"matrix": [0, 4], "x": 4, "y": 0}, | |||
{"matrix": [0, 5], "x": 5, "y": 0}, | |||
{"matrix": [0, 6], "x": 6, "y": 0}, | |||
{"matrix": [0, 7], "x": 7, "y": 0}, | |||
{"matrix": [0, 8], "x": 8, "y": 0}, | |||
{"matrix": [0, 9], "x": 9, "y": 0}, | |||
{"matrix": [0, 10], "x": 10, "y": 0}, | |||
{"matrix": [0, 11], "x": 11, "y": 0}, | |||
{"matrix": [0, 12], "x": 12, "y": 0}, | |||
{"matrix": [0, 13], "x": 13, "y": 0, "w": 2}, | |||
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, | |||
{"matrix": [1, 1], "x": 1.5, "y": 1}, | |||
{"matrix": [1, 2], "x": 2.5, "y": 1}, | |||
{"matrix": [1, 3], "x": 3.5, "y": 1}, | |||
{"matrix": [1, 4], "x": 4.5, "y": 1}, | |||
{"matrix": [1, 5], "x": 5.5, "y": 1}, | |||
{"matrix": [1, 6], "x": 6.5, "y": 1}, | |||
{"matrix": [1, 7], "x": 7.5, "y": 1}, | |||
{"matrix": [1, 8], "x": 8.5, "y": 1}, | |||
{"matrix": [1, 9], "x": 9.5, "y": 1}, | |||
{"matrix": [1, 10], "x": 10.5, "y": 1}, | |||
{"matrix": [1, 11], "x": 11.5, "y": 1}, | |||
{"matrix": [1, 12], "x": 12.5, "y": 1}, | |||
{"matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, | |||
{"matrix": [1, 14], "x": 15, "y": 1}, | |||
{"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, | |||
{"matrix": [2, 1], "x": 1.75, "y": 2}, | |||
{"matrix": [2, 2], "x": 2.75, "y": 2}, | |||
{"matrix": [2, 3], "x": 3.75, "y": 2}, | |||
{"matrix": [2, 4], "x": 4.75, "y": 2}, | |||
{"matrix": [2, 5], "x": 5.75, "y": 2}, | |||
{"matrix": [2, 6], "x": 6.75, "y": 2}, | |||
{"matrix": [2, 7], "x": 7.75, "y": 2}, | |||
{"matrix": [2, 8], "x": 8.75, "y": 2}, | |||
{"matrix": [2, 9], "x": 9.75, "y": 2}, | |||
{"matrix": [2, 10], "x": 10.75, "y": 2}, | |||
{"matrix": [2, 11], "x": 11.75, "y": 2}, | |||
{"matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, | |||
{"matrix": [2, 14], "x": 15, "y": 2}, | |||
{"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, | |||
{"matrix": [3, 1], "x": 2.25, "y": 3}, | |||
{"matrix": [3, 2], "x": 3.25, "y": 3}, | |||
{"matrix": [3, 3], "x": 4.25, "y": 3}, | |||
{"matrix": [3, 4], "x": 5.25, "y": 3}, | |||
{"matrix": [3, 5], "x": 6.25, "y": 3}, | |||
{"matrix": [3, 6], "x": 7.25, "y": 3}, | |||
{"matrix": [3, 7], "x": 8.25, "y": 3}, | |||
{"matrix": [3, 8], "x": 9.25, "y": 3}, | |||
{"matrix": [3, 9], "x": 10.25, "y": 3}, | |||
{"matrix": [3, 10], "x": 11.25, "y": 3}, | |||
{"matrix": [3, 11], "x": 12.25, "y": 3, "w": 1.75}, | |||
{"matrix": [3, 13], "x": 14, "y": 3}, | |||
{"matrix": [3, 14], "x": 15, "y": 3}, | |||
{"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 1], "x": 2.25, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 5], "x": 3.75, "y": 4, "w": 7}, | |||
{"matrix": [4, 10], "x": 10.75, "y": 4, "w": 1.5}, | |||
{"matrix": [4, 11], "x": 13, "y": 4}, | |||
{"matrix": [4, 13], "x": 14, "y": 4}, | |||
{"matrix": [4, 14], "x": 15, "y": 4} | |||
] | |||
} | |||
} | |||
} |
@ -0,0 +1,34 @@ | |||
/* Copyright 2024 kwstudio | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General 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] = { | |||
[0] = LAYOUT_65_ansi_blocker_tsangan_wkl_split_bs( | |||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, | |||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, | |||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, | |||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1), | |||
KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT), | |||
[1] = LAYOUT_65_ansi_blocker_tsangan_wkl_split_bs( | |||
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) | |||
}; |
@ -0,0 +1,34 @@ | |||
/* Copyright 2024 kwstudio | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General 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] = { | |||
[0] = LAYOUT_65_ansi_blocker_tsangan_wkl_split_bs( | |||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, | |||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, | |||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, | |||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1), | |||
KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT), | |||
[1] = LAYOUT_65_ansi_blocker_tsangan_wkl_split_bs( | |||
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) | |||
}; |
@ -0,0 +1 @@ | |||
VIA_ENABLE = yes |
@ -0,0 +1,21 @@ | |||
/* Copyright 2024 kwstudio | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General 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_PWM_USE_TIM1 | |||
#define STM32_PWM_USE_TIM1 TRUE |
@ -0,0 +1,27 @@ | |||
# Scorpio Rev2 | |||
![Scorpio Rev2](https://i.imgur.com/pfSLX67h.jpeg) | |||
This keyboard use 8MHz HSE and STM32F103 as MCU. | |||
* Keyboard Maintainer: https://github.com/khchen2004 | |||
* Hardware Supported: Scorpio Rev2 PCB | |||
* Hardware Availibility: Private GB | |||
Make example for this keyboard (after setting up your build environment): | |||
make kwstudio/scorpio_rev2:default | |||
Flashing example for this keyboard: | |||
make kwstudio/scorpio_rev2:flash | |||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | |||
## Bootloader | |||
Enter the bootloader in 3 ways: | |||
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard | |||
* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead | |||
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available |
@ -0,0 +1 @@ | |||
# This file intentionally left blank |
@ -0,0 +1,3 @@ | |||
{ | |||
"development_board": "blackpill_f401" | |||
} |
@ -0,0 +1 @@ | |||
# This file intentionally left blank |
@ -0,0 +1,3 @@ | |||
{ | |||
"development_board": "blackpill_f411" | |||
} |
@ -0,0 +1 @@ | |||
# This file intentionally left blank |
@ -0,0 +1,133 @@ | |||
{ | |||
"manufacturer": "MechWild", | |||
"keyboard_name": "BB40", | |||
"maintainer": "kylemccreery", | |||
"bootloader_instructions": "Hold down the BOOT button, then tap the NRST button on the BlackPill. Avoid touching the A11 and A12 pins.", | |||
"diode_direction": "COL2ROW", | |||
"encoder": { | |||
"rotary": [ | |||
{"pin_a": "B4", "pin_b": "B3"} | |||
] | |||
}, | |||
"features": { | |||
"bootmagic": true, | |||
"encoder": true, | |||
"extrakey": true, | |||
"mousekey": true, | |||
"nkro": true | |||
}, | |||
"indicators": { | |||
"caps_lock": "B8", | |||
"num_lock": "B7", | |||
"scroll_lock": "B9" | |||
}, | |||
"matrix_pins": { | |||
"cols": ["B10", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15"], | |||
"rows": ["B12", "B13", "B14", "B15"] | |||
}, | |||
"url": "https://mechwild.com/product/bb40/", | |||
"usb": { | |||
"device_version": "1.0.0", | |||
"pid": "0x1714", | |||
"vid": "0x6D77" | |||
}, | |||
"layout_aliases": { | |||
"LAYOUT": "LAYOUT_all" | |||
}, | |||
"layouts": { | |||
"LAYOUT_6u": { | |||
"layout": [ | |||
{"matrix": [0, 0], "x": 0, "y": 0}, | |||
{"matrix": [0, 1], "x": 1, "y": 0}, | |||
{"matrix": [0, 2], "x": 2, "y": 0}, | |||
{"matrix": [0, 3], "x": 3, "y": 0}, | |||
{"matrix": [0, 4], "x": 4, "y": 0}, | |||
{"matrix": [0, 5], "x": 5, "y": 0}, | |||
{"matrix": [0, 6], "x": 6, "y": 0}, | |||
{"matrix": [0, 7], "x": 7, "y": 0}, | |||
{"matrix": [0, 8], "x": 8, "y": 0}, | |||
{"matrix": [0, 9], "x": 9, "y": 0}, | |||
{"matrix": [0, 10], "x": 10, "y": 0}, | |||
{"matrix": [0, 11], "x": 11, "y": 0}, | |||
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.25}, | |||
{"matrix": [1, 1], "x": 1.25, "y": 1}, | |||
{"matrix": [1, 2], "x": 2.25, "y": 1}, | |||
{"matrix": [1, 3], "x": 3.25, "y": 1}, | |||
{"matrix": [1, 4], "x": 4.25, "y": 1}, | |||
{"matrix": [1, 5], "x": 5.25, "y": 1}, | |||
{"matrix": [1, 6], "x": 6.25, "y": 1}, | |||
{"matrix": [1, 7], "x": 7.25, "y": 1}, | |||
{"matrix": [1, 8], "x": 8.25, "y": 1}, | |||
{"matrix": [1, 9], "x": 9.25, "y": 1}, | |||
{"matrix": [1, 11], "x": 10.25, "y": 1, "w": 1.75}, | |||
{"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, | |||
{"matrix": [2, 2], "x": 1.75, "y": 2}, | |||
{"matrix": [2, 3], "x": 2.75, "y": 2}, | |||
{"matrix": [2, 4], "x": 3.75, "y": 2}, | |||
{"matrix": [2, 5], "x": 4.75, "y": 2}, | |||
{"matrix": [2, 6], "x": 5.75, "y": 2}, | |||
{"matrix": [2, 7], "x": 6.75, "y": 2}, | |||
{"matrix": [2, 8], "x": 7.75, "y": 2}, | |||
{"matrix": [2, 9], "x": 8.75, "y": 2, "w": 1.25}, | |||
{"matrix": [2, 10], "x": 10, "y": 2}, | |||
{"matrix": [2, 11], "x": 11, "y": 2}, | |||
{"matrix": [3, 0], "x": 0, "y": 3}, | |||
{"matrix": [3, 1], "x": 1, "y": 3}, | |||
{"matrix": [3, 2], "x": 2, "y": 3}, | |||
{"matrix": [3, 6], "x": 3, "y": 3, "w": 6}, | |||
{"matrix": [3, 8], "x": 9, "y": 3}, | |||
{"matrix": [3, 9], "x": 10, "y": 3}, | |||
{"matrix": [3, 10], "x": 11, "y": 3}, | |||
{"matrix": [3, 11], "x": 12.5, "y": 3, "encoder": 0} | |||
] | |||
}, | |||
"LAYOUT_all": { | |||
"layout": [ | |||
{"matrix": [0, 0], "x": 0, "y": 0}, | |||
{"matrix": [0, 1], "x": 1, "y": 0}, | |||
{"matrix": [0, 2], "x": 2, "y": 0}, | |||
{"matrix": [0, 3], "x": 3, "y": 0}, | |||
{"matrix": [0, 4], "x": 4, "y": 0}, | |||
{"matrix": [0, 5], "x": 5, "y": 0}, | |||
{"matrix": [0, 6], "x": 6, "y": 0}, | |||
{"matrix": [0, 7], "x": 7, "y": 0}, | |||
{"matrix": [0, 8], "x": 8, "y": 0}, | |||
{"matrix": [0, 9], "x": 9, "y": 0}, | |||
{"matrix": [0, 10], "x": 10, "y": 0}, | |||
{"matrix": [0, 11], "x": 11, "y": 0}, | |||
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.25}, | |||
{"matrix": [1, 1], "x": 1.25, "y": 1}, | |||
{"matrix": [1, 2], "x": 2.25, "y": 1}, | |||
{"matrix": [1, 3], "x": 3.25, "y": 1}, | |||
{"matrix": [1, 4], "x": 4.25, "y": 1}, | |||
{"matrix": [1, 5], "x": 5.25, "y": 1}, | |||
{"matrix": [1, 6], "x": 6.25, "y": 1}, | |||
{"matrix": [1, 7], "x": 7.25, "y": 1}, | |||
{"matrix": [1, 8], "x": 8.25, "y": 1}, | |||
{"matrix": [1, 9], "x": 9.25, "y": 1}, | |||
{"matrix": [1, 11], "x": 10.25, "y": 1, "w": 1.75}, | |||
{"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, | |||
{"matrix": [2, 2], "x": 1.75, "y": 2}, | |||
{"matrix": [2, 3], "x": 2.75, "y": 2}, | |||
{"matrix": [2, 4], "x": 3.75, "y": 2}, | |||
{"matrix": [2, 5], "x": 4.75, "y": 2}, | |||
{"matrix": [2, 6], "x": 5.75, "y": 2}, | |||
{"matrix": [2, 7], "x": 6.75, "y": 2}, | |||
{"matrix": [2, 8], "x": 7.75, "y": 2}, | |||
{"matrix": [2, 9], "x": 8.75, "y": 2, "w": 1.25}, | |||
{"matrix": [2, 10], "x": 10, "y": 2}, | |||
{"matrix": [2, 11], "x": 11, "y": 2}, | |||
{"matrix": [3, 0], "x": 0, "y": 3}, | |||
{"matrix": [3, 1], "x": 1, "y": 3}, | |||
{"matrix": [3, 2], "x": 2, "y": 3}, | |||
{"matrix": [3, 4], "x": 3, "y": 3, "w": 2.25}, | |||
{"matrix": [3, 6], "x": 5.25, "y": 3}, | |||
{"matrix": [3, 7], "x": 6.25, "y": 3, "w": 2.75}, | |||
{"matrix": [3, 8], "x": 9, "y": 3}, | |||
{"matrix": [3, 9], "x": 10, "y": 3}, | |||
{"matrix": [3, 10], "x": 11, "y": 3}, | |||
{"matrix": [3, 11], "x": 12.5, "y": 3, "encoder": 0} | |||
] | |||
} | |||
} | |||
} |
@ -0,0 +1,42 @@ | |||
{ | |||
"keyboard": "mechwild/bb40", | |||
"keymap": "default", | |||
"version": 1, | |||
"layout": "LAYOUT_all", | |||
"layers": [ | |||
[ | |||
"KC_ESC", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_BSPC", | |||
"MO(1)", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_ENT", | |||
"KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "RSFT_T(KC_COMM)", "KC_UP", "LT(2,KC_DOT)", | |||
"KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "LT(1,KC_SPC)", "KC_SPC", "KC_LEFT", "KC_DOWN", "KC_RIGHT", "KC_MUTE" | |||
], | |||
[ | |||
"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_GRV", "KC_LBRC", "KC_RBRC", "KC_MINS", "KC_TRNS", "KC_TRNS", "KC_EQL", "KC_BSLS", "KC_SCLN", "KC_QUOT", | |||
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_SLSH", | |||
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" | |||
], | |||
[ | |||
"KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12", | |||
"KC_CAPS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", | |||
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", | |||
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" | |||
] | |||
], | |||
"config": { | |||
"features": { | |||
"encoder_map": true | |||
} | |||
}, | |||
"encoders": [ | |||
[ | |||
{"ccw": "KC_VOLD", "cw": "KC_VOLU"} | |||
], | |||
[ | |||
{"ccw": "KC_TRNS", "cw": "KC_TRNS"} | |||
], | |||
[ | |||
{"ccw": "KC_TRNS", "cw": "KC_TRNS"} | |||
] | |||
] | |||
} |
@ -0,0 +1,23 @@ | |||
# BB40 | |||
![BB40](https://i.imgur.com/iikCpBuh.png) | |||
A completely normal BlackPill-powered 40% DIY kit. | |||
The `f401` version is the standard for this kit, using an STM32F401 BlackPill. The `f411` version will not run on an STM32F401 BlackPill; if in doubt, use `f401`. | |||
* Keyboard Maintainer: [Kyle McCreery](https://github.com/kylemccreery) | |||
* Hardware Supported: BB40 v1.0 | |||
* Hardware Availability: [BB40 on MechWild](https://mechwild.com/product/bb40/) | |||
Make example for this keyboard (after setting up your build environment): | |||
make mechwild/bb40/f401:default | |||
make mechwild/bb40/f411:default | |||
Flashing example for this keyboard: | |||
make mechwild/bb40/f401:default:flash | |||
make mechwild/bb40/f411:default:flash | |||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). |
@ -0,0 +1,20 @@ | |||
/* | |||
Copyright 2019-2023 e3w2q Kyrremann | |||
This program is free software: you can redistribute it and/or modify | |||
it under the terms of the GNU General Public License as published by | |||
the Free Software Foundation, either version 2 of the License, or | |||
(at your option) any later version. | |||
This program is distributed in the hope that it will be useful, | |||
but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
GNU General 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 DOUBLE_TAP_SHIFT_TURNS_ON_CAPS_WORD |
@ -0,0 +1,114 @@ | |||
{ | |||
"keyboard_name": "Bartlesplit", | |||
"development_board": "promicro", | |||
"diode_direction": "ROW2COL", | |||
"features": { | |||
"bootmagic": true, | |||
"command": false, | |||
"console": false, | |||
"extrakey": true, | |||
"mousekey": true, | |||
"nkro": false, | |||
"caps_word": true | |||
}, | |||
"matrix_pins": { | |||
"cols": ["B3", "B3", "B1", "B1", "F7", "F7", "E6", "E6", "D7", "D7", "C6", "C6"], | |||
"rows": ["B5", "B4", "B2", "B6"] | |||
}, | |||
"pin_compatible": "promicro", | |||
"url": "https://github.com/Kyrremann/bartlesplit", | |||
"usb": { | |||
"device_version": "1.0.0", | |||
"pid": "0x1306", | |||
"vid": "0x4B49" | |||
}, | |||
"community_layouts": ["split_3x6_3", "split_3x5_3"], | |||
"layouts": { | |||
"LAYOUT_split_3x5_3": { | |||
"layout": [ | |||
{"matrix": [0, 4], "x": 0, "y": 0.5}, | |||
{"matrix": [0, 3], "x": 1, "y": 0.25}, | |||
{"matrix": [0, 2], "x": 2, "y": 0}, | |||
{"matrix": [0, 1], "x": 3, "y": 0.25}, | |||
{"matrix": [0, 0], "x": 4, "y": 0.25}, | |||
{"matrix": [0, 6], "x": 6.5, "y": 0.25}, | |||
{"matrix": [0, 7], "x": 7.5, "y": 0.25}, | |||
{"matrix": [0, 8], "x": 8.5, "y": 0}, | |||
{"matrix": [0, 9], "x": 9.5, "y": 0.25}, | |||
{"matrix": [0, 10], "x": 10.5, "y": 0.5}, | |||
{"matrix": [1, 4], "x": 0, "y": 1.5}, | |||
{"matrix": [1, 3], "x": 1, "y": 1.25}, | |||
{"matrix": [1, 2], "x": 2, "y": 1}, | |||
{"matrix": [1, 1], "x": 3, "y": 1.25}, | |||
{"matrix": [1, 0], "x": 4, "y": 1.25}, | |||
{"matrix": [1, 6], "x": 6.5, "y": 1.25}, | |||
{"matrix": [1, 7], "x": 7.5, "y": 1.25}, | |||
{"matrix": [1, 8], "x": 8.5, "y": 1}, | |||
{"matrix": [1, 9], "x": 9.5, "y": 1.25}, | |||
{"matrix": [1, 10], "x": 10.5, "y": 1.5}, | |||
{"matrix": [2, 4], "x": 0, "y": 2.5}, | |||
{"matrix": [2, 3], "x": 1, "y": 2.25}, | |||
{"matrix": [2, 2], "x": 2, "y": 2}, | |||
{"matrix": [2, 1], "x": 3, "y": 2.25}, | |||
{"matrix": [2, 0], "x": 4, "y": 2.25}, | |||
{"matrix": [2, 6], "x": 6.5, "y": 2.25}, | |||
{"matrix": [2, 7], "x": 7.5, "y": 2.25}, | |||
{"matrix": [2, 8], "x": 8.5, "y": 2}, | |||
{"matrix": [2, 9], "x": 9.5, "y": 2.25}, | |||
{"matrix": [2, 10], "x": 10.5, "y": 2.5}, | |||
{"matrix": [3, 1], "x": 2.5, "y": 3.25}, | |||
{"matrix": [3, 0], "x": 3.5, "y": 3.25}, | |||
{"matrix": [3, 3], "x": 4.5, "y": 3.5}, | |||
{"matrix": [3, 6], "x": 6, "y": 3.5}, | |||
{"matrix": [3, 7], "x": 7, "y": 3.25}, | |||
{"matrix": [3, 8], "x": 8, "y": 3.25} | |||
] | |||
}, | |||
"LAYOUT_split_3x6_3": { | |||
"layout": [ | |||
{"matrix": [0, 5], "x": 0, "y": 0.25}, | |||
{"matrix": [0, 4], "x": 1, "y": 0.125}, | |||
{"matrix": [0, 3], "x": 2, "y": 0}, | |||
{"matrix": [0, 2], "x": 3, "y": 0.125}, | |||
{"matrix": [0, 1], "x": 4, "y": 0.25}, | |||
{"matrix": [0, 0], "x": 5, "y": 0.25}, | |||
{"matrix": [0, 6], "x": 7, "y": 0.25}, | |||
{"matrix": [0, 7], "x": 8, "y": 0.125}, | |||
{"matrix": [0, 8], "x": 9, "y": 0}, | |||
{"matrix": [0, 9], "x": 10, "y": 0.125}, | |||
{"matrix": [0, 10], "x": 11, "y": 0.25}, | |||
{"matrix": [0, 11], "x": 12, "y": 0.25}, | |||
{"matrix": [1, 5], "x": 0, "y": 1.25}, | |||
{"matrix": [1, 4], "x": 1, "y": 1.125}, | |||
{"matrix": [1, 3], "x": 2, "y": 1}, | |||
{"matrix": [1, 2], "x": 3, "y": 1.125}, | |||
{"matrix": [1, 1], "x": 4, "y": 1.25}, | |||
{"matrix": [1, 0], "x": 5, "y": 1.25}, | |||
{"matrix": [1, 6], "x": 7, "y": 1.25}, | |||
{"matrix": [1, 7], "x": 8, "y": 1.125}, | |||
{"matrix": [1, 8], "x": 9, "y": 1}, | |||
{"matrix": [1, 9], "x": 10, "y": 1.125}, | |||
{"matrix": [1, 10], "x": 11, "y": 1.25}, | |||
{"matrix": [1, 11], "x": 12, "y": 1.25}, | |||
{"matrix": [2, 5], "x": 0, "y": 2.25}, | |||
{"matrix": [2, 4], "x": 1, "y": 2.125}, | |||
{"matrix": [2, 3], "x": 2, "y": 2}, | |||
{"matrix": [2, 2], "x": 3, "y": 2.125}, | |||
{"matrix": [2, 1], "x": 4, "y": 2.25}, | |||
{"matrix": [2, 0], "x": 5, "y": 2.25}, | |||
{"matrix": [2, 6], "x": 7, "y": 2.25}, | |||
{"matrix": [2, 7], "x": 8, "y": 2.125}, | |||
{"matrix": [2, 8], "x": 9, "y": 2}, | |||
{"matrix": [2, 9], "x": 10, "y": 2.125}, | |||
{"matrix": [2, 10], "x": 11, "y": 2.25}, | |||
{"matrix": [2, 11], "x": 12, "y": 2.25}, | |||
{"matrix": [3, 1], "x": 3.5, "y": 3.25}, | |||
{"matrix": [3, 0], "x": 4.5, "y": 3.5}, | |||
{"matrix": [3, 3], "x": 5.5, "y": 3.75}, | |||
{"matrix": [3, 6], "x": 6.5, "y": 3.75}, | |||
{"matrix": [3, 7], "x": 7.5, "y": 3.5}, | |||
{"matrix": [3, 8], "x": 8.5, "y": 3.25} | |||
] | |||
} | |||
} | |||
} |
@ -0,0 +1,33 @@ | |||
{ | |||
"version": 1, | |||
"notes": "Bartlesplit default keymap", | |||
"keyboard": "minimon/bartlesplit", | |||
"keymap": "default", | |||
"layout": "LAYOUT_split_3x6_3", | |||
"layers": [ | |||
[ | |||
"KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_LBRC", | |||
"KC_LCTL", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT", | |||
"LSFT_T(KC_ESC)", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "RSFT_T(KC_ESC)", | |||
"KC_LALT", "KC_LGUI", "LT(2,KC_SPC)", "KC_ENT", "MO(1)", "KC_BSPC" | |||
], | |||
[ | |||
"KC_NUBS", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_MINS", | |||
"KC_TRNS", "LSFT(KC_1)", "LSFT(KC_2)", "LSFT(KC_3)", "LSFT(KC_4)", "LSFT(KC_5)", "LSFT(KC_6)", "LSFT(KC_7)", "LSFT(KC_8)", "LSFT(KC_9)", "LSFT(KC_0)", "LSFT(KC_MINS)", | |||
"KC_TRNS", "KC_GRV", "KC_TRNS", "LSFT(KC_EQL)", "LSFT(KC_RBRC)", "LSFT(KC_BSLS)", "KC_BSLS", "KC_RBRC", "KC_EQL", "KC_TRNS", "KC_TRNS", "KC_TRNS", | |||
"KC_RALT", "KC_TRNS", "KC_ESC", "KC_TRNS", "KC_TRNS", "KC_DEL" | |||
], | |||
[ | |||
"KC_ESC", "KC_NO", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_NO", "KC_NO", "KC_UP", "KC_NO", "KC_KB_VOLUME_UP", "KC_MEDIA_PLAY_PAUSE", | |||
"KC_TRNS", "KC_NO", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_NO", "KC_LEFT", "KC_DOWN", "KC_RGHT", "KC_KB_VOLUME_DOWN", "KC_NO", | |||
"KC_TRNS", "KC_NO", "KC_F9", "KC_F10", "KC_F11", "KC_F12", "KC_LCBR", "RALT(KC_8)", "RALT(KC_9)", "KC_RCBR", "KC_NO", "KC_TRNS", | |||
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS" | |||
], | |||
[ | |||
"KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_LBRC", | |||
"KC_LCTL", "LGUI_T(KC_A)", "LALT_T(KC_S)", "LCTL_T(KC_D)", "LSFT_T(KC_F)", "KC_G", "KC_H", "RSFT_T(KC_J)", "LCTL_T(KC_K)", "LALT_T(KC_L)", "LGUI_T(KC_SCLN)", "KC_QUOT", | |||
"LSFT_T(KC_ESC)", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "RSFT_T(KC_ESC)", | |||
"KC_LALT", "KC_LGUI", "LT(2,KC_SPC)", "KC_ENT", "MO(1)", "KC_BSPC" | |||
] | |||
] | |||
} |
@ -0,0 +1,148 @@ | |||
/* | |||
Copyright 2012-2023 Jun Wako <wakojun@gmail.com> Kyrremann <kyrremann@gmail.com> | |||
This program is free software: you can redistribute it and/or modify | |||
it under the terms of the GNU General Public License as published by | |||
the Free Software Foundation, either version 2 of the License, or | |||
(at your option) any later version. | |||
This program is distributed in the hope that it will be useful, | |||
but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
GNU General Public License for more details. | |||
You should have received a copy of the GNU General Public License | |||
along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
Copied from here: https://github.com/e3w2q/qmk_firmware/blob/762fe3e0a7cbea768245a75520f06ff5a2f00b9f/keyboards/2x3test/matrix.c | |||
*/ | |||
/* | |||
* scan matrix | |||
*/ | |||
#include <stdint.h> | |||
#include <stdbool.h> | |||
#include "wait.h" | |||
#include "util.h" | |||
#include "matrix.h" | |||
#include "quantum.h" | |||
#define ROW_SHIFTER ((uint16_t)1) | |||
static const pin_t row_pins[] = MATRIX_ROW_PINS; | |||
static const pin_t col_pins[] = MATRIX_COL_PINS; | |||
static void select_row(uint8_t row) { | |||
setPinOutput(row_pins[row]); | |||
writePinLow(row_pins[row]); | |||
} | |||
static void unselect_row(uint8_t row) { | |||
setPinInputHigh(row_pins[row]); | |||
} | |||
static void unselect_rows(void) { | |||
for (uint8_t x = 0; x < MATRIX_ROWS; x++) { | |||
setPinInputHigh(row_pins[x]); | |||
} | |||
} | |||
static void select_col(uint8_t col) { | |||
setPinOutput(col_pins[col]); | |||
writePinLow(col_pins[col]); | |||
} | |||
static void unselect_col(uint8_t col) { | |||
setPinInputHigh(col_pins[col]); | |||
} | |||
static void unselect_cols(void) { | |||
for (uint8_t x = 0; x < MATRIX_COLS/2; x++) { | |||
setPinInputHigh(col_pins[x*2]); | |||
} | |||
} | |||
static void init_pins(void) { | |||
unselect_cols(); | |||
unselect_rows(); | |||
} | |||
static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { | |||
// Store last value of row prior to reading | |||
matrix_row_t last_row_value = current_matrix[current_row]; | |||
// Select row and wait for row selection to stabilize | |||
select_row(current_row); | |||
wait_us(30); | |||
// For each col... | |||
for (uint8_t col_index = 0; col_index < MATRIX_COLS / 2; col_index++) { | |||
uint16_t column_index_bitmask = ROW_SHIFTER << ((col_index * 2) + 1); | |||
// Check row pin state | |||
if (readPin(col_pins[col_index*2])) { | |||
// Pin HI, clear col bit | |||
current_matrix[current_row] &= ~column_index_bitmask; | |||
} else { | |||
// Pin LO, set col bit | |||
current_matrix[current_row] |= column_index_bitmask; | |||
} | |||
} | |||
// Unselect row | |||
unselect_row(current_row); | |||
return (last_row_value != current_matrix[current_row]); | |||
} | |||
static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) { | |||
bool matrix_changed = false; | |||
// Select col and wait for col selection to stabilize | |||
select_col(current_col*2); | |||
wait_us(30); | |||
// For each row... | |||
for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) { | |||
// Store last value of row prior to reading | |||
matrix_row_t last_row_value = current_matrix[row_index]; | |||
uint16_t column_index_bitmask = ROW_SHIFTER << (current_col * 2); | |||
// Check row pin state | |||
if (readPin(row_pins[row_index])) { | |||
// Pin HI, clear col bit | |||
current_matrix[row_index] &= ~column_index_bitmask; | |||
} else { | |||
// Pin LO, set col bit | |||
current_matrix[row_index] |= column_index_bitmask; | |||
} | |||
// Determine if the matrix changed state | |||
if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) { | |||
matrix_changed = true; | |||
} | |||
} | |||
// Unselect col | |||
unselect_col(current_col*2); | |||
return matrix_changed; | |||
} | |||
void matrix_init_custom(void) { | |||
// initialize key pins | |||
init_pins(); | |||
} | |||
bool matrix_scan_custom(matrix_row_t current_matrix[]) { | |||
bool changed = false; | |||
// Set row, read cols | |||
for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { | |||
changed |= read_cols_on_row(current_matrix, current_row); | |||
} | |||
// Set col, read rows | |||
for (uint8_t current_col = 0; current_col < MATRIX_COLS/2; current_col++) { | |||
changed |= read_rows_on_col(current_matrix, current_col); | |||
} | |||
return changed; | |||
} |
@ -0,0 +1,31 @@ | |||
# Bartlesplitt | |||
![Bartlesplit with the hub in the 3x6 setup](https://i.imgur.com/IoMpwylh.png) | |||
Bartlesplit is based on [Cheapino](https://github.com/tompi/cheapino) by Tompi. | |||
The original idea was to build a Cheapino with hot swaps, but it evolved into something more! | |||
At the same time I was working on Bartlesplit, a friend of mine suggested that we try to make a splithub, letting us avoid having the Pro Micro directly on the board. | |||
This is mostly a design choice, making each split less clutered. | |||
We have called the hub [The Japanese Connection](https://github.com/Kyrremann/the-japanese-connection) since it's relying on the Japanese duplex matrix. | |||
One of the main feature of the board is the built-in tenting, so you don't need to make a case to get simple tenting. | |||
* Keyboard Maintainer: [Kyrre Havik](https://github.com/Kyrremann) | |||
* Hardware Supported: Rev 1, Pro Micro | |||
* Hardware Availability: https://github.com/Kyrremann/bartlesplit | |||
Make example for this keyboard (after setting up your build environment): | |||
make minimon/bartlesplit:default | |||
Flashing example for this keyboard: | |||
make minimon/bartlesplit:default:flash | |||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | |||
## Bootloader | |||
Enter the bootloader in shorting the reset pin on Pro Micro on the hub. |