Compare commits
118 Commits
0.14.9
...
json_custo
Author | SHA1 | Date | |
---|---|---|---|
9eaee65ac3 | |||
5b0b8ba654 | |||
0a33ce0659 | |||
ac4849df13 | |||
6d43a5daf4 | |||
f03e78e888 | |||
cb4006c0b4 | |||
588a3afe40 | |||
891ddd9a30 | |||
1837d98425 | |||
f3bef84dac | |||
da81e5c7cd | |||
d961d8df83 | |||
853e56d080 | |||
8fa2a7ea2a | |||
9e77cdf4e6 | |||
60c985ac8e | |||
3f2a030de6 | |||
cab0d7955f | |||
d510f6afa9 | |||
24000ef2e1 | |||
4294aa0f1e | |||
983580322f | |||
8f8411a98a | |||
38afc7e4cc | |||
2e0659f7fd | |||
d977e5d3e9 | |||
9b3e973aa2 | |||
9c175f1801 | |||
4164f4148b | |||
541e101291 | |||
6482fb9911 | |||
3ef01a3482 | |||
1498ecaa24 | |||
1ebaec96e7 | |||
456f7019de | |||
267ffb9914 | |||
4ba8305a5c | |||
0b8d6df390 | |||
f6b0484f0f | |||
60c5bd7b5e | |||
af19461a02 | |||
04c0704b28 | |||
e7a5c006d9 | |||
c669c43769 | |||
2d6635214a | |||
f98f23d6d6 | |||
1dbe4e7dd0 | |||
943e413f76 | |||
85a14ac25b | |||
6ca09c6bba | |||
d72f29556a | |||
147289e173 | |||
673f82ebd9 | |||
e1ad9432b6 | |||
a66e8c884f | |||
0b1dee6c50 | |||
e4fcdf57cf | |||
d272bf2dc2 | |||
9f17f9b2e1 | |||
88bb29fb17 | |||
f95706810a | |||
337be283ca | |||
5bb9da6bca | |||
751dc35546 | |||
d68d34644a | |||
d8a2142f24 | |||
c2da0da1dc | |||
0ed4002c19 | |||
98436577d7 | |||
cfedd3054e | |||
e597469964 | |||
f77602b8fb | |||
7847acdded | |||
b0104e99a5 | |||
d437f78f57 | |||
48a7b50238 | |||
b4065c557a | |||
1b357ea432 | |||
4df91985f7 | |||
41c50bb653 | |||
971d36bb9e | |||
d019c8a991 | |||
54ae829b04 | |||
7d797d2e34 | |||
94c9716e5b | |||
9abc657903 | |||
7830d671d3 | |||
1fdf766988 | |||
b8c68afb2f | |||
bab997c8c4 | |||
4d4c61f2e8 | |||
a163d34abc | |||
25a2502216 | |||
15710db4ad | |||
cf28feaf4d | |||
d770e273e1 | |||
3f4d39ec84 | |||
3471b2ac89 | |||
4853ca1437 | |||
9a888a5ec5 | |||
5b4f63c45f | |||
596c4a1f87 | |||
b46064a891 | |||
92e606b927 | |||
5fbfab1f3b | |||
532bff7b6c | |||
d227c8692a | |||
55d6956553 | |||
8800adc533 | |||
7209d7cca9 | |||
77a93fec79 | |||
c729df09ca | |||
566d598516 | |||
f155865804 | |||
1ac3b3e9b6 | |||
7b8cdfc19d | |||
9fe7b5307a |
1
.github/labeler.yml
vendored
1
.github/labeler.yml
vendored
@ -22,7 +22,6 @@ keymap:
|
||||
via:
|
||||
- keyboards/**/keymaps/via/*
|
||||
cli:
|
||||
- bin/qmk
|
||||
- requirements.txt
|
||||
- lib/python/**/*
|
||||
python:
|
||||
|
1
.github/workflows/cli.yml
vendored
1
.github/workflows/cli.yml
vendored
@ -8,7 +8,6 @@ on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'lib/python/**'
|
||||
- 'bin/qmk'
|
||||
- 'requirements.txt'
|
||||
- '.github/workflows/cli.yml'
|
||||
|
||||
|
6
Makefile
6
Makefile
@ -30,11 +30,7 @@ endif
|
||||
endif
|
||||
|
||||
# Determine which qmk cli to use
|
||||
ifeq (,$(shell which qmk))
|
||||
QMK_BIN = bin/qmk
|
||||
else
|
||||
QMK_BIN = qmk
|
||||
endif
|
||||
QMK_BIN := qmk
|
||||
|
||||
# avoid 'Entering|Leaving directory' messages
|
||||
MAKEFLAGS += --no-print-directory
|
||||
|
58
bin/qmk
58
bin/qmk
@ -1,58 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
"""CLI wrapper for running QMK commands.
|
||||
"""
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
# Add the QMK python libs to our path
|
||||
script_dir = Path(os.path.realpath(__file__)).parent
|
||||
qmk_dir = script_dir.parent
|
||||
python_lib_dir = Path(qmk_dir / 'lib' / 'python').resolve()
|
||||
sys.path.append(str(python_lib_dir))
|
||||
|
||||
# Setup the CLI
|
||||
import milc # noqa
|
||||
|
||||
milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}Ψ{style_reset_all}'
|
||||
|
||||
|
||||
@milc.cli.entrypoint('QMK Helper Script')
|
||||
def qmk_main(cli):
|
||||
"""The function that gets run when no subcommand is provided.
|
||||
"""
|
||||
cli.print_help()
|
||||
|
||||
|
||||
def main():
|
||||
"""Setup our environment and then call the CLI entrypoint.
|
||||
"""
|
||||
# Change to the root of our checkout
|
||||
os.environ['ORIG_CWD'] = os.getcwd()
|
||||
os.environ['DEPRECATED_BIN_QMK'] = '1'
|
||||
os.chdir(qmk_dir)
|
||||
|
||||
print('Warning: The bin/qmk script is being deprecated. Please install the QMK CLI: python3 -m pip install qmk', file=sys.stderr)
|
||||
|
||||
# Import the subcommands
|
||||
import milc.subcommand.config # noqa
|
||||
import qmk.cli # noqa
|
||||
|
||||
# Execute
|
||||
return_code = milc.cli()
|
||||
|
||||
if return_code is False:
|
||||
exit(1)
|
||||
|
||||
elif return_code is not True and isinstance(return_code, int):
|
||||
if return_code < 0 or return_code > 255:
|
||||
milc.cli.log.error('Invalid return_code: %d', return_code)
|
||||
exit(255)
|
||||
|
||||
exit(return_code)
|
||||
|
||||
exit(0)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
@ -115,6 +115,7 @@ include $(INFO_RULES_MK)
|
||||
# Check for keymap.json first, so we can regenerate keymap.c
|
||||
include build_json.mk
|
||||
|
||||
# Pull in keymap level rules.mk
|
||||
ifeq ("$(wildcard $(KEYMAP_PATH))", "")
|
||||
# Look through the possible keymap folders until we find a matching keymap.c
|
||||
ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.c)","")
|
||||
@ -345,6 +346,7 @@ ifeq ("$(USER_NAME)","")
|
||||
endif
|
||||
USER_PATH := users/$(USER_NAME)
|
||||
|
||||
# Pull in user level rules.mk
|
||||
-include $(USER_PATH)/rules.mk
|
||||
ifneq ("$(wildcard $(USER_PATH)/config.h)","")
|
||||
CONFIG_H += $(USER_PATH)/config.h
|
||||
@ -356,6 +358,23 @@ endif
|
||||
# Disable features that a keyboard doesn't support
|
||||
-include disable_features.mk
|
||||
|
||||
# Pull in post_rules.mk files from all our subfolders
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_1)/post_rules.mk)","")
|
||||
include $(KEYBOARD_PATH_1)/post_rules.mk
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_2)/post_rules.mk)","")
|
||||
include $(KEYBOARD_PATH_2)/post_rules.mk
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_3)/post_rules.mk)","")
|
||||
include $(KEYBOARD_PATH_3)/post_rules.mk
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_4)/post_rules.mk)","")
|
||||
include $(KEYBOARD_PATH_4)/post_rules.mk
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_5)/post_rules.mk)","")
|
||||
include $(KEYBOARD_PATH_5)/post_rules.mk
|
||||
endif
|
||||
|
||||
ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","")
|
||||
CONFIG_H += $(KEYMAP_PATH)/config.h
|
||||
endif
|
||||
|
@ -698,19 +698,23 @@ ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes)
|
||||
endif
|
||||
|
||||
JOYSTICK_ENABLE ?= no
|
||||
ifneq ($(strip $(JOYSTICK_ENABLE)), no)
|
||||
VALID_JOYSTICK_TYPES := analog digital
|
||||
JOYSTICK_DRIVER ?= analog
|
||||
ifeq ($(strip $(JOYSTICK_ENABLE)), yes)
|
||||
ifeq ($(filter $(JOYSTICK_DRIVER),$(VALID_JOYSTICK_TYPES)),)
|
||||
$(error "$(JOYSTICK_DRIVER)" is not a valid joystick driver)
|
||||
endif
|
||||
OPT_DEFS += -DJOYSTICK_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_joystick.c
|
||||
SRC += $(QUANTUM_DIR)/joystick.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(JOYSTICK_ENABLE)), analog)
|
||||
OPT_DEFS += -DANALOG_JOYSTICK_ENABLE
|
||||
SRC += analog.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(JOYSTICK_ENABLE)), digital)
|
||||
OPT_DEFS += -DDIGITAL_JOYSTICK_ENABLE
|
||||
ifeq ($(strip $(JOYSTICK_DRIVER)), analog)
|
||||
OPT_DEFS += -DANALOG_JOYSTICK_ENABLE
|
||||
SRC += analog.c
|
||||
endif
|
||||
ifeq ($(strip $(JOYSTICK_DRIVER)), digital)
|
||||
OPT_DEFS += -DDIGITAL_JOYSTICK_ENABLE
|
||||
endif
|
||||
endif
|
||||
|
||||
DIGITIZER_ENABLE ?= no
|
||||
|
@ -12,6 +12,12 @@
|
||||
"minLength": 1,
|
||||
"pattern": "^[0-9a-z_]*$"
|
||||
},
|
||||
"keycode": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 250,
|
||||
"pattern": "^[A-Z_][0-9A-Z_()]*$"
|
||||
},
|
||||
"hex_number_2d": {
|
||||
"type": "string",
|
||||
"pattern": "^0x[0-9A-F]{2}$"
|
||||
|
@ -77,6 +77,10 @@
|
||||
"lto": {"type": "boolean"},
|
||||
}
|
||||
},
|
||||
"custom_keycodes": {
|
||||
"type": "array",
|
||||
"items": {"$ref": "qmk.definitions.v1#/keycode"}
|
||||
},
|
||||
"diode_direction": {
|
||||
"type": "string",
|
||||
"enum": ["COL2ROW", "ROW2COL"]
|
||||
|
@ -5,6 +5,11 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"author": {"type": "string"},
|
||||
"config": {"$ref": "qmk.keyboard.v1"},
|
||||
"custom_keycodes": {
|
||||
"type": "array",
|
||||
"items": {"$ref": "qmk.definitions.v1#/keycode"}
|
||||
},
|
||||
"keyboard": {"$ref": "qmk.definitions.v1#/text_identifier"},
|
||||
"keymap": {"$ref": "qmk.definitions.v1#/text_identifier"},
|
||||
"layout": {"$ref": "qmk.definitions.v1#/layout_macro"},
|
||||
@ -12,13 +17,12 @@
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {"type": "string"}
|
||||
"items": {"$ref": "qmk.definitions.v1#/keycode"}
|
||||
}
|
||||
},
|
||||
"config": {"$ref": "qmk.keyboard.v1"},
|
||||
"notes": {
|
||||
"type": "string",
|
||||
"description": "asdf"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -118,54 +118,6 @@ This command lets you configure the behavior of QMK. For the full `qmk config` d
|
||||
qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN]
|
||||
```
|
||||
|
||||
## `qmk console`
|
||||
|
||||
This command lets you connect to keyboard consoles to get debugging messages. It only works if your keyboard firmware has been compiled with `CONSOLE_ENABLE=yes`.
|
||||
|
||||
**Usage**:
|
||||
|
||||
```
|
||||
qmk console [-d <pid>:<vid>[:<index>]] [-l] [-n] [-t] [-w <seconds>]
|
||||
```
|
||||
|
||||
**Examples**:
|
||||
|
||||
Connect to all available keyboards and show their console messages:
|
||||
|
||||
```
|
||||
qmk console
|
||||
```
|
||||
|
||||
List all devices:
|
||||
|
||||
```
|
||||
qmk console -l
|
||||
```
|
||||
|
||||
Show only messages from clueboard/66/rev3 keyboards:
|
||||
|
||||
```
|
||||
qmk console -d C1ED:2370
|
||||
```
|
||||
|
||||
Show only messages from the second clueboard/66/rev3:
|
||||
|
||||
```
|
||||
qmk console -d C1ED:2370:2
|
||||
```
|
||||
|
||||
Show timestamps and VID:PID instead of names:
|
||||
|
||||
```
|
||||
qmk console -n -t
|
||||
```
|
||||
|
||||
Disable bootloader messages:
|
||||
|
||||
```
|
||||
qmk console --no-bootloaders
|
||||
```
|
||||
|
||||
## `qmk doctor`
|
||||
|
||||
This command examines your environment and alerts you to potential build or flash problems. It can fix many of them if you want it to.
|
||||
|
@ -105,7 +105,7 @@ enum my_keycodes {
|
||||
|
||||
Before opening a pull request, you can preview your changes if you have set up the development environment by running this command from the `qmk_firmware/` folder:
|
||||
|
||||
./bin/qmk docs
|
||||
qmk docs
|
||||
|
||||
or if you only have Python 3 installed:
|
||||
|
||||
|
@ -51,25 +51,6 @@ Wir suchen nach Freiwilligen, die ein `qmk`-Package für weitere Betriebssysteme
|
||||
* Installiere mit einem [virtualenv](https://virtualenv.pypa.io/en/latest/).
|
||||
* Weise den User an, die Umgebungs-Variable `QMK_HOME` zu setzen, um die Firmware-Quelle anders einzustellen als `~/qmk_firmware`.
|
||||
|
||||
# Lokale CLI
|
||||
|
||||
Wenn Du die globale CLI nicht verwenden möchtest, beinhaltet `qmk_firmware` auch eine lokale CLI. Du kannst sie hier finden: `qmk_firmware/bin/qmk`. Du kannst den `qmk`-Befehl aus irgendeinem Datei-Verzeichnis ausführen und es wird immer auf dieser Kopie von `qmk_firmware` arbeiten.
|
||||
|
||||
**Beispiel**:
|
||||
|
||||
```
|
||||
$ ~/qmk_firmware/bin/qmk hello
|
||||
Ψ Hello, World!
|
||||
```
|
||||
|
||||
## Einschränkungen der lokalen CLI
|
||||
|
||||
Hier ein Vergleich mit der globalen CLI:
|
||||
|
||||
* Die lokale CLI unterstützt kein `qmk setup` oder `qmk clone`.
|
||||
* Die lokale CLI arbeitet immer innerhalb der selben `qmk_firmware`-Verzeichnisstruktur, auch wenn Du mehrere Repositories geklont hast.
|
||||
* Die lokale CLI läuft nicht in einer virtualenv. Daher ist es möglich, dass Abhängigkeiten (dependencies) miteinander in Konflikt kommen/stehen.
|
||||
|
||||
# CLI-Befehle
|
||||
|
||||
## `qmk compile`
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
The keyboard can be made to be recognized as a joystick HID device by the operating system.
|
||||
|
||||
This is enabled by adding `JOYSTICK_ENABLE` to `rules.mk`. You can set this value to `analog`, `digital`, or `no`.
|
||||
|
||||
!> Joystick support is not currently available on V-USB devices.
|
||||
|
||||
The joystick feature provides two services:
|
||||
@ -18,7 +16,8 @@ or send gamepad reports based on values computed by the keyboard.
|
||||
To use analog input you must first enable it in `rules.mk`:
|
||||
|
||||
```makefile
|
||||
JOYSTICK_ENABLE = analog
|
||||
JOYSTICK_ENABLE = yes
|
||||
JOYSTICK_DRIVER = analog # or 'digital'
|
||||
```
|
||||
|
||||
An analog device such as a potentiometer found on a gamepad's analog axes is based on a [voltage divider](https://en.wikipedia.org/wiki/Voltage_divider).
|
||||
|
@ -48,25 +48,6 @@ Nous recherchons des gens pour créer et maintenir un paquet `qmk` pour plus de
|
||||
* Installez en utilisant un virtualenv
|
||||
* Expliquez à l'utilisateur de définir la variable d'environnement `QMK_Home` pour "check out" les sources du firmware à un autre endroit que `~/qmk_firmware`.
|
||||
|
||||
# CLI locale
|
||||
|
||||
Si vous ne voulez pas utiliser la CLI globale, il y a une CLI locale empaquetée avec `qmk_firmware`. Vous pouvez le trouver dans `qmk_firmware/bin/qmk`. Vous pouvez lancer la commande `qmk` depuis n'importe quel répertoire et elle fonctionnera toujours sur cette copie de `qmk_firmware`.
|
||||
|
||||
**Exemple**:
|
||||
|
||||
```
|
||||
$ ~/qmk_firmware/bin/qmk hello
|
||||
Ψ Hello, World!
|
||||
```
|
||||
|
||||
## Limitations de la CLI locale
|
||||
|
||||
Il y a quelques limitations à la CLI locale comparé à la globale:
|
||||
|
||||
* La CLI locale ne supporte pas `qmk setup` ou `qmk clone`
|
||||
* La CLI locale n'opère pas sur le même arbre `qmk_firmware`, même si vous avez plusieurs dépôts clonés.
|
||||
* La CLI locale ne s'exécute pas dans un virtualenv, donc il y a des risques que des dépendances seront en conflit
|
||||
|
||||
# Les commandes CLI
|
||||
|
||||
## `qmk compile`
|
||||
|
@ -144,10 +144,38 @@ The `rules.mk` file can also be placed in a sub-folder, and its reading order is
|
||||
* `keyboards/top_folder/sub_1/sub_2/sub_3/sub_4/rules.mk`
|
||||
* `keyboards/top_folder/keymaps/a_keymap/rules.mk`
|
||||
* `users/a_user_folder/rules.mk`
|
||||
* `keyboards/top_folder/sub_1/sub_2/sub_3/sub_4/post_rules.mk`
|
||||
* `keyboards/top_folder/sub_1/sub_2/sub_3/post_rules.mk`
|
||||
* `keyboards/top_folder/sub_1/sub_2/post_rules.mk`
|
||||
* `keyboards/top_folder/sub_1/post_rules.mk`
|
||||
* `keyboards/top_folder/post_rules.mk`
|
||||
* `common_features.mk`
|
||||
|
||||
Many of the settings written in the `rules.mk` file are interpreted by `common_features.mk`, which sets the necessary source files and compiler options.
|
||||
|
||||
The `post_rules.mk` file can interpret `features` of a keyboard-level before `common_features.mk`. For example, when your designed keyboard has the option to implement backlighting or underglow using rgblight.c, writing the following in the `post_rules.mk` makes it easier for the user to configure the `rules.mk`.
|
||||
|
||||
* `keyboards/top_folder/keymaps/a_keymap/rules.mk`
|
||||
```makefile
|
||||
# Please set the following according to the selection of the hardware implementation option.
|
||||
RGBLED_OPTION_TYPE = backlight ## none, backlight or underglow
|
||||
```
|
||||
* `keyboards/top_folder/post_rules.mk`
|
||||
```makefile
|
||||
ifeq ($(filter $(strip $(RGBLED_OPTION_TYPE))x, nonex backlightx underglowx x),)
|
||||
$(error unknown RGBLED_OPTION_TYPE value "$(RGBLED_OPTION_TYPE)")
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGBLED_OPTION_TYPE)),backlight)
|
||||
RGBLIGHT_ENABLE = yes
|
||||
OPT_DEFS += -DRGBLED_NUM=30
|
||||
endif
|
||||
ifeq ($(strip $(RGBLED_OPTION_TYPE)),underglow)
|
||||
RGBLIGHT_ENABLE = yes
|
||||
OPT_DEFS += -DRGBLED_NUM=6
|
||||
endif
|
||||
```
|
||||
|
||||
?> See `build_keyboard.mk` and `common_features.mk` for more details.
|
||||
|
||||
### `<keyboard_name.c>`
|
||||
|
17
keyboards/0xc7/61key/61key.c
Normal file
17
keyboards/0xc7/61key/61key.c
Normal file
@ -0,0 +1,17 @@
|
||||
/* Copyright 2021 0xC7
|
||||
*
|
||||
* 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 "61key.h"
|
43
keyboards/0xc7/61key/61key.h
Normal file
43
keyboards/0xc7/61key/61key.h
Normal file
@ -0,0 +1,43 @@
|
||||
/* Copyright 2021 0xC7
|
||||
*
|
||||
* 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 KC_NOt, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define ___ KC_NO
|
||||
|
||||
/* This is a shortcut to help you visually see your layout.
|
||||
*
|
||||
* The first section contains all of the arguments representing the physical
|
||||
* layout of the board and position of the keys.
|
||||
*
|
||||
* The second converts the arguments into a two-dimensional array which
|
||||
* represents the switch matrix.
|
||||
*/
|
||||
#define LAYOUT( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3D, \
|
||||
K40, K41, K42, K45, K48, K49, K4B, K4D \
|
||||
) { \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, ___, K2D }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, ___, ___, K3D }, \
|
||||
{ K40, K41, K42, ___, ___, K45, ___, ___, K48, K49, ___, K4B, ___, K4D } \
|
||||
}
|
152
keyboards/0xc7/61key/config.h
Normal file
152
keyboards/0xc7/61key/config.h
Normal file
@ -0,0 +1,152 @@
|
||||
/*
|
||||
Copyright 2021 0xC7
|
||||
|
||||
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 "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xE117
|
||||
#define PRODUCT_ID 0x6161
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER 0xC7
|
||||
#define PRODUCT 61Key
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 14
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
* Change this to how you wired your keyboard
|
||||
* COLS: AVR pins used for columns, left to right
|
||||
* ROWS: AVR pins used for rows, top to bottom
|
||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||
*
|
||||
*/
|
||||
#define MATRIX_ROW_PINS { B0, B1, B2, B3, B7 }
|
||||
#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, F7, F6, F5, F4, F1, F0 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/*
|
||||
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
||||
*/
|
||||
#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
|
||||
|
||||
//#define LED_NUM_LOCK_PIN B0
|
||||
//#define LED_CAPS_LOCK_PIN B1
|
||||
//#define LED_SCROLL_LOCK_PIN B2
|
||||
//#define LED_COMPOSE_PIN B3
|
||||
//#define LED_KANA_PIN B4
|
||||
|
||||
//#define BACKLIGHT_PIN B7
|
||||
//#define BACKLIGHT_LEVELS 3
|
||||
//#define BACKLIGHT_BREATHING
|
||||
|
||||
//#define RGB_DI_PIN E2
|
||||
//#ifdef RGB_DI_PIN
|
||||
//# define RGBLED_NUM 16
|
||||
//# define RGBLIGHT_HUE_STEP 8
|
||||
//# define RGBLIGHT_SAT_STEP 8
|
||||
//# define RGBLIGHT_VAL_STEP 8
|
||||
//# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
||||
//# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||
/*== all animations enable ==*/
|
||||
//# define RGBLIGHT_ANIMATIONS
|
||||
/*== or choose animations ==*/
|
||||
//# define RGBLIGHT_EFFECT_BREATHING
|
||||
//# define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
//# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
//# define RGBLIGHT_EFFECT_SNAKE
|
||||
//# define RGBLIGHT_EFFECT_KNIGHT
|
||||
//# define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
//# define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
//# define RGBLIGHT_EFFECT_RGB_TEST
|
||||
//# define RGBLIGHT_EFFECT_ALTERNATING
|
||||
/*== customize breathing effect ==*/
|
||||
/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
|
||||
//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
|
||||
/*==== use exp() and sin() ====*/
|
||||
//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
|
||||
//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
|
||||
//#endif
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||
* This is useful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||
*/
|
||||
//#define GRAVE_ESC_CTRL_OVERRIDE
|
||||
|
||||
/*
|
||||
* Force NKRO
|
||||
*
|
||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||
* makefile for this to work.)
|
||||
*
|
||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||
* until the next keyboard reset.
|
||||
*
|
||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||
* fully operational during normal computer usage.
|
||||
*
|
||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||
* power-up.
|
||||
*
|
||||
*/
|
||||
//#define FORCE_NKRO
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/* Bootmagic Lite key configuration */
|
||||
//#define BOOTMAGIC_LITE_ROW 0
|
||||
//#define BOOTMAGIC_LITE_COLUMN 0
|
76
keyboards/0xc7/61key/info.json
Normal file
76
keyboards/0xc7/61key/info.json
Normal file
@ -0,0 +1,76 @@
|
||||
{
|
||||
"keyboard_name": "61Key",
|
||||
"url": "",
|
||||
"maintainer": "0xC7",
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"x": 0, "y": 0},
|
||||
{"x": 1, "y": 0},
|
||||
{"x": 2, "y": 0},
|
||||
{"x": 3, "y": 0},
|
||||
{"x": 4, "y": 0},
|
||||
{"x": 5, "y": 0},
|
||||
{"x": 6, "y": 0},
|
||||
{"x": 7, "y": 0},
|
||||
{"x": 8, "y": 0},
|
||||
{"x": 9, "y": 0},
|
||||
{"x": 10, "y": 0},
|
||||
{"x": 11, "y": 0},
|
||||
{"x": 12, "y": 0},
|
||||
{"x": 13, "y": 0},
|
||||
|
||||
{"x": 0, "y": 1, "w": 1.5},
|
||||
{"x": 1.5, "y": 1},
|
||||
{"x": 2.5, "y": 1},
|
||||
{"x": 3.5, "y": 1},
|
||||
{"x": 4.5, "y": 1},
|
||||
{"x": 5.5, "y": 1},
|
||||
{"x": 6.5, "y": 1},
|
||||
{"x": 7.5, "y": 1},
|
||||
{"x": 8.5, "y": 1},
|
||||
{"x": 9.5, "y": 1},
|
||||
{"x": 10.5, "y": 1},
|
||||
{"x": 11.5, "y": 1},
|
||||
{"x": 12.5, "y": 1},
|
||||
{"x": 13.5, "y": 1, "w": 1.5},
|
||||
|
||||
{"x": 0, "y": 2, "w": 1.75},
|
||||
{"x": 1.75, "y": 2},
|
||||
{"x": 2.75, "y": 2},
|
||||
{"x": 3.75, "y": 2},
|
||||
{"x": 4.75, "y": 2},
|
||||
{"x": 5.75, "y": 2},
|
||||
{"x": 6.75, "y": 2},
|
||||
{"x": 7.75, "y": 2},
|
||||
{"x": 8.75, "y": 2},
|
||||
{"x": 9.75, "y": 2},
|
||||
{"x": 10.75, "y": 2},
|
||||
{"x": 11.75, "y": 2},
|
||||
{"x": 12.75, "y": 2, "w": 1.25},
|
||||
|
||||
{"x": 0, "y": 3, "w": 1.25},
|
||||
{"x": 1.25, "y": 3},
|
||||
{"x": 2.25, "y": 3},
|
||||
{"x": 3.25, "y": 3},
|
||||
{"x": 4.25, "y": 3},
|
||||
{"x": 5.25, "y": 3},
|
||||
{"x": 6.25, "y": 3},
|
||||
{"x": 7.25, "y": 3},
|
||||
{"x": 8.25, "y": 3},
|
||||
{"x": 9.25, "y": 3},
|
||||
{"x": 10.25, "y": 3},
|
||||
{"x": 11.25, "y": 3, "w": 1.75},
|
||||
|
||||
{"x": 0, "y": 4, "w": 1.25},
|
||||
{"x": 1.25, "y": 4, "w": 1.25},
|
||||
{"x": 2.5, "y": 4, "w": 1.25},
|
||||
{"x": 3.75, "y": 4, "w": 6.25},
|
||||
{"x": 10, "y": 4, "w": 1.25},
|
||||
{"x": 11.25, "y": 4, "w": 1.25},
|
||||
{"x": 12.5, "y": 4, "w": 1.25},
|
||||
{"x": 13.75, "y": 4, "w": 1.25}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
34
keyboards/0xc7/61key/keymaps/default/keymap.c
Normal file
34
keyboards/0xc7/61key/keymaps/default/keymap.c
Normal file
@ -0,0 +1,34 @@
|
||||
/* Copyright 2021 0xC7
|
||||
*
|
||||
* 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_GESC, 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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL
|
||||
),
|
||||
[1] = LAYOUT(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,
|
||||
KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_END, KC_PGDN, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_LOCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, C(A(KC_DEL))
|
||||
)
|
||||
};
|
48
keyboards/0xc7/61key/keymaps/via/keymap.c
Normal file
48
keyboards/0xc7/61key/keymaps/via/keymap.c
Normal file
@ -0,0 +1,48 @@
|
||||
/* Copyright 2021 0xC7
|
||||
*
|
||||
* 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_GESC, 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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL
|
||||
),
|
||||
[1] = LAYOUT(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,
|
||||
KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_END, KC_PGDN, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_LOCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, C(A(KC_DEL))
|
||||
),
|
||||
[2] = LAYOUT(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
[3] = LAYOUT(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
)
|
||||
};
|
1
keyboards/0xc7/61key/keymaps/via/rules.mk
Normal file
1
keyboards/0xc7/61key/keymaps/via/rules.mk
Normal file
@ -0,0 +1 @@
|
||||
VIA_ENABLE = yes
|
27
keyboards/0xc7/61key/readme.md
Normal file
27
keyboards/0xc7/61key/readme.md
Normal file
@ -0,0 +1,27 @@
|
||||
# 61Key
|
||||
|
||||

|
||||
|
||||
Custom keyboard designed by RealEmanGaming aka 0xC7
|
||||
|
||||
* Keyboard Maintainer: [0xC7](https://github.com/RealEmanGaming)
|
||||
* Hardware Supported: ATMega32u4
|
||||
* Hardware Availability: N/A (private board, might open source)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make 61key:default
|
||||
|
||||
Flashing example for this keyboard:
|
||||
|
||||
make 61key: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 `RESET` if it is available
|
25
keyboards/0xc7/61key/rules.mk
Normal file
25
keyboards/0xc7/61key/rules.mk
Normal file
@ -0,0 +1,25 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = no # Mouse keys
|
||||
EXTRAKEY_ENABLE = no # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||
AUDIO_ENABLE = no # Audio output
|
||||
|
||||
LTO_ENABLE = yes
|
||||
KEY_LOCK_ENABLE = yes
|
@ -34,9 +34,7 @@ extern i2c_status_t tca9555_status;
|
||||
// All address pins of the tca9555 are connected to the ground
|
||||
// | 0 | 1 | 0 | 0 | A2 | A1 | A0 |
|
||||
// | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
|
||||
#define I2C_ADDR 0b0100000
|
||||
#define I2C_ADDR_WRITE ((I2C_ADDR << 1) | I2C_WRITE)
|
||||
#define I2C_ADDR_READ ((I2C_ADDR << 1) | I2C_READ)
|
||||
#define I2C_ADDR (0b0100000 << 1)
|
||||
|
||||
// Register addresses
|
||||
#define IODIRA 0x06 // i/o direction register
|
||||
@ -64,19 +62,14 @@ uint8_t init_tca9555(void) {
|
||||
// - unused : input : 1
|
||||
// - input : input : 1
|
||||
// - driving : output : 0
|
||||
tca9555_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT);
|
||||
if (tca9555_status) goto out;
|
||||
tca9555_status = i2c_write(IODIRA, I2C_TIMEOUT);
|
||||
if (tca9555_status) goto out;
|
||||
// This means: write on pin 5 of port 0, read on rest
|
||||
tca9555_status = i2c_write(0b11011111, I2C_TIMEOUT);
|
||||
if (tca9555_status) goto out;
|
||||
// This means: we will write on pins 0 to 2 on port 1. read rest
|
||||
tca9555_status = i2c_write(0b11111000, I2C_TIMEOUT);
|
||||
if (tca9555_status) goto out;
|
||||
uint8_t conf[2] = {
|
||||
// This means: write on pin 5 of port 0, read on rest
|
||||
0b11011111,
|
||||
// This means: we will write on pins 0 to 2 on port 1. read rest
|
||||
0b11111000,
|
||||
};
|
||||
tca9555_status = i2c_writeReg(I2C_ADDR, IODIRA, conf, 2, I2C_TIMEOUT);
|
||||
|
||||
out:
|
||||
i2c_stop();
|
||||
return tca9555_status;
|
||||
}
|
||||
|
||||
@ -192,36 +185,29 @@ static matrix_row_t read_cols(uint8_t row) {
|
||||
if (tca9555_status) { // if there was an error
|
||||
return 0;
|
||||
} else {
|
||||
uint8_t data = 0;
|
||||
uint8_t port0 = 0;
|
||||
uint8_t port1 = 0;
|
||||
tca9555_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT);
|
||||
if (tca9555_status) goto out;
|
||||
tca9555_status = i2c_write(IREGP0, I2C_TIMEOUT);
|
||||
if (tca9555_status) goto out;
|
||||
tca9555_status = i2c_start(I2C_ADDR_READ, I2C_TIMEOUT);
|
||||
if (tca9555_status) goto out;
|
||||
tca9555_status = i2c_read_ack(I2C_TIMEOUT);
|
||||
if (tca9555_status < 0) goto out;
|
||||
port0 = (uint8_t)tca9555_status;
|
||||
tca9555_status = i2c_read_nack(I2C_TIMEOUT);
|
||||
if (tca9555_status < 0) goto out;
|
||||
port1 = (uint8_t)tca9555_status;
|
||||
uint8_t data = 0;
|
||||
uint8_t ports[2] = {0};
|
||||
tca9555_status = i2c_readReg(I2C_ADDR, IREGP0, ports, 2, I2C_TIMEOUT);
|
||||
if (tca9555_status) { // if there was an error
|
||||
// do nothing
|
||||
return 0;
|
||||
} else {
|
||||
uint8_t port0 = ports[0];
|
||||
uint8_t port1 = ports[1];
|
||||
|
||||
// The initial state was all ones and any depressed key at a given column for the currently selected row will have its bit flipped to zero.
|
||||
// The return value is a row as represented in the generic matrix code were the rightmost bits represent the lower columns and zeroes represent non-depressed keys while ones represent depressed keys.
|
||||
// Since the pins are not ordered sequentially, we have to build the correct dataset from the two ports. Refer to the schematic to see where every pin is connected.
|
||||
data |= ( port0 & 0x01 );
|
||||
data |= ( port0 & 0x02 );
|
||||
data |= ( port1 & 0x10 ) >> 2;
|
||||
data |= ( port1 & 0x08 );
|
||||
data |= ( port0 & 0x40 ) >> 2;
|
||||
data = ~(data);
|
||||
// The initial state was all ones and any depressed key at a given column for the currently selected row will have its bit flipped to zero.
|
||||
// The return value is a row as represented in the generic matrix code were the rightmost bits represent the lower columns and zeroes represent non-depressed keys while ones represent depressed keys.
|
||||
// Since the pins are not ordered sequentially, we have to build the correct dataset from the two ports. Refer to the schematic to see where every pin is connected.
|
||||
data |= ( port0 & 0x01 );
|
||||
data |= ( port0 & 0x02 );
|
||||
data |= ( port1 & 0x10 ) >> 2;
|
||||
data |= ( port1 & 0x08 );
|
||||
data |= ( port0 & 0x40 ) >> 2;
|
||||
data = ~(data);
|
||||
|
||||
tca9555_status = I2C_STATUS_SUCCESS;
|
||||
out:
|
||||
i2c_stop();
|
||||
return data;
|
||||
tca9555_status = I2C_STATUS_SUCCESS;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -263,18 +249,10 @@ static void select_row(uint8_t row) {
|
||||
default: break;
|
||||
}
|
||||
|
||||
tca9555_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT);
|
||||
if (tca9555_status) goto out;
|
||||
tca9555_status = i2c_write(OREGP0, I2C_TIMEOUT);
|
||||
if (tca9555_status) goto out;
|
||||
tca9555_status = i2c_write(port0, I2C_TIMEOUT);
|
||||
if (tca9555_status) goto out;
|
||||
tca9555_status = i2c_write(port1, I2C_TIMEOUT);
|
||||
if (tca9555_status) goto out;
|
||||
uint8_t ports[2] = {port0, port1};
|
||||
tca9555_status = i2c_writeReg(I2C_ADDR, OREGP0, ports, 2, I2C_TIMEOUT);
|
||||
// Select the desired row by writing a byte for the entire GPIOB bus where only the bit representing the row we want to select is a zero (write instruction) and every other bit is a one.
|
||||
// Note that the row - MATRIX_ROWS_PER_SIDE reflects the fact that being on the right hand, the columns are numbered from MATRIX_ROWS_PER_SIDE to MATRIX_ROWS, but the pins we want to write to are indexed from zero up on the GPIOB bus.
|
||||
out:
|
||||
i2c_stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -34,9 +34,7 @@ extern i2c_status_t tca9555_status;
|
||||
// All address pins of the tca9555 are connected to the ground
|
||||
// | 0 | 1 | 0 | 0 | A2 | A1 | A0 |
|
||||
// | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
|
||||
#define I2C_ADDR 0b0100000
|
||||
#define I2C_ADDR_WRITE ((I2C_ADDR << 1) | I2C_WRITE)
|
||||
#define I2C_ADDR_READ ((I2C_ADDR << 1) | I2C_READ)
|
||||
#define I2C_ADDR (0b0100000 << 1)
|
||||
|
||||
// Register addresses
|
||||
#define IODIRA 0x06 // i/o direction register
|
||||
@ -64,19 +62,14 @@ uint8_t init_tca9555(void) {
|
||||
// - unused : input : 1
|
||||
// - input : input : 1
|
||||
// - driving : output : 0
|
||||
tca9555_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT);
|
||||
if (tca9555_status) goto out;
|
||||
tca9555_status = i2c_write(IODIRA, I2C_TIMEOUT);
|
||||
if (tca9555_status) goto out;
|
||||
// This means: read all pins of port 0
|
||||
tca9555_status = i2c_write(0b11111111, I2C_TIMEOUT);
|
||||
if (tca9555_status) goto out;
|
||||
// This means: we will write on pins 0 to 3 on port 1. read rest
|
||||
tca9555_status = i2c_write(0b11110000, I2C_TIMEOUT);
|
||||
if (tca9555_status) goto out;
|
||||
uint8_t conf[2] = {
|
||||
// This means: read all pins of port 0
|
||||
0b11111111,
|
||||
// This means: we will write on pins 0 to 3 on port 1. read rest
|
||||
0b11110000,
|
||||
};
|
||||
tca9555_status = i2c_writeReg(I2C_ADDR, IODIRA, conf, 2, I2C_TIMEOUT);
|
||||
|
||||
out:
|
||||
i2c_stop();
|
||||
return tca9555_status;
|
||||
}
|
||||
|
||||
@ -194,32 +187,25 @@ static matrix_row_t read_cols(uint8_t row) {
|
||||
} else {
|
||||
uint8_t data = 0;
|
||||
uint8_t port0 = 0;
|
||||
tca9555_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT);
|
||||
if (tca9555_status) goto out;
|
||||
tca9555_status = i2c_write(IREGP0, I2C_TIMEOUT);
|
||||
if (tca9555_status) goto out;
|
||||
tca9555_status = i2c_start(I2C_ADDR_READ, I2C_TIMEOUT);
|
||||
if (tca9555_status) goto out;
|
||||
tca9555_status = i2c_read_nack(I2C_TIMEOUT);
|
||||
if (tca9555_status < 0) goto out;
|
||||
|
||||
port0 = ~(uint8_t)tca9555_status;
|
||||
tca9555_status = i2c_readReg(I2C_ADDR, IREGP0, &port0, 1, I2C_TIMEOUT);
|
||||
if (tca9555_status) { // if there was an error
|
||||
// do nothing
|
||||
return 0;
|
||||
} else {
|
||||
port0 = ~port0;
|
||||
// We read all the pins on GPIOA.
|
||||
// The initial state was all ones and any depressed key at a given column for the currently selected row will have its bit flipped to zero.
|
||||
// The return value is a row as represented in the generic matrix code were the rightmost bits represent the lower columns and zeroes represent non-depressed keys while ones represent depressed keys.
|
||||
// the pins connected to eact columns are sequential, but in reverse order, and counting from zero down (col 5 -> GPIO04, col6 -> GPIO03 and so on).
|
||||
data |= (port0 & 0x01) << 4;
|
||||
data |= (port0 & 0x02) << 2;
|
||||
data |= (port0 & 0x04);
|
||||
data |= (port0 & 0x08) >> 2;
|
||||
data |= (port0 & 0x10) >> 4;
|
||||
|
||||
// We read all the pins on GPIOA.
|
||||
// The initial state was all ones and any depressed key at a given column for the currently selected row will have its bit flipped to zero.
|
||||
// The return value is a row as represented in the generic matrix code were the rightmost bits represent the lower columns and zeroes represent non-depressed keys while ones represent depressed keys.
|
||||
// the pins connected to eact columns are sequential, but in reverse order, and counting from zero down (col 5 -> GPIO04, col6 -> GPIO03 and so on).
|
||||
data |= ( port0 & 0x01 ) << 4;
|
||||
data |= ( port0 & 0x02 ) << 2;
|
||||
data |= ( port0 & 0x04 );
|
||||
data |= ( port0 & 0x08 ) >> 2;
|
||||
data |= ( port0 & 0x10 ) >> 4;
|
||||
|
||||
tca9555_status = I2C_STATUS_SUCCESS;
|
||||
out:
|
||||
i2c_stop();
|
||||
|
||||
return data;
|
||||
tca9555_status = I2C_STATUS_SUCCESS;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -256,20 +242,15 @@ static void select_row(uint8_t row) {
|
||||
case 4: port1 &= ~(1 << 0); break;
|
||||
case 5: port1 &= ~(1 << 1); break;
|
||||
case 6: port1 &= ~(1 << 2); break;
|
||||
case 7: port1 &= ~(1 << 3); break;
|
||||
case 7:
|
||||
port1 &= ~(1 << 3);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
tca9555_status = i2c_writeReg(I2C_ADDR, OREGP1, &port1, 1, I2C_TIMEOUT);
|
||||
// Select the desired row by writing a byte for the entire GPIOB bus where only the bit representing the row we want to select is a zero (write instruction) and every other bit is a one.
|
||||
// Note that the row - MATRIX_ROWS_PER_SIDE reflects the fact that being on the right hand, the columns are numbered from MATRIX_ROWS_PER_SIDE to MATRIX_ROWS, but the pins we want to write to are indexed from zero up on the GPIOB bus.
|
||||
tca9555_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT);
|
||||
if (tca9555_status) goto out;
|
||||
tca9555_status = i2c_write(OREGP1, I2C_TIMEOUT);
|
||||
if (tca9555_status) goto out;
|
||||
tca9555_status = i2c_write(port1, I2C_TIMEOUT);
|
||||
if (tca9555_status) goto out;
|
||||
out:
|
||||
i2c_stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +1,10 @@
|
||||
#ifndef SIXBALL_H
|
||||
#define SIXBALL_H
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define LAYOUT( \
|
||||
k01, k02, k03, \
|
||||
k04, k05, k06 \
|
||||
) \
|
||||
{ \
|
||||
{ k02, k03, k06, k05, k04, k01 } \
|
||||
}
|
||||
|
||||
#endif
|
||||
k05, k00, k01, \
|
||||
k04, k03, k02 \
|
||||
) { \
|
||||
{ k00, k01, k02, k03, k04, k05 } \
|
||||
}
|
||||
|
@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
@ -46,5 +45,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define TAPPING_TERM 200
|
||||
|
||||
#endif
|
||||
|
@ -1,17 +1,13 @@
|
||||
#ifndef NINEKEY_H
|
||||
#define NINEKEY_H
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define LAYOUT( \
|
||||
k00, k01, k02, \
|
||||
k10, k11, k12, \
|
||||
k20, k21, k22 \
|
||||
) \
|
||||
{ \
|
||||
k00, k01, k02, \
|
||||
k10, k11, k12, \
|
||||
k20, k21, k22 \
|
||||
) { \
|
||||
{ k00, k01, k02 }, \
|
||||
{ k10, k11, k12 }, \
|
||||
{ k20, k21, k22 } \
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
@ -45,5 +44,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define TAPPING_TERM 200
|
||||
|
||||
#endif
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user