mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-22 03:19:24 +00:00
Compare commits
9 Commits
9fe0f1cdf0
...
d1f25d579f
Author | SHA1 | Date | |
---|---|---|---|
|
d1f25d579f | ||
|
c843ad1268 | ||
|
0988523851 | ||
|
2ae4aefdce | ||
|
c0f08b5409 | ||
|
6eff9b20e8 | ||
|
6a8fc3bdbb | ||
|
3fc97491ef | ||
|
fbe7f961ee |
@ -4,7 +4,7 @@ This page attempts to introduce developers to the QMK Compiler. It does not go i
|
|||||||
|
|
||||||
# Overview
|
# Overview
|
||||||
|
|
||||||
The QMK Compile API consists of a few movings parts:
|
The QMK Compile API consists of a few moving parts:
|
||||||
|
|
||||||
![Architecture Diagram](https://raw.githubusercontent.com/qmk/qmk_api/master/docs/architecture.svg)
|
![Architecture Diagram](https://raw.githubusercontent.com/qmk/qmk_api/master/docs/architecture.svg)
|
||||||
|
|
||||||
|
@ -60,6 +60,14 @@
|
|||||||
"resync": true
|
"resync": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"encoder": {
|
||||||
|
"rotary": [
|
||||||
|
{"pin_a": "B12", "pin_b": "B11", "resolution": 2},
|
||||||
|
{"pin_a": "B12", "pin_b": "B11", "resolution": 2},
|
||||||
|
{"pin_a": "B12", "pin_b": "B11", "resolution": 2},
|
||||||
|
{"pin_a": "B12", "pin_b": "B11", "resolution": 2}
|
||||||
|
]
|
||||||
|
},
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT_default": {
|
"LAYOUT_default": {
|
||||||
"layout": [
|
"layout": [
|
||||||
|
@ -44,3 +44,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if defined(ENCODER_MAP_ENABLE)
|
||||||
|
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
|
||||||
|
[0] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(UG_HUED, UG_HUEU), ENCODER_CCW_CW(UG_SATD, UG_SATU) },
|
||||||
|
[1] = { ENCODER_CCW_CW(UG_VALD, UG_VALU), ENCODER_CCW_CW(UG_SPDD, UG_SPDU), ENCODER_CCW_CW(UG_PREV, UG_NEXT), ENCODER_CCW_CW(KC_RIGHT, KC_LEFT) },
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
@ -0,0 +1,2 @@
|
|||||||
|
ENCODER_ENABLE = yes
|
||||||
|
ENCODER_MAP_ENABLE = yes
|
40
keyboards/cannonkeys/sagittarius/sagittarius.c
Normal file
40
keyboards/cannonkeys/sagittarius/sagittarius.c
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
// Copyright 2024 Nick Brassel (@tzarc)
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
#if defined(ENCODER_ENABLE) || defined(ENCODER_MAP_ENABLE)
|
||||||
|
|
||||||
|
# if !defined(ENCODER_SETTLE_PIN_STATE_DELAY_US)
|
||||||
|
# define ENCODER_SETTLE_PIN_STATE_DELAY_US 2
|
||||||
|
# endif
|
||||||
|
|
||||||
|
static pin_t matrix_row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
|
||||||
|
|
||||||
|
void encoder_driver_task(void) {
|
||||||
|
// Set all relevant rows to output, which is different to the matrix expectations
|
||||||
|
for (uint8_t i = 0; i < 4; i++) {
|
||||||
|
gpio_set_pin_output(matrix_row_pins[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read each encoder
|
||||||
|
for (uint8_t i = 0; i < 4; i++) {
|
||||||
|
// Set the row pin low for the corresponding encoder...
|
||||||
|
for (uint8_t j = 0; j < 4; j++) {
|
||||||
|
gpio_write_pin(matrix_row_pins[j], (i == j) ? 0 : 1);
|
||||||
|
}
|
||||||
|
// ...and let them settle.
|
||||||
|
wait_us(ENCODER_SETTLE_PIN_STATE_DELAY_US);
|
||||||
|
|
||||||
|
// Run the normal encoder handling
|
||||||
|
extern void encoder_quadrature_handle_read(uint8_t index, uint8_t pin_a_state, uint8_t pin_b_state);
|
||||||
|
extern uint8_t encoder_quadrature_read_pin(uint8_t index, bool pad_b);
|
||||||
|
encoder_quadrature_handle_read(i, encoder_quadrature_read_pin(i, false), encoder_quadrature_read_pin(i, true));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set all rows back to input-high as per matrix expectations
|
||||||
|
for (uint8_t i = 0; i < 4; i++) {
|
||||||
|
gpio_set_pin_input_high(matrix_row_pins[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // defined(ENCODER_ENABLE) || defined(ENCODER_MAP_ENABLE)
|
99
keyboards/handwired/handle_68/keyboard.json
Normal file
99
keyboards/handwired/handle_68/keyboard.json
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
{
|
||||||
|
"manufacturer": "Alden Johnson",
|
||||||
|
"keyboard_name": "Handle 68",
|
||||||
|
"maintainer": "Alden Johnson",
|
||||||
|
"bootloader": "stm32-dfu",
|
||||||
|
"diode_direction": "COL2ROW",
|
||||||
|
"features": {
|
||||||
|
"bootmagic": true,
|
||||||
|
"command": false,
|
||||||
|
"console": false,
|
||||||
|
"extrakey": true,
|
||||||
|
"mousekey": true,
|
||||||
|
"nkro": true
|
||||||
|
},
|
||||||
|
"matrix_pins": {
|
||||||
|
"cols": ["B2", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "B7", "B6", "B5", "B4", "B3", "A15", "A14"],
|
||||||
|
"rows": ["A2", "F0", "C15", "C14", "C13"]
|
||||||
|
},
|
||||||
|
"processor": "STM32F072",
|
||||||
|
"url": "",
|
||||||
|
"usb": {
|
||||||
|
"device_version": "1.0.0",
|
||||||
|
"pid": "0x0000",
|
||||||
|
"vid": "0xFEED"
|
||||||
|
},
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_68_mac": {
|
||||||
|
"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, 13], "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.25},
|
||||||
|
{"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
|
||||||
|
{"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
|
||||||
|
{"matrix": [4, 5], "x": 3.75, "y": 4, "w": 6.25},
|
||||||
|
{"matrix": [4, 9], "x": 10, "y": 4, "w": 1.5},
|
||||||
|
{"matrix": [4, 10], "x": 11.5, "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}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
14
keyboards/handwired/handle_68/keymaps/default/keymap.c
Normal file
14
keyboards/handwired/handle_68/keymaps/default/keymap.c
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
// 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_68_mac(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
|
||||||
|
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
|
)
|
||||||
|
};
|
26
keyboards/handwired/handle_68/readme.md
Normal file
26
keyboards/handwired/handle_68/readme.md
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# handwired/handle_68
|
||||||
|
|
||||||
|
* a 68% keyboard with a handle!
|
||||||
|
|
||||||
|
# <img alt="photo of handle_68 keyboard" src="https://i.imgur.com/7ijNXEm.jpeg" style="width:50%; height:auto;">
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [Alden Johnson](https://github.com/Alden5)
|
||||||
|
* Hardware Supported: handle_68_pcb
|
||||||
|
* Hardware Availability: rob alden for it (group buy hopefully coming soon)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make handwired/handle_68:default
|
||||||
|
|
||||||
|
Flashing example for this keyboard:
|
||||||
|
|
||||||
|
make handwired/handle_68: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 esc key and plug in keyboard
|
||||||
|
* **Physical reset button**: Short the two pins on back of pcba labeled boot0 with tweezers and plug in keyboard
|
Loading…
Reference in New Issue
Block a user