mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-24 20:32:58 +00:00
Compare commits
4 Commits
da30ce9527
...
eeeebc9cfd
Author | SHA1 | Date | |
---|---|---|---|
|
eeeebc9cfd | ||
|
c843ad1268 | ||
|
0988523851 | ||
|
15ba7f0cca |
@ -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)
|
178
keyboards/rpiguy9907/fistbnmp/keyboard.json
Normal file
178
keyboards/rpiguy9907/fistbnmp/keyboard.json
Normal file
@ -0,0 +1,178 @@
|
|||||||
|
{
|
||||||
|
"manufacturer": "rpiguy9907",
|
||||||
|
"keyboard_name": "fistbnmp",
|
||||||
|
"maintainer": "lesshonor",
|
||||||
|
"bootloader": "atmel-dfu",
|
||||||
|
"bootloader_instructions": "Press the button labeled SW1 on the back of the PCB.",
|
||||||
|
"diode_direction": "COL2ROW",
|
||||||
|
"features": {
|
||||||
|
"bootmagic": true,
|
||||||
|
"extrakey": true,
|
||||||
|
"mousekey": true,
|
||||||
|
"nkro": true
|
||||||
|
},
|
||||||
|
"matrix_pins": {
|
||||||
|
"cols": ["C6", "C7", "B4", "F7", "D0", "D6", "D3", "D4", "D5"],
|
||||||
|
"rows": ["F0", "B6", "D7", "B5"]
|
||||||
|
},
|
||||||
|
"processor": "atmega32u4",
|
||||||
|
"url": "https://github.com/rpiguy9907",
|
||||||
|
"usb": {
|
||||||
|
"device_version": "1.0.0",
|
||||||
|
"pid": "0x0000",
|
||||||
|
"vid": "0xFEED"
|
||||||
|
},
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_3u": {
|
||||||
|
"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": [1, 0], "x": 0, "y": 1},
|
||||||
|
{"matrix": [1, 1], "x": 1, "y": 1},
|
||||||
|
{"matrix": [1, 2], "x": 2, "y": 1},
|
||||||
|
{"matrix": [1, 3], "x": 3, "y": 1},
|
||||||
|
{"matrix": [1, 4], "x": 4, "y": 1},
|
||||||
|
{"matrix": [1, 5], "x": 5, "y": 1},
|
||||||
|
{"matrix": [1, 6], "x": 6, "y": 1},
|
||||||
|
{"matrix": [1, 7], "x": 7, "y": 1},
|
||||||
|
{"matrix": [1, 8], "x": 8, "y": 1},
|
||||||
|
{"matrix": [2, 0], "x": 0, "y": 2},
|
||||||
|
{"matrix": [2, 1], "x": 1, "y": 2},
|
||||||
|
{"matrix": [2, 2], "x": 2, "y": 2},
|
||||||
|
{"matrix": [2, 3], "x": 3, "y": 2},
|
||||||
|
{"matrix": [2, 4], "x": 4, "y": 2},
|
||||||
|
{"matrix": [2, 5], "x": 5, "y": 2},
|
||||||
|
{"matrix": [2, 6], "x": 6, "y": 2},
|
||||||
|
{"matrix": [2, 7], "x": 7, "y": 2},
|
||||||
|
{"matrix": [2, 8], "x": 8, "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": 3},
|
||||||
|
{"matrix": [3, 6], "x": 6, "y": 3},
|
||||||
|
{"matrix": [3, 7], "x": 7, "y": 3},
|
||||||
|
{"matrix": [3, 8], "x": 8, "y": 3}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"LAYOUT_7u": {
|
||||||
|
"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": [1, 0], "x": 0, "y": 1},
|
||||||
|
{"matrix": [1, 1], "x": 1, "y": 1},
|
||||||
|
{"matrix": [1, 2], "x": 2, "y": 1},
|
||||||
|
{"matrix": [1, 3], "x": 3, "y": 1},
|
||||||
|
{"matrix": [1, 4], "x": 4, "y": 1},
|
||||||
|
{"matrix": [1, 5], "x": 5, "y": 1},
|
||||||
|
{"matrix": [1, 6], "x": 6, "y": 1},
|
||||||
|
{"matrix": [1, 7], "x": 7, "y": 1},
|
||||||
|
{"matrix": [1, 8], "x": 8, "y": 1},
|
||||||
|
{"matrix": [2, 0], "x": 0, "y": 2},
|
||||||
|
{"matrix": [2, 1], "x": 1, "y": 2},
|
||||||
|
{"matrix": [2, 2], "x": 2, "y": 2},
|
||||||
|
{"matrix": [2, 3], "x": 3, "y": 2},
|
||||||
|
{"matrix": [2, 4], "x": 4, "y": 2},
|
||||||
|
{"matrix": [2, 5], "x": 5, "y": 2},
|
||||||
|
{"matrix": [2, 6], "x": 6, "y": 2},
|
||||||
|
{"matrix": [2, 7], "x": 7, "y": 2},
|
||||||
|
{"matrix": [2, 8], "x": 8, "y": 2},
|
||||||
|
{"matrix": [3, 0], "x": 0, "y": 3},
|
||||||
|
{"matrix": [3, 4], "x": 1, "y": 3, "w": 7},
|
||||||
|
{"matrix": [3, 8], "x": 8, "y": 3}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"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": [1, 0], "x": 0, "y": 1},
|
||||||
|
{"matrix": [1, 1], "x": 1, "y": 1},
|
||||||
|
{"matrix": [1, 2], "x": 2, "y": 1},
|
||||||
|
{"matrix": [1, 3], "x": 3, "y": 1},
|
||||||
|
{"matrix": [1, 4], "x": 4, "y": 1},
|
||||||
|
{"matrix": [1, 5], "x": 5, "y": 1},
|
||||||
|
{"matrix": [1, 6], "x": 6, "y": 1},
|
||||||
|
{"matrix": [1, 7], "x": 7, "y": 1},
|
||||||
|
{"matrix": [1, 8], "x": 8, "y": 1},
|
||||||
|
{"matrix": [2, 0], "x": 0, "y": 2},
|
||||||
|
{"matrix": [2, 1], "x": 1, "y": 2},
|
||||||
|
{"matrix": [2, 2], "x": 2, "y": 2},
|
||||||
|
{"matrix": [2, 3], "x": 3, "y": 2},
|
||||||
|
{"matrix": [2, 4], "x": 4, "y": 2},
|
||||||
|
{"matrix": [2, 5], "x": 5, "y": 2},
|
||||||
|
{"matrix": [2, 6], "x": 6, "y": 2},
|
||||||
|
{"matrix": [2, 7], "x": 7, "y": 2},
|
||||||
|
{"matrix": [2, 8], "x": 8, "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, 3], "x": 3, "y": 3},
|
||||||
|
{"matrix": [3, 4], "x": 4, "y": 3},
|
||||||
|
{"matrix": [3, 5], "x": 5, "y": 3},
|
||||||
|
{"matrix": [3, 6], "x": 6, "y": 3},
|
||||||
|
{"matrix": [3, 7], "x": 7, "y": 3},
|
||||||
|
{"matrix": [3, 8], "x": 8, "y": 3}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"LAYOUT_split_space": {
|
||||||
|
"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": [1, 0], "x": 0, "y": 1},
|
||||||
|
{"matrix": [1, 1], "x": 1, "y": 1},
|
||||||
|
{"matrix": [1, 2], "x": 2, "y": 1},
|
||||||
|
{"matrix": [1, 3], "x": 3, "y": 1},
|
||||||
|
{"matrix": [1, 4], "x": 4, "y": 1},
|
||||||
|
{"matrix": [1, 5], "x": 5, "y": 1},
|
||||||
|
{"matrix": [1, 6], "x": 6, "y": 1},
|
||||||
|
{"matrix": [1, 7], "x": 7, "y": 1},
|
||||||
|
{"matrix": [1, 8], "x": 8, "y": 1},
|
||||||
|
{"matrix": [2, 0], "x": 0, "y": 2},
|
||||||
|
{"matrix": [2, 1], "x": 1, "y": 2},
|
||||||
|
{"matrix": [2, 2], "x": 2, "y": 2},
|
||||||
|
{"matrix": [2, 3], "x": 3, "y": 2},
|
||||||
|
{"matrix": [2, 4], "x": 4, "y": 2},
|
||||||
|
{"matrix": [2, 5], "x": 5, "y": 2},
|
||||||
|
{"matrix": [2, 6], "x": 6, "y": 2},
|
||||||
|
{"matrix": [2, 7], "x": 7, "y": 2},
|
||||||
|
{"matrix": [2, 8], "x": 8, "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, 3], "x": 3, "y": 3, "w": 1.5},
|
||||||
|
{"matrix": [3, 5], "x": 4.5, "y": 3, "w": 1.5},
|
||||||
|
{"matrix": [3, 6], "x": 6, "y": 3},
|
||||||
|
{"matrix": [3, 7], "x": 7, "y": 3},
|
||||||
|
{"matrix": [3, 8], "x": 8, "y": 3}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
14
keyboards/rpiguy9907/fistbnmp/keymaps/default/keymap.json
Normal file
14
keyboards/rpiguy9907/fistbnmp/keymaps/default/keymap.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"keyboard": "rpiguy9907/fistbnmp",
|
||||||
|
"keymap": "default",
|
||||||
|
"version": 1,
|
||||||
|
"layout": "LAYOUT_all",
|
||||||
|
"layers": [
|
||||||
|
[
|
||||||
|
"KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O",
|
||||||
|
"KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L",
|
||||||
|
"KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_P", "KC_DOT",
|
||||||
|
"KC_LCTL", "KC_LALT", "KC_LGUI", "KC_SPC", "KC_SPC", "KC_RIGHT", "KC_LEFT", "KC_DOWN", "KC_UP"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
27
keyboards/rpiguy9907/fistbnmp/readme.md
Normal file
27
keyboards/rpiguy9907/fistbnmp/readme.md
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# FistBNMP
|
||||||
|
|
||||||
|
![FistBNMP assembled proto and bare PCB](https://i.redd.it/uv34770qmc371.jpg)
|
||||||
|
|
||||||
|
A compact 9u layout with support for standard Cherry MX and Low Profile MX switches.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [rpiguy9907](https://github.com/rpiguy9907), [lesshonor](https://github.com/lesshonor)
|
||||||
|
* Hardware Supported: FistBNMP PCB (atmega32u4, atmel-dfu)
|
||||||
|
* Hardware Availability: Files available on request; ask in the 40% Discord
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make rpiguy9907/fistbnmp:default
|
||||||
|
|
||||||
|
Flashing example for this keyboard:
|
||||||
|
|
||||||
|
make rpiguy9907/fistbnmp: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 top left key and plug in the keyboard. This will also clear EEPROM, so it is a good first step if the keyboard is misbehaving.
|
||||||
|
* **Physical reset button**: Briefly press the button labeled `SW1` on the back of the PCB.
|
||||||
|
* **Keycode in layout**: There is no key mapped to `QK_BOOT` in the pre-created keymaps, but you may assign this key in any keymaps you create.
|
Loading…
Reference in New Issue
Block a user