Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7229997e7d | ||
|
|
5fbd55999b | ||
|
|
ff1b625168 | ||
|
|
fe5bcae8b3 | ||
|
|
cba4c1deb5 | ||
|
|
d79fe65291 | ||
|
|
ee6c86d8e9 | ||
|
|
0a69225637 | ||
|
|
bc79e51990 | ||
|
|
a67b32425b | ||
|
|
058737f116 | ||
|
|
c9a06965c9 | ||
|
|
2c9ffd4739 | ||
|
|
2013f63134 | ||
|
|
32661df8cd | ||
|
|
661f4aaa8a | ||
|
|
27f9f3196d | ||
|
|
89446bafb8 | ||
|
|
2bcac45650 |
No files matched your search
@@ -167,6 +167,17 @@ Creates a keymap.c from a QMK Configurator export.
|
|||||||
qmk json2c [-o OUTPUT] filename
|
qmk json2c [-o OUTPUT] filename
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## `qmk c2json`
|
||||||
|
|
||||||
|
Creates a keymap.json from a keymap.c.
|
||||||
|
**Note:** Parsing C source files is not easy, therefore this subcommand may not work your keymap. In some cases not using the C pre-processor helps.
|
||||||
|
|
||||||
|
**Usage**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk c2json [--no-cpp] [-o OUTPUT] filename
|
||||||
|
```
|
||||||
|
|
||||||
## `qmk list-keyboards`
|
## `qmk list-keyboards`
|
||||||
|
|
||||||
This command lists all the keyboards currently defined in `qmk_firmware`
|
This command lists all the keyboards currently defined in `qmk_firmware`
|
||||||
|
|||||||
+39
-22
@@ -24,12 +24,18 @@ On Linux, you'll need proper privileges to communicate with the bootloader devic
|
|||||||
**/etc/udev/rules.d/50-qmk.rules:**
|
**/etc/udev/rules.d/50-qmk.rules:**
|
||||||
```
|
```
|
||||||
# Atmel DFU
|
# Atmel DFU
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FEF", TAG+="uaccess", RUN{builtin}+="uaccess" # ATmega16U2
|
### ATmega16U2
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF0", TAG+="uaccess", RUN{builtin}+="uaccess" # ATmega32U2
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FEF", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF3", TAG+="uaccess", RUN{builtin}+="uaccess" # ATmega16U4
|
### ATmega32U2
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF4", TAG+="uaccess", RUN{builtin}+="uaccess" # ATmega32U4
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF0", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF9", TAG+="uaccess", RUN{builtin}+="uaccess" # AT90USB64
|
### ATmega16U4
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FFB", TAG+="uaccess", RUN{builtin}+="uaccess" # AT90USB128
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF3", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||||
|
### ATmega32U4
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF4", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||||
|
### AT90USB64
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF9", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||||
|
### AT90USB128
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FFB", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||||
|
|
||||||
# Input Club
|
# Input Club
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1C11", ATTRS{idProduct}=="B007", TAG+="uaccess", RUN{builtin}+="uaccess"
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1C11", ATTRS{idProduct}=="B007", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||||
@@ -50,22 +56,33 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="16C0", ATTRS{idProduct}=="05DC", TAG+="uacc
|
|||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="6124", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="6124", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||||
|
|
||||||
# Caterina (Pro Micro)
|
# Caterina (Pro Micro)
|
||||||
# Spark Fun Electronics
|
## Spark Fun Electronics
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9203", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Pro Micro 3V3/8MHz
|
### Pro Micro 3V3/8MHz
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9205", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Pro Micro 5V/16MHz
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9203", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9207", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # LilyPad 3V3/8MHz (and some Pro Micro clones)
|
### Pro Micro 5V/16MHz
|
||||||
# Pololu Electronics
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9205", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1FFB", ATTRS{idProduct}=="0101", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # A-Star 32U4
|
### LilyPad 3V3/8MHz (and some Pro Micro clones)
|
||||||
# Arduino SA
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9207", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Leonardo
|
## Pololu Electronics
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0037", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Micro
|
### A-Star 32U4
|
||||||
# Adafruit Industries LLC
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1FFB", ATTRS{idProduct}=="0101", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000C", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Feather 32U4
|
## Arduino SA
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000D", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # ItsyBitsy 32U4 3V3/8MHz
|
### Leonardo
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000E", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # ItsyBitsy 32U4 5V/16MHz
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||||
# dog hunter AG
|
### Micro
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2A03", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Leonardo
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0037", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2A03", ATTRS{idProduct}=="0037", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Micro
|
## Adafruit Industries LLC
|
||||||
|
### Feather 32U4
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000C", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||||
|
### ItsyBitsy 32U4 3V3/8MHz
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000D", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||||
|
### ItsyBitsy 32U4 5V/16MHz
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000E", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||||
|
## dog hunter AG
|
||||||
|
### Leonardo
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2A03", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||||
|
### Micro
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2A03", ATTRS{idProduct}=="0037", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||||
```
|
```
|
||||||
|
|
||||||
Once added, run the following:
|
Once added, run the following:
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ When developing your keyboard, keep in mind that all warnings will be treated as
|
|||||||
|
|
||||||
## Copyright Blurb
|
## Copyright Blurb
|
||||||
|
|
||||||
If you're adapting your keyboard's setup from another project, but not using the same code, but sure to update the copyright header at the top of the files to show your name, in this format:
|
If you're adapting your keyboard's setup from another project, but not using the same code, be sure to update the copyright header at the top of the files to show your name, in this format:
|
||||||
|
|
||||||
Copyright 2017 Your Name <your@email.com>
|
Copyright 2017 Your Name <your@email.com>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,96 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 EMajesty
|
||||||
|
|
||||||
|
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 0xFEED
|
||||||
|
#define PRODUCT_ID 0x9372
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER EMajesty
|
||||||
|
#define PRODUCT eiri
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 4
|
||||||
|
#define MATRIX_COLS 12
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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 { B4, B5, B2, B6 }
|
||||||
|
#define MATRIX_COL_PINS { D1, D0, D4, C6, D7, E6, B3, B1, F7, F6, F5, F4 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
/* Copyright 2020 EMajesty
|
||||||
|
*
|
||||||
|
* 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 "eiri.h"
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
/* Copyright 2020 EMajesty
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
/* 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, K10, K11, \
|
||||||
|
K12, K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, \
|
||||||
|
K24, K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, \
|
||||||
|
K36, K37, K38, K39, K40, K41, K42, K43, K44, K45 \
|
||||||
|
) { \
|
||||||
|
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11 }, \
|
||||||
|
{ K12, K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23 }, \
|
||||||
|
{ K24, K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35 }, \
|
||||||
|
{ KC_NO, K36, K37, K38, K39, K40, K41, K42, K43, K44, K45, KC_NO } \
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "eiri",
|
||||||
|
"url": "https://github.com/EMajesty/eiri",
|
||||||
|
"maintainer": "EMajesty",
|
||||||
|
"width": 15,
|
||||||
|
"height": 4.5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [{"x":3, "y":0}, {"x":11, "y":0}, {"x":2, "y":0.25}, {"x":4, "y":0.25}, {"x":10, "y":0.25}, {"x":12, "y":0.25}, {"x":1, "y":0.5}, {"x":5, "y":0.5}, {"x":9, "y":0.5}, {"x":13, "y":0.5}, {"x":0, "y":0.75}, {"x":14, "y":0.75}, {"x":3, "y":1}, {"x":11, "y":1}, {"x":2, "y":1.25}, {"x":4, "y":1.25}, {"x":10, "y":1.25}, {"x":12, "y":1.25}, {"x":1, "y":1.5}, {"x":5, "y":1.5}, {"x":9, "y":1.5}, {"x":13, "y":1.5}, {"x":0, "y":1.75}, {"x":14, "y":1.75}, {"x":3, "y":2}, {"x":11, "y":2}, {"x":2, "y":2.25}, {"x":4, "y":2.25}, {"x":10, "y":2.25}, {"x":12, "y":2.25}, {"x":1, "y":2.5}, {"x":5, "y":2.5}, {"x":9, "y":2.5}, {"x":13, "y":2.5}, {"x":0, "y":2.75}, {"x":14, "y":2.75}, {"x":3, "y":3}, {"x":11, "y":3}, {"x":2, "y":3.25}, {"x":4, "y":3.25}, {"x":10, "y":3.25}, {"x":12, "y":3.25}, {"x":5, "y":3.5}, {"x":6, "y":3.5}, {"x":8, "y":3.5}, {"x":9, "y":3.5}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
/* Copyright 2020 EMajesty
|
||||||
|
*
|
||||||
|
* 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||||
|
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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||||
|
KC_LGUI, KC_LALT, KC_SPC, KC_DEL, MO(1), MO(2), KC_ENT, KC_BSPC, KC_RALT, KC_RGUI),
|
||||||
|
[1] = LAYOUT(
|
||||||
|
KC_ESC, _______, KC_UP, _______, KC_HOME, KC_PGUP, _______, _______, _______, KC_LPRN, KC_RPRN, KC_GRV,
|
||||||
|
_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_PGDN, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______,
|
||||||
|
_______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||||
|
[2] = LAYOUT(
|
||||||
|
RESET, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
|
||||||
|
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
|
||||||
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______)
|
||||||
|
};
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|

|
||||||
|
|
||||||
|
# The default keymap for eiri
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# eiri
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
An Atreus-inspired 40% keyboard with 6 columns
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [EMajesty](https://github.com/EMajesty)
|
||||||
|
* Hardware Supported: eiri pcb
|
||||||
|
* Hardware Availability: [Project is open source](https://github.com/EMajesty/eiri)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make emajesty/eiri:default
|
||||||
|
|
||||||
|
Flashing example for this keyboard:
|
||||||
|
|
||||||
|
make emajesty/eiri: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,22 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
COMMAND_ENABLE = no # 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
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Tom Swartz
|
||||||
|
|
||||||
|
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 0xFEED
|
||||||
|
#define PRODUCT_ID 0xBEEF
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER Tom Swartz
|
||||||
|
#define PRODUCT LeftyNumpad
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 5
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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 { D1, D0, D4, C6, D7 }
|
||||||
|
#define MATRIX_COL_PINS { E6, B4, B5, B6, B2 }
|
||||||
|
#define UNUSED_PINS {D3, D2, B0, D5, B3, B1, F7, F6, F5, F4 }
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL*/
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCE 10
|
||||||
|
|
||||||
|
/* 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 userful 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
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "LeftyNumpad",
|
||||||
|
"url": "https://github.com/tomswartz07",
|
||||||
|
"maintainer": "Tom Swartz",
|
||||||
|
"width": 5,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"0,0", "x":0, "y":0},
|
||||||
|
{"label":"1,0", "x":1, "y":0},
|
||||||
|
{"label":"2,0", "x":2, "y":0},
|
||||||
|
{"label":"3,0", "x":3, "y":0},
|
||||||
|
{"label":"4,0", "x":4, "y":0},
|
||||||
|
{"label":"0,1", "x":0, "y":1},
|
||||||
|
{"label":"1,1", "x":1, "y":1},
|
||||||
|
{"label":"2,1", "x":2, "y":1},
|
||||||
|
{"label":"3,1", "x":3, "y":1},
|
||||||
|
{"label":"0,2", "x":0, "y":2},
|
||||||
|
{"label":"1,2", "x":1, "y":2},
|
||||||
|
{"label":"2,2", "x":2, "y":2},
|
||||||
|
{"label":"3,2", "x":3, "y":2},
|
||||||
|
{"label":"5,1", "x":4, "y":1, "h":2},
|
||||||
|
{"label":"0,3", "x":0, "y":3},
|
||||||
|
{"label":"1,3", "x":1, "y":3},
|
||||||
|
{"label":"2,3", "x":2, "y":3},
|
||||||
|
{"label":"3,3", "x":3, "y":3},
|
||||||
|
{"label":"0,4", "x":0, "y":4},
|
||||||
|
{"label":"1,4", "x":1, "y":4},
|
||||||
|
{"label":"2,4", "x":2, "y":4},
|
||||||
|
{"label":"3,4", "x":3, "y":4},
|
||||||
|
{"label":"4,3", "x":4, "y":3, "h":2}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
/* Copyright 2020 Tom Swartz
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
// Defines names for use in layer keycodes and the keymap
|
||||||
|
enum layer_names {
|
||||||
|
_NP,
|
||||||
|
_FN
|
||||||
|
};
|
||||||
|
|
||||||
|
// Defines the keycodes used by our macros in process_record_user
|
||||||
|
enum custom_keycodes {
|
||||||
|
KC_00 = SAFE_RANGE,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* NumberPad Layer
|
||||||
|
,---------------------------------------.
|
||||||
|
| Back | Num | / | * | - |
|
||||||
|
| Space | Lock | | | |
|
||||||
|
|-------+-------+-------+-------+-------|
|
||||||
|
| Tab | 7 | 8 | 9 | + |
|
||||||
|
| | Home | Up | PgUp | |
|
||||||
|
|-------+-------+-------+-------| |
|
||||||
|
| Layer | 4 | 5 | 6 | |
|
||||||
|
| Toggle| Left | | Right | |
|
||||||
|
|-------+-------+-------+-------+-------|
|
||||||
|
| Page | 1 | 2 | 3 | Enter |
|
||||||
|
| Up | End | Down | PgDn | |
|
||||||
|
|-------+-------+-------+-------| |
|
||||||
|
| Page | 00 | 0 | . | |
|
||||||
|
| Down | | | | |
|
||||||
|
`---------------------------------------'
|
||||||
|
*/
|
||||||
|
[_NP] = LAYOUT(
|
||||||
|
KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
|
||||||
|
KC_TAB, KC_7, KC_8, KC_9,
|
||||||
|
TG(_NP), KC_4, KC_5, KC_6, KC_PPLS,
|
||||||
|
KC_PGUP, KC_1, KC_2, KC_3,
|
||||||
|
KC_PGDOWN, KC_00, KC_0, KC_PDOT, KC_PENT
|
||||||
|
),
|
||||||
|
/* Macropad/Function Layer
|
||||||
|
,---------------------------------------.
|
||||||
|
| `~ | Play | F13 | Prev | Next |
|
||||||
|
| | Pause | | | |
|
||||||
|
|-------+-------+-------+-------+-------|
|
||||||
|
| Tab | F14 | F15 | 9 | + |
|
||||||
|
| | | | PgUp | |
|
||||||
|
|-------+-------+-------+-------| |
|
||||||
|
| Layer | 4 | 5 | 6 | |
|
||||||
|
| Toggle| Left | | Right | |
|
||||||
|
|-------+-------+-------+-------+-------|
|
||||||
|
| U | B | 2 | 3 | Enter |
|
||||||
|
| | | Down | PgDn | |
|
||||||
|
|-------+-------+-------+-------| |
|
||||||
|
| D | F | 0 | . | |
|
||||||
|
| | | | | |
|
||||||
|
`---------------------------------------'
|
||||||
|
*/
|
||||||
|
[_FN] = LAYOUT(
|
||||||
|
KC_GRV, KC_MPLY, KC_F13, KC_MPRV, KC_MNXT,
|
||||||
|
_______, KC_F14, KC_F15, _______,
|
||||||
|
_______, _______, _______, _______, _______,
|
||||||
|
KC_U, KC_B, _______, _______,
|
||||||
|
KC_D, KC_F, _______, _______, _______
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case KC_00:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
// when keycode DOUBLEZERO is pressed
|
||||||
|
SEND_STRING("00");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
# The default keymap for LeftyNumpad
|
||||||
|
|
||||||
|
## Base Layer
|
||||||
|
```
|
||||||
|
,---------------------------------------.
|
||||||
|
| Back | Num | / | * | - |
|
||||||
|
| Space | Lock | | | |
|
||||||
|
|-------+-------+-------+-------+-------|
|
||||||
|
| Layer | 7 | 8 | 9 | + |
|
||||||
|
| Up | Home | Up | PgUp | |
|
||||||
|
|-------+-------+-------+-------| |
|
||||||
|
| Layer | 4 | 5 | 6 | |
|
||||||
|
| Down | Left | | Right | |
|
||||||
|
|-------+-------+-------+-------+-------|
|
||||||
|
| Page | 1 | 2 | 3 | Enter |
|
||||||
|
| Up | End | Down | PgDn | |
|
||||||
|
|-------+-------+-------+-------| |
|
||||||
|
| Page | 00 | 0 | . | |
|
||||||
|
| Down | | | | |
|
||||||
|
`---------------------------------------'
|
||||||
|
```
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
/* Copyright 2020 Tom Swartz
|
||||||
|
*
|
||||||
|
* 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 "leftynumpad.h"
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
/* Copyright 2020 Tom Swartz
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
/* 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( \
|
||||||
|
K05, K15, K25, K35, K45, \
|
||||||
|
K04, K14, K24, K34, \
|
||||||
|
K03, K13, K23, K33, K43, \
|
||||||
|
K02, K12, K22, K32, \
|
||||||
|
K01, K11, K21, K31, K41 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ K05, K15, K25, K35, K45 }, \
|
||||||
|
{ K04, K14, K24, K34 }, \
|
||||||
|
{ K03, K13, K23, K33, K43 }, \
|
||||||
|
{ K02, K12, K22, K32 }, \
|
||||||
|
{ K01, K11, K21, K31, K41 } \
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# LeftyNumpad
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A small numberpad/macropad intended to be placed southpaw-style on the left
|
||||||
|
side of a keyboard.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [Tom Swartz](https://github.com/tomswartz07)
|
||||||
|
* Hardware Supported: Handwired, Uses Arudino Micro.
|
||||||
|
* Hardware Availability: Handwired hardware.
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make handwired/leftynumpad: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).
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
COMMAND_ENABLE = no # 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
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "audio.h"
|
||||||
|
|
||||||
|
/* THIS FILE WAS GENERATED AND IS EXPERIMENTAL!
|
||||||
|
*
|
||||||
|
* This file was generated by qmk-compile-json. You may or may not want to
|
||||||
|
* edit it directly.
|
||||||
|
*/
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT(KC_ENTER)
|
||||||
|
};
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (index == 0) {
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_UP);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_DOWN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"documentation": "This file is a keymap.json file for handwired/onekey/pytest"
|
||||||
|
}
|
||||||
@@ -1,714 +0,0 @@
|
|||||||
/*
|
|
||||||
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @file rt/templates/chconf.h
|
|
||||||
* @brief Configuration file template.
|
|
||||||
* @details A copy of this file must be placed in each project directory, it
|
|
||||||
* contains the application specific kernel settings.
|
|
||||||
*
|
|
||||||
* @addtogroup config
|
|
||||||
* @details Kernel related settings and hooks.
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CHCONF_H
|
|
||||||
#define CHCONF_H
|
|
||||||
|
|
||||||
#define _CHIBIOS_RT_CONF_
|
|
||||||
#define _CHIBIOS_RT_CONF_VER_6_0_
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/**
|
|
||||||
* @name System timers settings
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief System time counter resolution.
|
|
||||||
* @note Allowed values are 16 or 32 bits.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_ST_RESOLUTION)
|
|
||||||
#define CH_CFG_ST_RESOLUTION 32
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief System tick frequency.
|
|
||||||
* @details Frequency of the system timer that drives the system ticks. This
|
|
||||||
* setting also defines the system tick time unit.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_ST_FREQUENCY)
|
|
||||||
#define CH_CFG_ST_FREQUENCY 10000
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Time intervals data size.
|
|
||||||
* @note Allowed values are 16, 32 or 64 bits.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_INTERVALS_SIZE)
|
|
||||||
#define CH_CFG_INTERVALS_SIZE 32
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Time types data size.
|
|
||||||
* @note Allowed values are 16 or 32 bits.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_TIME_TYPES_SIZE)
|
|
||||||
#define CH_CFG_TIME_TYPES_SIZE 32
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Time delta constant for the tick-less mode.
|
|
||||||
* @note If this value is zero then the system uses the classic
|
|
||||||
* periodic tick. This value represents the minimum number
|
|
||||||
* of ticks that is safe to specify in a timeout directive.
|
|
||||||
* The value one is not valid, timeouts are rounded up to
|
|
||||||
* this value.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_ST_TIMEDELTA)
|
|
||||||
#define CH_CFG_ST_TIMEDELTA 2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/**
|
|
||||||
* @name Kernel parameters and options
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Round robin interval.
|
|
||||||
* @details This constant is the number of system ticks allowed for the
|
|
||||||
* threads before preemption occurs. Setting this value to zero
|
|
||||||
* disables the preemption for threads with equal priority and the
|
|
||||||
* round robin becomes cooperative. Note that higher priority
|
|
||||||
* threads can still preempt, the kernel is always preemptive.
|
|
||||||
* @note Disabling the round robin preemption makes the kernel more compact
|
|
||||||
* and generally faster.
|
|
||||||
* @note The round robin preemption is not supported in tickless mode and
|
|
||||||
* must be set to zero in that case.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_TIME_QUANTUM)
|
|
||||||
#define CH_CFG_TIME_QUANTUM 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Managed RAM size.
|
|
||||||
* @details Size of the RAM area to be managed by the OS. If set to zero
|
|
||||||
* then the whole available RAM is used. The core memory is made
|
|
||||||
* available to the heap allocator and/or can be used directly through
|
|
||||||
* the simplified core memory allocator.
|
|
||||||
*
|
|
||||||
* @note In order to let the OS manage the whole RAM the linker script must
|
|
||||||
* provide the @p __heap_base__ and @p __heap_end__ symbols.
|
|
||||||
* @note Requires @p CH_CFG_USE_MEMCORE.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_MEMCORE_SIZE)
|
|
||||||
#define CH_CFG_MEMCORE_SIZE 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Idle thread automatic spawn suppression.
|
|
||||||
* @details When this option is activated the function @p chSysInit()
|
|
||||||
* does not spawn the idle thread. The application @p main()
|
|
||||||
* function becomes the idle thread and must implement an
|
|
||||||
* infinite loop.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_NO_IDLE_THREAD)
|
|
||||||
#define CH_CFG_NO_IDLE_THREAD FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/**
|
|
||||||
* @name Performance options
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief OS optimization.
|
|
||||||
* @details If enabled then time efficient rather than space efficient code
|
|
||||||
* is used when two possible implementations exist.
|
|
||||||
*
|
|
||||||
* @note This is not related to the compiler optimization options.
|
|
||||||
* @note The default is @p TRUE.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_OPTIMIZE_SPEED)
|
|
||||||
#define CH_CFG_OPTIMIZE_SPEED TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/**
|
|
||||||
* @name Subsystem options
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Time Measurement APIs.
|
|
||||||
* @details If enabled then the time measurement APIs are included in
|
|
||||||
* the kernel.
|
|
||||||
*
|
|
||||||
* @note The default is @p TRUE.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_USE_TM)
|
|
||||||
#define CH_CFG_USE_TM TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Threads registry APIs.
|
|
||||||
* @details If enabled then the registry APIs are included in the kernel.
|
|
||||||
*
|
|
||||||
* @note The default is @p TRUE.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_USE_REGISTRY)
|
|
||||||
#define CH_CFG_USE_REGISTRY TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Threads synchronization APIs.
|
|
||||||
* @details If enabled then the @p chThdWait() function is included in
|
|
||||||
* the kernel.
|
|
||||||
*
|
|
||||||
* @note The default is @p TRUE.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_USE_WAITEXIT)
|
|
||||||
#define CH_CFG_USE_WAITEXIT TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Semaphores APIs.
|
|
||||||
* @details If enabled then the Semaphores APIs are included in the kernel.
|
|
||||||
*
|
|
||||||
* @note The default is @p TRUE.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_USE_SEMAPHORES)
|
|
||||||
#define CH_CFG_USE_SEMAPHORES TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Semaphores queuing mode.
|
|
||||||
* @details If enabled then the threads are enqueued on semaphores by
|
|
||||||
* priority rather than in FIFO order.
|
|
||||||
*
|
|
||||||
* @note The default is @p FALSE. Enable this if you have special
|
|
||||||
* requirements.
|
|
||||||
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
|
|
||||||
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Mutexes APIs.
|
|
||||||
* @details If enabled then the mutexes APIs are included in the kernel.
|
|
||||||
*
|
|
||||||
* @note The default is @p TRUE.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_USE_MUTEXES)
|
|
||||||
#define CH_CFG_USE_MUTEXES TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables recursive behavior on mutexes.
|
|
||||||
* @note Recursive mutexes are heavier and have an increased
|
|
||||||
* memory footprint.
|
|
||||||
*
|
|
||||||
* @note The default is @p FALSE.
|
|
||||||
* @note Requires @p CH_CFG_USE_MUTEXES.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
|
|
||||||
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Conditional Variables APIs.
|
|
||||||
* @details If enabled then the conditional variables APIs are included
|
|
||||||
* in the kernel.
|
|
||||||
*
|
|
||||||
* @note The default is @p TRUE.
|
|
||||||
* @note Requires @p CH_CFG_USE_MUTEXES.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_USE_CONDVARS)
|
|
||||||
#define CH_CFG_USE_CONDVARS TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Conditional Variables APIs with timeout.
|
|
||||||
* @details If enabled then the conditional variables APIs with timeout
|
|
||||||
* specification are included in the kernel.
|
|
||||||
*
|
|
||||||
* @note The default is @p TRUE.
|
|
||||||
* @note Requires @p CH_CFG_USE_CONDVARS.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
|
|
||||||
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Events Flags APIs.
|
|
||||||
* @details If enabled then the event flags APIs are included in the kernel.
|
|
||||||
*
|
|
||||||
* @note The default is @p TRUE.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_USE_EVENTS)
|
|
||||||
#define CH_CFG_USE_EVENTS TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Events Flags APIs with timeout.
|
|
||||||
* @details If enabled then the events APIs with timeout specification
|
|
||||||
* are included in the kernel.
|
|
||||||
*
|
|
||||||
* @note The default is @p TRUE.
|
|
||||||
* @note Requires @p CH_CFG_USE_EVENTS.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
|
|
||||||
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Synchronous Messages APIs.
|
|
||||||
* @details If enabled then the synchronous messages APIs are included
|
|
||||||
* in the kernel.
|
|
||||||
*
|
|
||||||
* @note The default is @p TRUE.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_USE_MESSAGES)
|
|
||||||
#define CH_CFG_USE_MESSAGES TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Synchronous Messages queuing mode.
|
|
||||||
* @details If enabled then messages are served by priority rather than in
|
|
||||||
* FIFO order.
|
|
||||||
*
|
|
||||||
* @note The default is @p FALSE. Enable this if you have special
|
|
||||||
* requirements.
|
|
||||||
* @note Requires @p CH_CFG_USE_MESSAGES.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
|
|
||||||
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Mailboxes APIs.
|
|
||||||
* @details If enabled then the asynchronous messages (mailboxes) APIs are
|
|
||||||
* included in the kernel.
|
|
||||||
*
|
|
||||||
* @note The default is @p TRUE.
|
|
||||||
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_USE_MAILBOXES)
|
|
||||||
#define CH_CFG_USE_MAILBOXES TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Core Memory Manager APIs.
|
|
||||||
* @details If enabled then the core memory manager APIs are included
|
|
||||||
* in the kernel.
|
|
||||||
*
|
|
||||||
* @note The default is @p TRUE.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_USE_MEMCORE)
|
|
||||||
#define CH_CFG_USE_MEMCORE TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Heap Allocator APIs.
|
|
||||||
* @details If enabled then the memory heap allocator APIs are included
|
|
||||||
* in the kernel.
|
|
||||||
*
|
|
||||||
* @note The default is @p TRUE.
|
|
||||||
* @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
|
|
||||||
* @p CH_CFG_USE_SEMAPHORES.
|
|
||||||
* @note Mutexes are recommended.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_USE_HEAP)
|
|
||||||
#define CH_CFG_USE_HEAP TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Memory Pools Allocator APIs.
|
|
||||||
* @details If enabled then the memory pools allocator APIs are included
|
|
||||||
* in the kernel.
|
|
||||||
*
|
|
||||||
* @note The default is @p TRUE.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_USE_MEMPOOLS)
|
|
||||||
#define CH_CFG_USE_MEMPOOLS TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Objects FIFOs APIs.
|
|
||||||
* @details If enabled then the objects FIFOs APIs are included
|
|
||||||
* in the kernel.
|
|
||||||
*
|
|
||||||
* @note The default is @p TRUE.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_USE_OBJ_FIFOS)
|
|
||||||
#define CH_CFG_USE_OBJ_FIFOS TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Pipes APIs.
|
|
||||||
* @details If enabled then the pipes APIs are included
|
|
||||||
* in the kernel.
|
|
||||||
*
|
|
||||||
* @note The default is @p TRUE.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_USE_PIPES)
|
|
||||||
#define CH_CFG_USE_PIPES TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Dynamic Threads APIs.
|
|
||||||
* @details If enabled then the dynamic threads creation APIs are included
|
|
||||||
* in the kernel.
|
|
||||||
*
|
|
||||||
* @note The default is @p TRUE.
|
|
||||||
* @note Requires @p CH_CFG_USE_WAITEXIT.
|
|
||||||
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_USE_DYNAMIC)
|
|
||||||
#define CH_CFG_USE_DYNAMIC TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/**
|
|
||||||
* @name Objects factory options
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Objects Factory APIs.
|
|
||||||
* @details If enabled then the objects factory APIs are included in the
|
|
||||||
* kernel.
|
|
||||||
*
|
|
||||||
* @note The default is @p FALSE.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_USE_FACTORY)
|
|
||||||
#define CH_CFG_USE_FACTORY TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Maximum length for object names.
|
|
||||||
* @details If the specified length is zero then the name is stored by
|
|
||||||
* pointer but this could have unintended side effects.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
|
|
||||||
#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the registry of generic objects.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
|
|
||||||
#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables factory for generic buffers.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
|
|
||||||
#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables factory for semaphores.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_FACTORY_SEMAPHORES)
|
|
||||||
#define CH_CFG_FACTORY_SEMAPHORES TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables factory for mailboxes.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_FACTORY_MAILBOXES)
|
|
||||||
#define CH_CFG_FACTORY_MAILBOXES TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables factory for objects FIFOs.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
|
|
||||||
#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables factory for Pipes.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
|
|
||||||
#define CH_CFG_FACTORY_PIPES TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/**
|
|
||||||
* @name Debug options
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Debug option, kernel statistics.
|
|
||||||
*
|
|
||||||
* @note The default is @p FALSE.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_DBG_STATISTICS)
|
|
||||||
#define CH_DBG_STATISTICS FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Debug option, system state check.
|
|
||||||
* @details If enabled the correct call protocol for system APIs is checked
|
|
||||||
* at runtime.
|
|
||||||
*
|
|
||||||
* @note The default is @p FALSE.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
|
|
||||||
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Debug option, parameters checks.
|
|
||||||
* @details If enabled then the checks on the API functions input
|
|
||||||
* parameters are activated.
|
|
||||||
*
|
|
||||||
* @note The default is @p FALSE.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_DBG_ENABLE_CHECKS)
|
|
||||||
#define CH_DBG_ENABLE_CHECKS FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Debug option, consistency checks.
|
|
||||||
* @details If enabled then all the assertions in the kernel code are
|
|
||||||
* activated. This includes consistency checks inside the kernel,
|
|
||||||
* runtime anomalies and port-defined checks.
|
|
||||||
*
|
|
||||||
* @note The default is @p FALSE.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_DBG_ENABLE_ASSERTS)
|
|
||||||
#define CH_DBG_ENABLE_ASSERTS FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Debug option, trace buffer.
|
|
||||||
* @details If enabled then the trace buffer is activated.
|
|
||||||
*
|
|
||||||
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_DBG_TRACE_MASK)
|
|
||||||
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Trace buffer entries.
|
|
||||||
* @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
|
|
||||||
* different from @p CH_DBG_TRACE_MASK_DISABLED.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
|
|
||||||
#define CH_DBG_TRACE_BUFFER_SIZE 128
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Debug option, stack checks.
|
|
||||||
* @details If enabled then a runtime stack check is performed.
|
|
||||||
*
|
|
||||||
* @note The default is @p FALSE.
|
|
||||||
* @note The stack check is performed in a architecture/port dependent way.
|
|
||||||
* It may not be implemented or some ports.
|
|
||||||
* @note The default failure mode is to halt the system with the global
|
|
||||||
* @p panic_msg variable set to @p NULL.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_DBG_ENABLE_STACK_CHECK)
|
|
||||||
#define CH_DBG_ENABLE_STACK_CHECK FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Debug option, stacks initialization.
|
|
||||||
* @details If enabled then the threads working area is filled with a byte
|
|
||||||
* value when a thread is created. This can be useful for the
|
|
||||||
* runtime measurement of the used stack.
|
|
||||||
*
|
|
||||||
* @note The default is @p FALSE.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_DBG_FILL_THREADS)
|
|
||||||
#define CH_DBG_FILL_THREADS FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Debug option, threads profiling.
|
|
||||||
* @details If enabled then a field is added to the @p thread_t structure that
|
|
||||||
* counts the system ticks occurred while executing the thread.
|
|
||||||
*
|
|
||||||
* @note The default is @p FALSE.
|
|
||||||
* @note This debug option is not currently compatible with the
|
|
||||||
* tickless mode.
|
|
||||||
*/
|
|
||||||
#if !defined(CH_DBG_THREADS_PROFILING)
|
|
||||||
#define CH_DBG_THREADS_PROFILING FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/**
|
|
||||||
* @name Kernel hooks
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief System structure extension.
|
|
||||||
* @details User fields added to the end of the @p ch_system_t structure.
|
|
||||||
*/
|
|
||||||
#define CH_CFG_SYSTEM_EXTRA_FIELDS \
|
|
||||||
/* Add threads custom fields here.*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief System initialization hook.
|
|
||||||
* @details User initialization code added to the @p chSysInit() function
|
|
||||||
* just before interrupts are enabled globally.
|
|
||||||
*/
|
|
||||||
#define CH_CFG_SYSTEM_INIT_HOOK() { \
|
|
||||||
/* Add threads initialization code here.*/ \
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Threads descriptor structure extension.
|
|
||||||
* @details User fields added to the end of the @p thread_t structure.
|
|
||||||
*/
|
|
||||||
#define CH_CFG_THREAD_EXTRA_FIELDS \
|
|
||||||
/* Add threads custom fields here.*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Threads initialization hook.
|
|
||||||
* @details User initialization code added to the @p _thread_init() function.
|
|
||||||
*
|
|
||||||
* @note It is invoked from within @p _thread_init() and implicitly from all
|
|
||||||
* the threads creation APIs.
|
|
||||||
*/
|
|
||||||
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
|
|
||||||
/* Add threads initialization code here.*/ \
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Threads finalization hook.
|
|
||||||
* @details User finalization code added to the @p chThdExit() API.
|
|
||||||
*/
|
|
||||||
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
|
|
||||||
/* Add threads finalization code here.*/ \
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Context switch hook.
|
|
||||||
* @details This hook is invoked just before switching between threads.
|
|
||||||
*/
|
|
||||||
#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
|
|
||||||
/* Context switch code here.*/ \
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief ISR enter hook.
|
|
||||||
*/
|
|
||||||
#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
|
|
||||||
/* IRQ prologue code here.*/ \
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief ISR exit hook.
|
|
||||||
*/
|
|
||||||
#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
|
|
||||||
/* IRQ epilogue code here.*/ \
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Idle thread enter hook.
|
|
||||||
* @note This hook is invoked within a critical zone, no OS functions
|
|
||||||
* should be invoked from here.
|
|
||||||
* @note This macro can be used to activate a power saving mode.
|
|
||||||
*/
|
|
||||||
#define CH_CFG_IDLE_ENTER_HOOK() { \
|
|
||||||
/* Idle-enter code here.*/ \
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Idle thread leave hook.
|
|
||||||
* @note This hook is invoked within a critical zone, no OS functions
|
|
||||||
* should be invoked from here.
|
|
||||||
* @note This macro can be used to deactivate a power saving mode.
|
|
||||||
*/
|
|
||||||
#define CH_CFG_IDLE_LEAVE_HOOK() { \
|
|
||||||
/* Idle-leave code here.*/ \
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Idle Loop hook.
|
|
||||||
* @details This hook is continuously invoked by the idle thread loop.
|
|
||||||
*/
|
|
||||||
#define CH_CFG_IDLE_LOOP_HOOK() { \
|
|
||||||
/* Idle loop code here.*/ \
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief System tick event hook.
|
|
||||||
* @details This hook is invoked in the system tick handler immediately
|
|
||||||
* after processing the virtual timers queue.
|
|
||||||
*/
|
|
||||||
#define CH_CFG_SYSTEM_TICK_HOOK() { \
|
|
||||||
/* System tick event code here.*/ \
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief System halt hook.
|
|
||||||
* @details This hook is invoked in case to a system halting error before
|
|
||||||
* the system is halted.
|
|
||||||
*/
|
|
||||||
#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \
|
|
||||||
/* System halt code here.*/ \
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Trace hook.
|
|
||||||
* @details This hook is invoked each time a new record is written in the
|
|
||||||
* trace buffer.
|
|
||||||
*/
|
|
||||||
#define CH_CFG_TRACE_HOOK(tep) { \
|
|
||||||
/* Trace code here.*/ \
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/* Port-specific settings (override port settings defaulted in chcore.h). */
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
#endif /* CHCONF_H */
|
|
||||||
|
|
||||||
/** @} */
|
|
||||||
@@ -1,525 +0,0 @@
|
|||||||
/*
|
|
||||||
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @file templates/halconf.h
|
|
||||||
* @brief HAL configuration header.
|
|
||||||
* @details HAL configuration file, this file allows to enable or disable the
|
|
||||||
* various device drivers from your application. You may also use
|
|
||||||
* this file in order to override the device drivers default settings.
|
|
||||||
*
|
|
||||||
* @addtogroup HAL_CONF
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef HALCONF_H
|
|
||||||
#define HALCONF_H
|
|
||||||
|
|
||||||
#define _CHIBIOS_HAL_CONF_
|
|
||||||
#define _CHIBIOS_HAL_CONF_VER_7_0_
|
|
||||||
|
|
||||||
#include "mcuconf.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the PAL subsystem.
|
|
||||||
*/
|
|
||||||
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
|
|
||||||
#define HAL_USE_PAL TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the ADC subsystem.
|
|
||||||
*/
|
|
||||||
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
|
|
||||||
#define HAL_USE_ADC FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the CAN subsystem.
|
|
||||||
*/
|
|
||||||
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
|
|
||||||
#define HAL_USE_CAN FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the cryptographic subsystem.
|
|
||||||
*/
|
|
||||||
#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
|
|
||||||
#define HAL_USE_CRY FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the DAC subsystem.
|
|
||||||
*/
|
|
||||||
#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
|
|
||||||
#define HAL_USE_DAC FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the GPT subsystem.
|
|
||||||
*/
|
|
||||||
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
|
|
||||||
#define HAL_USE_GPT FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the I2C subsystem.
|
|
||||||
*/
|
|
||||||
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
|
|
||||||
#define HAL_USE_I2C FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the I2S subsystem.
|
|
||||||
*/
|
|
||||||
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
|
|
||||||
#define HAL_USE_I2S FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the ICU subsystem.
|
|
||||||
*/
|
|
||||||
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
|
|
||||||
#define HAL_USE_ICU FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the MAC subsystem.
|
|
||||||
*/
|
|
||||||
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
|
|
||||||
#define HAL_USE_MAC FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the MMC_SPI subsystem.
|
|
||||||
*/
|
|
||||||
#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
|
|
||||||
#define HAL_USE_MMC_SPI FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the PWM subsystem.
|
|
||||||
*/
|
|
||||||
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
|
|
||||||
#define HAL_USE_PWM FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the RTC subsystem.
|
|
||||||
*/
|
|
||||||
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
|
|
||||||
#define HAL_USE_RTC FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the SDC subsystem.
|
|
||||||
*/
|
|
||||||
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
|
|
||||||
#define HAL_USE_SDC FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the SERIAL subsystem.
|
|
||||||
*/
|
|
||||||
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
|
|
||||||
#define HAL_USE_SERIAL FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the SERIAL over USB subsystem.
|
|
||||||
*/
|
|
||||||
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
|
|
||||||
#define HAL_USE_SERIAL_USB FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the SIO subsystem.
|
|
||||||
*/
|
|
||||||
#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
|
|
||||||
#define HAL_USE_SIO FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the SPI subsystem.
|
|
||||||
*/
|
|
||||||
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
|
|
||||||
#define HAL_USE_SPI FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the TRNG subsystem.
|
|
||||||
*/
|
|
||||||
#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
|
|
||||||
#define HAL_USE_TRNG FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the UART subsystem.
|
|
||||||
*/
|
|
||||||
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
|
|
||||||
#define HAL_USE_UART FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the USB subsystem.
|
|
||||||
*/
|
|
||||||
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
|
|
||||||
#define HAL_USE_USB TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the WDG subsystem.
|
|
||||||
*/
|
|
||||||
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
|
|
||||||
#define HAL_USE_WDG FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the WSPI subsystem.
|
|
||||||
*/
|
|
||||||
#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
|
|
||||||
#define HAL_USE_WSPI FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/* PAL driver related settings. */
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables synchronous APIs.
|
|
||||||
* @note Disabling this option saves both code and data space.
|
|
||||||
*/
|
|
||||||
#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
|
|
||||||
#define PAL_USE_CALLBACKS FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables synchronous APIs.
|
|
||||||
* @note Disabling this option saves both code and data space.
|
|
||||||
*/
|
|
||||||
#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
|
|
||||||
#define PAL_USE_WAIT FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/* ADC driver related settings. */
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables synchronous APIs.
|
|
||||||
* @note Disabling this option saves both code and data space.
|
|
||||||
*/
|
|
||||||
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
|
|
||||||
#define ADC_USE_WAIT TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
|
|
||||||
* @note Disabling this option saves both code and data space.
|
|
||||||
*/
|
|
||||||
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
|
||||||
#define ADC_USE_MUTUAL_EXCLUSION TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/* CAN driver related settings. */
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Sleep mode related APIs inclusion switch.
|
|
||||||
*/
|
|
||||||
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
|
|
||||||
#define CAN_USE_SLEEP_MODE TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enforces the driver to use direct callbacks rather than OSAL events.
|
|
||||||
*/
|
|
||||||
#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
|
|
||||||
#define CAN_ENFORCE_USE_CALLBACKS FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/* CRY driver related settings. */
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the SW fall-back of the cryptographic driver.
|
|
||||||
* @details When enabled, this option, activates a fall-back software
|
|
||||||
* implementation for algorithms not supported by the underlying
|
|
||||||
* hardware.
|
|
||||||
* @note Fall-back implementations may not be present for all algorithms.
|
|
||||||
*/
|
|
||||||
#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
|
|
||||||
#define HAL_CRY_USE_FALLBACK FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Makes the driver forcibly use the fall-back implementations.
|
|
||||||
*/
|
|
||||||
#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
|
|
||||||
#define HAL_CRY_ENFORCE_FALLBACK FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/* DAC driver related settings. */
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables synchronous APIs.
|
|
||||||
* @note Disabling this option saves both code and data space.
|
|
||||||
*/
|
|
||||||
#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
|
|
||||||
#define DAC_USE_WAIT TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
|
|
||||||
* @note Disabling this option saves both code and data space.
|
|
||||||
*/
|
|
||||||
#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
|
||||||
#define DAC_USE_MUTUAL_EXCLUSION TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/* I2C driver related settings. */
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the mutual exclusion APIs on the I2C bus.
|
|
||||||
*/
|
|
||||||
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
|
||||||
#define I2C_USE_MUTUAL_EXCLUSION TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/* MAC driver related settings. */
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the zero-copy API.
|
|
||||||
*/
|
|
||||||
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
|
|
||||||
#define MAC_USE_ZERO_COPY FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables an event sources for incoming packets.
|
|
||||||
*/
|
|
||||||
#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
|
|
||||||
#define MAC_USE_EVENTS TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/* MMC_SPI driver related settings. */
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Delays insertions.
|
|
||||||
* @details If enabled this options inserts delays into the MMC waiting
|
|
||||||
* routines releasing some extra CPU time for the threads with
|
|
||||||
* lower priority, this may slow down the driver a bit however.
|
|
||||||
* This option is recommended also if the SPI driver does not
|
|
||||||
* use a DMA channel and heavily loads the CPU.
|
|
||||||
*/
|
|
||||||
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
|
|
||||||
#define MMC_NICE_WAITING TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/* SDC driver related settings. */
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Number of initialization attempts before rejecting the card.
|
|
||||||
* @note Attempts are performed at 10mS intervals.
|
|
||||||
*/
|
|
||||||
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
|
|
||||||
#define SDC_INIT_RETRY 100
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Include support for MMC cards.
|
|
||||||
* @note MMC support is not yet implemented so this option must be kept
|
|
||||||
* at @p FALSE.
|
|
||||||
*/
|
|
||||||
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
|
|
||||||
#define SDC_MMC_SUPPORT FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Delays insertions.
|
|
||||||
* @details If enabled this options inserts delays into the MMC waiting
|
|
||||||
* routines releasing some extra CPU time for the threads with
|
|
||||||
* lower priority, this may slow down the driver a bit however.
|
|
||||||
*/
|
|
||||||
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
|
|
||||||
#define SDC_NICE_WAITING TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief OCR initialization constant for V20 cards.
|
|
||||||
*/
|
|
||||||
#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
|
|
||||||
#define SDC_INIT_OCR_V20 0x50FF8000U
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief OCR initialization constant for non-V20 cards.
|
|
||||||
*/
|
|
||||||
#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
|
|
||||||
#define SDC_INIT_OCR 0x80100000U
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/* SERIAL driver related settings. */
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Default bit rate.
|
|
||||||
* @details Configuration parameter, this is the baud rate selected for the
|
|
||||||
* default configuration.
|
|
||||||
*/
|
|
||||||
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
|
|
||||||
#define SERIAL_DEFAULT_BITRATE 38400
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Serial buffers size.
|
|
||||||
* @details Configuration parameter, you can change the depth of the queue
|
|
||||||
* buffers depending on the requirements of your application.
|
|
||||||
* @note The default is 16 bytes for both the transmission and receive
|
|
||||||
* buffers.
|
|
||||||
*/
|
|
||||||
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
|
||||||
#define SERIAL_BUFFERS_SIZE 16
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/* SERIAL_USB driver related setting. */
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Serial over USB buffers size.
|
|
||||||
* @details Configuration parameter, the buffer size must be a multiple of
|
|
||||||
* the USB data endpoint maximum packet size.
|
|
||||||
* @note The default is 256 bytes for both the transmission and receive
|
|
||||||
* buffers.
|
|
||||||
*/
|
|
||||||
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
|
||||||
#define SERIAL_USB_BUFFERS_SIZE 256
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Serial over USB number of buffers.
|
|
||||||
* @note The default is 2 buffers.
|
|
||||||
*/
|
|
||||||
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
|
|
||||||
#define SERIAL_USB_BUFFERS_NUMBER 2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/* SPI driver related settings. */
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables synchronous APIs.
|
|
||||||
* @note Disabling this option saves both code and data space.
|
|
||||||
*/
|
|
||||||
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
|
|
||||||
#define SPI_USE_WAIT TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables circular transfers APIs.
|
|
||||||
* @note Disabling this option saves both code and data space.
|
|
||||||
*/
|
|
||||||
#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
|
|
||||||
#define SPI_USE_CIRCULAR FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
|
|
||||||
* @note Disabling this option saves both code and data space.
|
|
||||||
*/
|
|
||||||
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
|
||||||
#define SPI_USE_MUTUAL_EXCLUSION TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Handling method for SPI CS line.
|
|
||||||
* @note Disabling this option saves both code and data space.
|
|
||||||
*/
|
|
||||||
#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
|
|
||||||
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/* UART driver related settings. */
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables synchronous APIs.
|
|
||||||
* @note Disabling this option saves both code and data space.
|
|
||||||
*/
|
|
||||||
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
|
|
||||||
#define UART_USE_WAIT FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
|
|
||||||
* @note Disabling this option saves both code and data space.
|
|
||||||
*/
|
|
||||||
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
|
||||||
#define UART_USE_MUTUAL_EXCLUSION FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/* USB driver related settings. */
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables synchronous APIs.
|
|
||||||
* @note Disabling this option saves both code and data space.
|
|
||||||
*/
|
|
||||||
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
|
|
||||||
#define USB_USE_WAIT TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/* WSPI driver related settings. */
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables synchronous APIs.
|
|
||||||
* @note Disabling this option saves both code and data space.
|
|
||||||
*/
|
|
||||||
#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
|
|
||||||
#define WSPI_USE_WAIT TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
|
|
||||||
* @note Disabling this option saves both code and data space.
|
|
||||||
*/
|
|
||||||
#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
|
||||||
#define WSPI_USE_MUTUAL_EXCLUSION TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* HALCONF_H */
|
|
||||||
|
|
||||||
/** @} */
|
|
||||||
@@ -1,253 +0,0 @@
|
|||||||
/*
|
|
||||||
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef MCUCONF_H
|
|
||||||
#define MCUCONF_H
|
|
||||||
|
|
||||||
/*
|
|
||||||
* STM32F4xx drivers configuration.
|
|
||||||
* The following settings override the default settings present in
|
|
||||||
* the various device driver implementation headers.
|
|
||||||
* Note that the settings for each driver only have effect if the whole
|
|
||||||
* driver is enabled in halconf.h.
|
|
||||||
*
|
|
||||||
* IRQ priorities:
|
|
||||||
* 15...0 Lowest...Highest.
|
|
||||||
*
|
|
||||||
* DMA priorities:
|
|
||||||
* 0...3 Lowest...Highest.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define STM32F4xx_MCUCONF
|
|
||||||
|
|
||||||
/*
|
|
||||||
* HAL driver system settings.
|
|
||||||
*/
|
|
||||||
#define STM32_NO_INIT FALSE
|
|
||||||
#define STM32_HSI_ENABLED TRUE
|
|
||||||
#define STM32_LSI_ENABLED TRUE
|
|
||||||
#define STM32_HSE_ENABLED TRUE
|
|
||||||
#define STM32_LSE_ENABLED FALSE
|
|
||||||
#define STM32_CLOCK48_REQUIRED TRUE
|
|
||||||
#define STM32_SW STM32_SW_PLL
|
|
||||||
#define STM32_PLLSRC STM32_PLLSRC_HSE
|
|
||||||
#define STM32_PLLM_VALUE 25
|
|
||||||
#define STM32_PLLN_VALUE 336
|
|
||||||
#define STM32_PLLP_VALUE 4
|
|
||||||
#define STM32_PLLQ_VALUE 7
|
|
||||||
#define STM32_HPRE STM32_HPRE_DIV1
|
|
||||||
#define STM32_PPRE1 STM32_PPRE1_DIV4
|
|
||||||
#define STM32_PPRE2 STM32_PPRE2_DIV2
|
|
||||||
#define STM32_RTCSEL STM32_RTCSEL_LSI
|
|
||||||
#define STM32_RTCPRE_VALUE 8
|
|
||||||
#define STM32_MCO1SEL STM32_MCO1SEL_HSI
|
|
||||||
#define STM32_MCO1PRE STM32_MCO1PRE_DIV1
|
|
||||||
#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK
|
|
||||||
#define STM32_MCO2PRE STM32_MCO2PRE_DIV5
|
|
||||||
#define STM32_I2SSRC STM32_I2SSRC_CKIN
|
|
||||||
#define STM32_PLLI2SN_VALUE 192
|
|
||||||
#define STM32_PLLI2SR_VALUE 5
|
|
||||||
#define STM32_PVD_ENABLE FALSE
|
|
||||||
#define STM32_PLS STM32_PLS_LEV0
|
|
||||||
#define STM32_BKPRAM_ENABLE FALSE
|
|
||||||
|
|
||||||
/*
|
|
||||||
* IRQ system settings.
|
|
||||||
*/
|
|
||||||
#define STM32_IRQ_EXTI0_PRIORITY 6
|
|
||||||
#define STM32_IRQ_EXTI1_PRIORITY 6
|
|
||||||
#define STM32_IRQ_EXTI2_PRIORITY 6
|
|
||||||
#define STM32_IRQ_EXTI3_PRIORITY 6
|
|
||||||
#define STM32_IRQ_EXTI4_PRIORITY 6
|
|
||||||
#define STM32_IRQ_EXTI5_9_PRIORITY 6
|
|
||||||
#define STM32_IRQ_EXTI10_15_PRIORITY 6
|
|
||||||
#define STM32_IRQ_EXTI16_PRIORITY 6
|
|
||||||
#define STM32_IRQ_EXTI17_PRIORITY 15
|
|
||||||
#define STM32_IRQ_EXTI18_PRIORITY 6
|
|
||||||
#define STM32_IRQ_EXTI19_PRIORITY 6
|
|
||||||
#define STM32_IRQ_EXTI20_PRIORITY 6
|
|
||||||
#define STM32_IRQ_EXTI21_PRIORITY 15
|
|
||||||
#define STM32_IRQ_EXTI22_PRIORITY 15
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ADC driver system settings.
|
|
||||||
*/
|
|
||||||
#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4
|
|
||||||
#define STM32_ADC_USE_ADC1 FALSE
|
|
||||||
#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4)
|
|
||||||
#define STM32_ADC_ADC1_DMA_PRIORITY 2
|
|
||||||
#define STM32_ADC_IRQ_PRIORITY 6
|
|
||||||
#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 6
|
|
||||||
|
|
||||||
/*
|
|
||||||
* GPT driver system settings.
|
|
||||||
*/
|
|
||||||
#define STM32_GPT_USE_TIM1 FALSE
|
|
||||||
#define STM32_GPT_USE_TIM2 FALSE
|
|
||||||
#define STM32_GPT_USE_TIM3 FALSE
|
|
||||||
#define STM32_GPT_USE_TIM4 FALSE
|
|
||||||
#define STM32_GPT_USE_TIM5 FALSE
|
|
||||||
#define STM32_GPT_USE_TIM9 FALSE
|
|
||||||
#define STM32_GPT_USE_TIM11 FALSE
|
|
||||||
#define STM32_GPT_TIM1_IRQ_PRIORITY 7
|
|
||||||
#define STM32_GPT_TIM2_IRQ_PRIORITY 7
|
|
||||||
#define STM32_GPT_TIM3_IRQ_PRIORITY 7
|
|
||||||
#define STM32_GPT_TIM4_IRQ_PRIORITY 7
|
|
||||||
#define STM32_GPT_TIM5_IRQ_PRIORITY 7
|
|
||||||
#define STM32_GPT_TIM9_IRQ_PRIORITY 7
|
|
||||||
#define STM32_GPT_TIM11_IRQ_PRIORITY 7
|
|
||||||
|
|
||||||
/*
|
|
||||||
* I2C driver system settings.
|
|
||||||
*/
|
|
||||||
#define STM32_I2C_USE_I2C1 FALSE
|
|
||||||
#define STM32_I2C_USE_I2C2 FALSE
|
|
||||||
#define STM32_I2C_USE_I2C3 FALSE
|
|
||||||
#define STM32_I2C_BUSY_TIMEOUT 50
|
|
||||||
#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0)
|
|
||||||
#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
|
|
||||||
#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
|
|
||||||
#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
|
|
||||||
#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
|
|
||||||
#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
|
|
||||||
#define STM32_I2C_I2C1_IRQ_PRIORITY 5
|
|
||||||
#define STM32_I2C_I2C2_IRQ_PRIORITY 5
|
|
||||||
#define STM32_I2C_I2C3_IRQ_PRIORITY 5
|
|
||||||
#define STM32_I2C_I2C1_DMA_PRIORITY 3
|
|
||||||
#define STM32_I2C_I2C2_DMA_PRIORITY 3
|
|
||||||
#define STM32_I2C_I2C3_DMA_PRIORITY 3
|
|
||||||
#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
|
|
||||||
|
|
||||||
/*
|
|
||||||
* I2S driver system settings.
|
|
||||||
*/
|
|
||||||
#define STM32_I2S_USE_SPI2 FALSE
|
|
||||||
#define STM32_I2S_USE_SPI3 FALSE
|
|
||||||
#define STM32_I2S_SPI2_IRQ_PRIORITY 10
|
|
||||||
#define STM32_I2S_SPI3_IRQ_PRIORITY 10
|
|
||||||
#define STM32_I2S_SPI2_DMA_PRIORITY 1
|
|
||||||
#define STM32_I2S_SPI3_DMA_PRIORITY 1
|
|
||||||
#define STM32_I2S_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
|
|
||||||
#define STM32_I2S_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
|
|
||||||
#define STM32_I2S_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0)
|
|
||||||
#define STM32_I2S_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
|
|
||||||
#define STM32_I2S_DMA_ERROR_HOOK(i2sp) osalSysHalt("DMA failure")
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ICU driver system settings.
|
|
||||||
*/
|
|
||||||
#define STM32_ICU_USE_TIM1 FALSE
|
|
||||||
#define STM32_ICU_USE_TIM2 FALSE
|
|
||||||
#define STM32_ICU_USE_TIM3 FALSE
|
|
||||||
#define STM32_ICU_USE_TIM4 FALSE
|
|
||||||
#define STM32_ICU_USE_TIM5 FALSE
|
|
||||||
#define STM32_ICU_USE_TIM9 FALSE
|
|
||||||
#define STM32_ICU_TIM1_IRQ_PRIORITY 7
|
|
||||||
#define STM32_ICU_TIM2_IRQ_PRIORITY 7
|
|
||||||
#define STM32_ICU_TIM3_IRQ_PRIORITY 7
|
|
||||||
#define STM32_ICU_TIM4_IRQ_PRIORITY 7
|
|
||||||
#define STM32_ICU_TIM5_IRQ_PRIORITY 7
|
|
||||||
#define STM32_ICU_TIM9_IRQ_PRIORITY 7
|
|
||||||
|
|
||||||
/*
|
|
||||||
* PWM driver system settings.
|
|
||||||
*/
|
|
||||||
#define STM32_PWM_USE_ADVANCED FALSE
|
|
||||||
#define STM32_PWM_USE_TIM1 FALSE
|
|
||||||
#define STM32_PWM_USE_TIM2 FALSE
|
|
||||||
#define STM32_PWM_USE_TIM3 FALSE
|
|
||||||
#define STM32_PWM_USE_TIM4 FALSE
|
|
||||||
#define STM32_PWM_USE_TIM5 FALSE
|
|
||||||
#define STM32_PWM_USE_TIM9 FALSE
|
|
||||||
#define STM32_PWM_TIM1_IRQ_PRIORITY 7
|
|
||||||
#define STM32_PWM_TIM2_IRQ_PRIORITY 7
|
|
||||||
#define STM32_PWM_TIM3_IRQ_PRIORITY 7
|
|
||||||
#define STM32_PWM_TIM4_IRQ_PRIORITY 7
|
|
||||||
#define STM32_PWM_TIM5_IRQ_PRIORITY 7
|
|
||||||
#define STM32_PWM_TIM9_IRQ_PRIORITY 7
|
|
||||||
|
|
||||||
/*
|
|
||||||
* SERIAL driver system settings.
|
|
||||||
*/
|
|
||||||
#define STM32_SERIAL_USE_USART1 FALSE
|
|
||||||
#define STM32_SERIAL_USE_USART2 FALSE
|
|
||||||
#define STM32_SERIAL_USE_USART6 FALSE
|
|
||||||
#define STM32_SERIAL_USART1_PRIORITY 12
|
|
||||||
#define STM32_SERIAL_USART2_PRIORITY 12
|
|
||||||
#define STM32_SERIAL_USART6_PRIORITY 12
|
|
||||||
|
|
||||||
/*
|
|
||||||
* SPI driver system settings.
|
|
||||||
*/
|
|
||||||
#define STM32_SPI_USE_SPI1 FALSE
|
|
||||||
#define STM32_SPI_USE_SPI2 FALSE
|
|
||||||
#define STM32_SPI_USE_SPI3 FALSE
|
|
||||||
#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0)
|
|
||||||
#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3)
|
|
||||||
#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
|
|
||||||
#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
|
|
||||||
#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0)
|
|
||||||
#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
|
|
||||||
#define STM32_SPI_SPI1_DMA_PRIORITY 1
|
|
||||||
#define STM32_SPI_SPI2_DMA_PRIORITY 1
|
|
||||||
#define STM32_SPI_SPI3_DMA_PRIORITY 1
|
|
||||||
#define STM32_SPI_SPI1_IRQ_PRIORITY 10
|
|
||||||
#define STM32_SPI_SPI2_IRQ_PRIORITY 10
|
|
||||||
#define STM32_SPI_SPI3_IRQ_PRIORITY 10
|
|
||||||
#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ST driver system settings.
|
|
||||||
*/
|
|
||||||
#define STM32_ST_IRQ_PRIORITY 8
|
|
||||||
#define STM32_ST_USE_TIMER 2
|
|
||||||
|
|
||||||
/*
|
|
||||||
* UART driver system settings.
|
|
||||||
*/
|
|
||||||
#define STM32_UART_USE_USART1 FALSE
|
|
||||||
#define STM32_UART_USE_USART2 FALSE
|
|
||||||
#define STM32_UART_USE_USART6 FALSE
|
|
||||||
#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5)
|
|
||||||
#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7)
|
|
||||||
#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
|
|
||||||
#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
|
|
||||||
#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
|
|
||||||
#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7)
|
|
||||||
#define STM32_UART_USART1_IRQ_PRIORITY 12
|
|
||||||
#define STM32_UART_USART2_IRQ_PRIORITY 12
|
|
||||||
#define STM32_UART_USART6_IRQ_PRIORITY 12
|
|
||||||
#define STM32_UART_USART1_DMA_PRIORITY 0
|
|
||||||
#define STM32_UART_USART2_DMA_PRIORITY 0
|
|
||||||
#define STM32_UART_USART6_DMA_PRIORITY 0
|
|
||||||
#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
|
|
||||||
|
|
||||||
/*
|
|
||||||
* USB driver system settings.
|
|
||||||
*/
|
|
||||||
#define STM32_USB_USE_OTG1 TRUE
|
|
||||||
#define STM32_USB_OTG1_IRQ_PRIORITY 14
|
|
||||||
#define STM32_USB_OTG1_RX_FIFO_SIZE 512
|
|
||||||
#define STM32_USB_OTG_THREAD_PRIO NORMALPRIO+1
|
|
||||||
#define STM32_USB_OTG_THREAD_STACK_SIZE 128
|
|
||||||
#define STM32_USB_OTGFIFO_FILL_BASEPRI 0
|
|
||||||
|
|
||||||
/*
|
|
||||||
* WDG driver system settings.
|
|
||||||
*/
|
|
||||||
#define STM32_WDG_USE_IWDG FALSE
|
|
||||||
|
|
||||||
#endif /* MCUCONF_H */
|
|
||||||
File renamed without changes.
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2020 QMK Community, Daniel Reibl <[email protected]>
|
Copyright 2020 QMK Community, Janos Daniel Reibl <[email protected]> @riblee
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -22,3 +22,5 @@ BACKLIGHT_DRIVER = software
|
|||||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||||
AUDIO_ENABLE = no # Audio output
|
AUDIO_ENABLE = no # Audio output
|
||||||
|
|
||||||
|
LAYOUTS = ortho_5x12
|
||||||
@@ -22,8 +22,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
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_GRV, KC_BSPC, KC_INS,
|
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_GRV, KC_BSPC, KC_INS,
|
||||||
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_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_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_ENT, KC_PGDN,
|
||||||
KC_LSFT, KC_BSLS, 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_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_UP,
|
||||||
KC_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||||
|
|
||||||
LAYOUT_all(
|
LAYOUT_all(
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
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_GRV, KC_BSPC, KC_INS,
|
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_GRV, KC_BSPC, KC_INS,
|
||||||
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_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_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_ENT, KC_PGDN,
|
||||||
KC_LSFT, KC_BSLS, 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_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_UP,
|
||||||
KC_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||||
|
|
||||||
LAYOUT_all(
|
LAYOUT_all(
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
|||||||
@@ -23,12 +23,12 @@
|
|||||||
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \
|
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \
|
||||||
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K315, \
|
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K315, \
|
||||||
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, \
|
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, \
|
||||||
K500, K501, K502, K506, K510, K511, K513, K514, K515 \
|
K500, K501, K502, K506, K510, K511, K512, K514, K515 \
|
||||||
) { \
|
) { \
|
||||||
{ K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, KC_NO, K011, K012, K013, K014, K015 }, \
|
{ K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, KC_NO, K011, K012, K013, K014, K015 }, \
|
||||||
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \
|
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \
|
||||||
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \
|
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \
|
||||||
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO, K315 }, \
|
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO, K315 }, \
|
||||||
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO, K414, KC_NO }, \
|
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO, K414, KC_NO }, \
|
||||||
{ K500, K501, K502, KC_NO, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, K511, KC_NO, K513, K514, K515 } \
|
{ K500, K501, K502, KC_NO, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, K511, K512, KC_NO, K514, K515 } \
|
||||||
}
|
}
|
||||||
@@ -102,3 +102,12 @@ void suspend_wakeup_init_kb(void) {
|
|||||||
rgb_matrix_set_suspend_state(false);
|
rgb_matrix_set_suspend_state(false);
|
||||||
suspend_wakeup_init_user();
|
suspend_wakeup_init_user();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void rgb_matrix_indicators_user(void)
|
||||||
|
{
|
||||||
|
if (host_keyboard_led_state().caps_lock)
|
||||||
|
{
|
||||||
|
rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -21,9 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define AUTO_SHIFT_TIMEOUT 200
|
|
||||||
#define NO_AUTO_SHIFT_NUMERIC
|
|
||||||
|
|
||||||
// RGB lighting
|
// RGB lighting
|
||||||
#define RGBLIGHT_SLEEP
|
#define RGBLIGHT_SLEEP
|
||||||
#undef RGBLED_NUM
|
#undef RGBLED_NUM
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ enum layer_names {
|
|||||||
_LOWER,
|
_LOWER,
|
||||||
_RAISE,
|
_RAISE,
|
||||||
_NUMPAD,
|
_NUMPAD,
|
||||||
_GAMING,
|
|
||||||
_ADJUST
|
_ADJUST
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -118,14 +117,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
* | | | | | | | | | | | | | |
|
* | | | | | | | | | | | | | |
|
||||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
* | TGLAS| | | | | | | | | | | |GAMING|
|
* | | | | | | | | | | | | | |
|
||||||
* `-----------------------------------------' `-----------------------------------------'
|
* `-----------------------------------------' `-----------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_ADJUST] = LAYOUT_ortho_4x12(
|
[_ADJUST] = LAYOUT_ortho_4x12(
|
||||||
RESET, EEP_RST, _______, RALT(KC_SCLN), _______, _______, _______, TD(U), RALT(KC_Z), TD(O), _______, _______,
|
RESET, EEP_RST, _______, RALT(KC_SCLN), _______, _______, _______, TD(U), RALT(KC_Z), TD(O), _______, _______,
|
||||||
_______, RALT(KC_QUOT), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, RALT(KC_QUOT), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
KC_ASTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TG(_GAMING)
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Numpad
|
/* Numpad
|
||||||
@@ -144,27 +143,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
_______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______,
|
||||||
RGB_VAI, RGB_SAI, RGB_HUI, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, _______,
|
RGB_VAI, RGB_SAI, RGB_HUI, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, _______,
|
||||||
_______, _______, _______, _______, RGB_MOD, RGB_TOG, KC_CALC, KC_0, KC_PPLS, _______, _______, _______
|
_______, _______, _______, _______, RGB_MOD, RGB_TOG, KC_CALC, KC_0, KC_PPLS, _______, _______, _______
|
||||||
),
|
|
||||||
|
|
||||||
/* Gaming
|
|
||||||
* ,-----------------------------------------. ,-----------------------------------------.
|
|
||||||
* | | | | | | | | | | | | | |
|
|
||||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
|
||||||
* | | | | | | | | | | | | | |
|
|
||||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
|
||||||
* | | | | | | | | | | | | | |
|
|
||||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
|
||||||
* | | | | | RAISE| | | | LOWER| | | | |
|
|
||||||
* `-----------------------------------------' `-----------------------------------------'
|
|
||||||
*/
|
|
||||||
[_GAMING] = LAYOUT_ortho_4x12(
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
||||||
_______, _______, _______, _______, RAISE, _______, _______, LOWER, _______, _______, _______, _______
|
|
||||||
)};
|
)};
|
||||||
|
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
switch(keycode) {
|
switch(keycode) {
|
||||||
case RGB_VAI:
|
case RGB_VAI:
|
||||||
@@ -288,14 +268,9 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
|||||||
rgblight_setrgb_at(0,255,0, 0);
|
rgblight_setrgb_at(0,255,0, 0);
|
||||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||||
break;
|
break;
|
||||||
case _GAMING:
|
default:
|
||||||
rgb_mode = RGBLIGHT_MODE_RAINBOW_SWIRL + 5;
|
|
||||||
autoshift_disable();
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
rgb_mode = RGBLIGHT_MODE_BREATHING + 1;
|
rgb_mode = RGBLIGHT_MODE_BREATHING + 1;
|
||||||
rgblight_mode_noeeprom(rgb_mode);
|
rgblight_mode_noeeprom(rgb_mode);
|
||||||
autoshift_enable();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return state;
|
return state;
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
AUTO_SHIFT_ENABLE = yes
|
|
||||||
AUTO_SHIFT_MODIFIERS = no
|
|
||||||
RGBLIGHT_ENABLE = yes
|
RGBLIGHT_ENABLE = yes
|
||||||
TAP_DANCE_ENABLE = yes
|
TAP_DANCE_ENABLE = yes
|
||||||
|
|
||||||
@@ -5,14 +5,11 @@
|
|||||||
"width": 16,
|
"width": 16,
|
||||||
"height": 5,
|
"height": 5,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT_65_ansi": {
|
||||||
"key_count": 68,
|
|
||||||
"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, "w":2}, {"x":15, "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":15, "y":1}, {"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":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":2.25}, {"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}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"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}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
|
"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, "w":2}, {"x":15, "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":15, "y":1}, {"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":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":2.25}, {"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}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"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}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
|
||||||
},
|
},
|
||||||
|
"LAYOUT_65_iso": {
|
||||||
"LAYOUT_iso": {
|
"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, "w":2}, {"x":15, "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":15, "y":1}, {"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}, {"x":13.75, "y":1, "w":1.25, "h":2}, {"x":15, "y":2}, {"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}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"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}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
|
||||||
"key_count": 69,
|
|
||||||
"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, "w":2}, {"x":15, "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.75, "y":1, "w":1.25, "h":2}, {"x":15, "y":1}, {"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}, {"x":15, "y":2}, {"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}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"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}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
// place overrides here
|
|
||||||
@@ -1,12 +1,25 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 LFKeyboards
|
||||||
|
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
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
enum keymap_layout {
|
// Defines names for use in layer keycodes and the keymap
|
||||||
VANILLA = 0,
|
enum layer_names {
|
||||||
FUNC,
|
_BASE,
|
||||||
SETTINGS,
|
_FN
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
/* Keymap VANILLA: (Base Layer) Default Layer
|
/* Keymap VANILLA: (Base Layer) Default Layer
|
||||||
* ,------------------------------------------------------------.----.
|
* ,------------------------------------------------------------.----.
|
||||||
@@ -21,12 +34,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* |Ctrl|Win |Alt | Space |Alt |Ctrl|Func|Lft| Dn |Rig |
|
* |Ctrl|Win |Alt | Space |Alt |Ctrl|Func|Lft| Dn |Rig |
|
||||||
* `-----------------------------------------------------------------'
|
* `-----------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[VANILLA] = LAYOUT(
|
[_BASE] = LAYOUT_65_ansi(
|
||||||
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_INS, \
|
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_INS,
|
||||||
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_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_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_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_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, MO(FUNC), KC_LEFT, KC_DOWN, KC_RGHT \
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Keymap VANILLA: Function Layer
|
/* Keymap VANILLA: Function Layer
|
||||||
@@ -42,35 +55,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* |Ctrl|Win |Alt | Space |Alt |Ctrl|Func|Lft| Dn |Rig |
|
* |Ctrl|Win |Alt | Space |Alt |Ctrl|Func|Lft| Dn |Rig |
|
||||||
* `-----------------------------------------------------------------'
|
* `-----------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[FUNC] = LAYOUT(
|
[_FN] = LAYOUT_65_ansi(
|
||||||
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_F13, KC_F14, \
|
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_F13, KC_F14,
|
||||||
MU_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, \
|
MU_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG,
|
||||||
AU_TOG, KC_FN1, KC_FN3, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, RGB_MOD, \
|
AU_TOG, KC_FN1, KC_FN3, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, RGB_MOD,
|
||||||
KC_FN5, KC_FN2, KC_FN4, _______, _______, _______, _______, MU_TOG, RGB_VAD, RGB_VAI, _______, _______, RGB_HUI, _______, \
|
KC_FN5, KC_FN2, KC_FN4, _______, _______, _______, _______, MU_TOG, RGB_VAD, RGB_VAI, _______, _______, RGB_HUI, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_SAI \
|
_______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_SAI
|
||||||
),
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifndef NO_ACTION_FUNCTION
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
[1] = ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN1 - Increase Freq of audio click
|
[1] = ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN1 - Increase Freq of audio click
|
||||||
[2] = ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN2 - Decrease Freq of audio click
|
[2] = ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN2 - Decrease Freq of audio click
|
||||||
[3] = ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN3 - Increase length of audio click
|
[3] = ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN3 - Increase length of audio click
|
||||||
[4] = ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN4 - Decrease length of audio click
|
[4] = ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN4 - Decrease length of audio click
|
||||||
[5] = ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click
|
[5] = ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
void matrix_init_user(void) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_scan_user(void) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void led_set_user(uint8_t usb_led) {
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,26 +1,11 @@
|
|||||||
# Build Options
|
# Build Options
|
||||||
# change to "no" to disable the options, or define them in the Makefile in
|
# change yes to no to disable
|
||||||
# the appropriate keymap folder that will get included automatically
|
|
||||||
#
|
#
|
||||||
|
AUDIO_ENABLE = no # Audio output
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
|
||||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
ISSI_ENABLE = no # If the I2C pullup resistors aren't install this must be disabled
|
||||||
MOUSEKEY_ENABLE = no # Mouse keys
|
WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
|
||||||
CONSOLE_ENABLE = no # Console for debug
|
|
||||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
|
||||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
|
||||||
BACKLIGHT_ENABLE = no # Disable keyboard backlight functionality
|
|
||||||
MIDI_ENABLE = no # MIDI controls
|
|
||||||
AUDIO_ENABLE = yes # Audio output on port C6
|
|
||||||
UNICODE_ENABLE = no # Unicode
|
|
||||||
BLUETOOTH_ENABLE = no # Disable Bluetooth with the Adafruit EZ-Key HID
|
|
||||||
RGBLIGHT_ENABLE = yes # Disable RGB underlight
|
|
||||||
RGBLIGHT_CUSTOM_DRIVER = yes # RGB code is implemented in lefkeyboards, not WS2812
|
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
|
||||||
TAP_DANCE_ENABLE = no
|
|
||||||
|
|
||||||
ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled
|
|
||||||
WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
|
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(strip $(ISSI_ENABLE)), yes)
|
ifeq ($(strip $(ISSI_ENABLE)), yes)
|
||||||
@@ -30,4 +15,3 @@ endif
|
|||||||
ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
|
ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
|
||||||
TMK_COMMON_DEFS += -DWATCHDOG_ENABLE
|
TMK_COMMON_DEFS += -DWATCHDOG_ENABLE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
#ifndef CONFIG_USER_H
|
|
||||||
#define CONFIG_USER_H
|
|
||||||
|
|
||||||
#include "../../config.h"
|
|
||||||
|
|
||||||
// place overrides here
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,12 +1,25 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 LFKeyboards
|
||||||
|
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
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
enum keymap_layout {
|
// Defines names for use in layer keycodes and the keymap
|
||||||
VANILLA = 0,
|
enum layer_names {
|
||||||
FUNC,
|
_BASE,
|
||||||
SETTINGS,
|
_FN
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
/* Keymap VANILLA: (Base Layer) Default Layer
|
/* Keymap VANILLA: (Base Layer) Default Layer
|
||||||
* ,------------------------------------------------------------.----.
|
* ,------------------------------------------------------------.----.
|
||||||
@@ -21,12 +34,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* |Ctrl|Win |Alt | Space |Alt |Ctrl|Func|Lft| Dn |Rig |
|
* |Ctrl|Win |Alt | Space |Alt |Ctrl|Func|Lft| Dn |Rig |
|
||||||
* `-----------------------------------------------------------------'
|
* `-----------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[VANILLA] = LAYOUT_iso(
|
[_BASE] = LAYOUT_65_iso(
|
||||||
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_INS, \
|
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_INS,
|
||||||
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_ENT, 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_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_NUHS, 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_NUHS, KC_ENT, KC_PGUP,
|
||||||
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_UP, KC_PGDN, \
|
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_UP, KC_PGDN,
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, MO(FUNC), KC_LEFT, KC_DOWN, KC_RGHT \
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Keymap VANILLA: Function Layer
|
/* Keymap VANILLA: Function Layer
|
||||||
@@ -42,35 +55,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* |Ctrl|Win |Alt | Space |Alt |Ctrl|Func|Lft| Dn |Rig |
|
* |Ctrl|Win |Alt | Space |Alt |Ctrl|Func|Lft| Dn |Rig |
|
||||||
* `-----------------------------------------------------------------'
|
* `-----------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[FUNC] = LAYOUT_iso(
|
[_FN] = LAYOUT_65_iso(
|
||||||
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_F13, KC_F14, \
|
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_F13, KC_F14,
|
||||||
MU_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, RGB_TOG, \
|
MU_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG,
|
||||||
AU_TOG, KC_FN1, KC_FN3, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, \
|
AU_TOG, KC_FN1, KC_FN3, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, RGB_MOD,
|
||||||
KC_FN5, _______, KC_FN2, KC_FN4, _______, _______, _______, _______, MU_TOG, RGB_VAD, RGB_VAI, _______, _______, RGB_HUI, _______, \
|
KC_FN5, _______, KC_FN2, KC_FN4, _______, _______, _______, _______, MU_TOG, RGB_VAD, RGB_VAI, _______, _______, RGB_HUI, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_SAI \
|
_______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_SAI
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifndef NO_ACTION_FUNCTION
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
[1] = ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN1 - Increase Freq of audio click
|
[1] = ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN1 - Increase Freq of audio click
|
||||||
[2] = ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN2 - Decrease Freq of audio click
|
[2] = ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN2 - Decrease Freq of audio click
|
||||||
[3] = ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN3 - Increase length of audio click
|
[3] = ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN3 - Increase length of audio click
|
||||||
[4] = ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN4 - Decrease length of audio click
|
[4] = ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN4 - Decrease length of audio click
|
||||||
[5] = ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click
|
[5] = ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
void matrix_init_user(void) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_scan_user(void) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void led_set_user(uint8_t usb_led) {
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,26 +1,11 @@
|
|||||||
# Build Options
|
# Build Options
|
||||||
# change to "no" to disable the options, or define them in the Makefile in
|
# change yes to no to disable
|
||||||
# the appropriate keymap folder that will get included automatically
|
|
||||||
#
|
#
|
||||||
|
AUDIO_ENABLE = no # Audio output
|
||||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
MOUSEKEY_ENABLE = no # Mouse keys
|
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
|
||||||
CONSOLE_ENABLE = yes # Console for debug
|
|
||||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
|
||||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
|
||||||
# BACKLIGHT_ENABLE = no # Disable keyboard backlight functionality
|
|
||||||
MIDI_ENABLE = no # MIDI controls
|
|
||||||
AUDIO_ENABLE = no # Audio output on port C6
|
|
||||||
UNICODE_ENABLE = no # Unicode
|
|
||||||
BLUETOOTH_ENABLE = no # Disable Bluetooth with the Adafruit EZ-Key HID
|
|
||||||
RGBLIGHT_ENABLE = no # Disable RGB underlight
|
|
||||||
RGBLIGHT_CUSTOM_DRIVER = yes # RGB code is implemented in lefkeyboards, not WS2812
|
|
||||||
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
|
||||||
TAP_DANCE_ENABLE = no
|
|
||||||
|
|
||||||
ISSI_ENABLE = no # If the I2C pullup resistors aren't install this must be disabled
|
ISSI_ENABLE = no # If the I2C pullup resistors aren't install this must be disabled
|
||||||
WATCHDOG_ENABLE = yes # Resets keyboard if matrix_scan isn't run every 250ms
|
WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(strip $(ISSI_ENABLE)), yes)
|
ifeq ($(strip $(ISSI_ENABLE)), yes)
|
||||||
@@ -30,21 +15,3 @@ endif
|
|||||||
ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
|
ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
|
||||||
TMK_COMMON_DEFS += -DWATCHDOG_ENABLE
|
TMK_COMMON_DEFS += -DWATCHDOG_ENABLE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
# # Set the LFK78 hardware version. This is defined in rules.mk, but can be overidden here if desired
|
|
||||||
# #
|
|
||||||
# # RevB - first public release, uses atmega32u4, has audio, ISSI matrix split between RGB and backlight
|
|
||||||
# # RevC/D - at90usb1286, no audio, ISSI device 0 is backlight, 4 is RGB
|
|
||||||
# #
|
|
||||||
# # Set to B, C or D
|
|
||||||
# LFK_REV = D
|
|
||||||
|
|
||||||
# ifeq ($(LFK_REV), B)
|
|
||||||
# MCU = atmega32u4
|
|
||||||
# else
|
|
||||||
# MCU = at90usb1286
|
|
||||||
# endif
|
|
||||||
# OPT_DEFS += -DLFK_REV_$(LFK_REV)
|
|
||||||
# OPT_DEFS += -DUSB_PRODUCT=\"LFK_Rev$(LFK_REV)\"
|
|
||||||
|
|
||||||
@@ -1,14 +1,17 @@
|
|||||||
SMK65
|
# SMK65
|
||||||
===
|
|
||||||
|
|
||||||
65% layout based on Mat3o's Whitefox, but with support for SMK switches.
|
65% layout based on Mat3o's Whitefox, but with support for SMK switches.
|
||||||
|
|
||||||
Keyboard Maintainer: [LFKeyboards](https://github.com/lfkeyboards)
|
* Keyboard Maintainer: [LFKeyboards](https://github.com/lfkeyboards)
|
||||||
Hardware Supported: SMK65
|
* Hardware Supported: SMK65
|
||||||
Hardware Availability: [LFKeyboards.com](https://www.lfkeyboards.com/)
|
* Hardware Availability: [LFKeyboards.com](https://www.lfkeyboards.com/)
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
make lfkeyboards/smk65:default
|
make lfkeyboards/smk65:default
|
||||||
|
|
||||||
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
|
Flashing example for this keyboard:
|
||||||
|
|
||||||
|
make lfkeyboards/smk65: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).
|
||||||
@@ -1,31 +1,27 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
Copyright 2020 LFKeyboards
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation, either version 2 of the License, or
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CONFIG_H
|
#pragma once
|
||||||
#define CONFIG_H
|
|
||||||
|
|
||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
#define VENDOR_ID 0xFEED
|
/* USB Device descriptor parameter */
|
||||||
#define PRODUCT_ID 0x6062
|
#define VENDOR_ID 0x4C46 // "LF"
|
||||||
#define DEVICE_VER 0x0001
|
#define PRODUCT_ID 0x565B // "s65b"
|
||||||
|
#define DEVICE_VER 0x0006
|
||||||
#define MANUFACTURER LFKeyboards
|
#define MANUFACTURER LFKeyboards
|
||||||
#define PRODUCT SMK65v2
|
#define PRODUCT SMK65v2
|
||||||
#define DESCRIPTION QMK keyboard firmware for SMK65
|
|
||||||
|
|
||||||
// RevA
|
// RevA
|
||||||
// #define DIODE_DIRECTION COL2ROW
|
// #define DIODE_DIRECTION COL2ROW
|
||||||
@@ -66,13 +62,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||||
//#define MATRIX_HAS_GHOST
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
/* number of backlight levels */
|
|
||||||
|
|
||||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
#define LOCKING_SUPPORT_ENABLE
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
/* Locking resynchronize hack */
|
/* Locking resynchronize hack */
|
||||||
#define LOCKING_RESYNC_ENABLE
|
#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
|
||||||
*
|
*
|
||||||
@@ -94,54 +93,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
//#define FORCE_NKRO
|
//#define FORCE_NKRO
|
||||||
|
|
||||||
/*
|
|
||||||
* Magic Key Options
|
|
||||||
*
|
|
||||||
* Magic keys are hotkey commands that allow control over firmware functions of
|
|
||||||
* the keyboard. They are best used in combination with the HID Listen program,
|
|
||||||
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
|
||||||
*
|
|
||||||
* The options below allow the magic key functionality to be changed. This is
|
|
||||||
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* control how magic key switches layers */
|
|
||||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
|
||||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
|
||||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
|
||||||
|
|
||||||
/* override magic key keymap */
|
|
||||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
|
||||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
|
||||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
|
||||||
//#define MAGIC_KEY_HELP1 H
|
|
||||||
//#define MAGIC_KEY_HELP2 SLASH
|
|
||||||
//#define MAGIC_KEY_DEBUG D
|
|
||||||
//#define MAGIC_KEY_DEBUG_MATRIX X
|
|
||||||
//#define MAGIC_KEY_DEBUG_KBD K
|
|
||||||
//#define MAGIC_KEY_DEBUG_MOUSE M
|
|
||||||
//#define MAGIC_KEY_VERSION V
|
|
||||||
//#define MAGIC_KEY_STATUS S
|
|
||||||
//#define MAGIC_KEY_CONSOLE C
|
|
||||||
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
|
||||||
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
|
||||||
//#define MAGIC_KEY_LAYER0 0
|
|
||||||
//#define MAGIC_KEY_LAYER1 1
|
|
||||||
//#define MAGIC_KEY_LAYER2 2
|
|
||||||
//#define MAGIC_KEY_LAYER3 3
|
|
||||||
//#define MAGIC_KEY_LAYER4 4
|
|
||||||
//#define MAGIC_KEY_LAYER5 5
|
|
||||||
//#define MAGIC_KEY_LAYER6 6
|
|
||||||
//#define MAGIC_KEY_LAYER7 7
|
|
||||||
//#define MAGIC_KEY_LAYER8 8
|
|
||||||
//#define MAGIC_KEY_LAYER9 9
|
|
||||||
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
|
||||||
//#define MAGIC_KEY_LOCK CAPS
|
|
||||||
//#define MAGIC_KEY_EEPROM E
|
|
||||||
//#define MAGIC_KEY_NKRO N
|
|
||||||
//#define MAGIC_KEY_SLEEP_LED Z
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Feature disable options
|
* Feature disable options
|
||||||
* These options are also useful to firmware size reduction.
|
* These options are also useful to firmware size reduction.
|
||||||
@@ -160,4 +111,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
//#define NO_ACTION_MACRO
|
//#define NO_ACTION_MACRO
|
||||||
//#define NO_ACTION_FUNCTION
|
//#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
#endif
|
/* Bootmagic Lite key configuration */
|
||||||
|
//#define BOOTMAGIC_LITE_ROW 0
|
||||||
|
//#define BOOTMAGIC_LITE_COLUMN 0
|
||||||
@@ -1,3 +1,17 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 LFKeyboards
|
||||||
|
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 <avr/sfr_defs.h>
|
#include <avr/sfr_defs.h>
|
||||||
#include <avr/timer_avr.h>
|
#include <avr/timer_avr.h>
|
||||||
#include <avr/wdt.h>
|
#include <avr/wdt.h>
|
||||||
@@ -132,13 +146,6 @@ void reset_keyboard_kb(){
|
|||||||
reset_keyboard();
|
reset_keyboard();
|
||||||
}
|
}
|
||||||
|
|
||||||
void led_set_kb(uint8_t usb_led)
|
|
||||||
{
|
|
||||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
|
||||||
|
|
||||||
led_set_user(usb_led);
|
|
||||||
}
|
|
||||||
|
|
||||||
// LFK lighting info
|
// LFK lighting info
|
||||||
const uint8_t switch_matrices[] = {0, 1};
|
const uint8_t switch_matrices[] = {0, 1};
|
||||||
const uint8_t rgb_matrices[] = {6, 7};
|
const uint8_t rgb_matrices[] = {6, 7};
|
||||||
@@ -0,0 +1,134 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 LFKeyboards
|
||||||
|
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
|
||||||
|
|
||||||
|
/* if the kb.h file exists (because we're running from qmkbuilder) include it */
|
||||||
|
#ifdef __has_include
|
||||||
|
#if __has_include("kb.h")
|
||||||
|
#include "kb.h"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
#include "matrix.h"
|
||||||
|
#include <avr/sfr_defs.h>
|
||||||
|
|
||||||
|
#ifndef cbi
|
||||||
|
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef sbi
|
||||||
|
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct RGB_Color {
|
||||||
|
uint16_t red;
|
||||||
|
uint16_t green;
|
||||||
|
uint16_t blue;
|
||||||
|
} RGB_Color;
|
||||||
|
|
||||||
|
typedef struct Layer_Info {
|
||||||
|
uint32_t layer;
|
||||||
|
uint32_t mask;
|
||||||
|
RGB_Color color;
|
||||||
|
} Layer_Info;
|
||||||
|
|
||||||
|
extern const uint32_t layer_count;
|
||||||
|
extern const Layer_Info layer_info[];
|
||||||
|
|
||||||
|
enum action_functions {
|
||||||
|
LFK_CLEAR = 0, // Resets all layers
|
||||||
|
LFK_ESC_TILDE, // esc+lshift = ~
|
||||||
|
LFK_SET_DEFAULT_LAYER, // changes and saves current base layer to eeprom
|
||||||
|
LFK_CLICK_TOGGLE, // Adjusts click duration
|
||||||
|
LFK_CLICK_FREQ_HIGHER, // Adjusts click frequency
|
||||||
|
LFK_CLICK_FREQ_LOWER, // Adjusts click frequency
|
||||||
|
LFK_CLICK_TIME_LONGER, // Adjusts click duration
|
||||||
|
LFK_CLICK_TIME_SHORTER, // Adjusts click duration
|
||||||
|
LFK_DEBUG_SETTINGS, // prints LED and click settings to HID
|
||||||
|
LFK_LED_TEST // cycles through switch and RGB LEDs
|
||||||
|
};
|
||||||
|
|
||||||
|
#define CLICK_HZ 500
|
||||||
|
#define CLICK_MS 2
|
||||||
|
#define CLICK_ENABLED 0
|
||||||
|
|
||||||
|
void reset_keyboard_kb(void);
|
||||||
|
void click(uint16_t freq, uint16_t duration);
|
||||||
|
|
||||||
|
// readability
|
||||||
|
#define ___ KC_NO
|
||||||
|
|
||||||
|
/* Vanilla Keymap */
|
||||||
|
// This a shortcut to help you visually see your layout.
|
||||||
|
/*
|
||||||
|
* ,-------------------------------------------------------------------------------.
|
||||||
|
* | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1A | 1B | 1C | 1D | 1E | 1G |
|
||||||
|
* |-------------------------------------------------------------------------------|
|
||||||
|
* | 21 | 22 |23 | 24 | 25 | 26 | 27 | 28 | 29 | 2A | 2B | 2C | 2D | 2F | 2G |
|
||||||
|
* |-------------------------------------------------------------------------------|
|
||||||
|
* | 31 | 32 |33 | 34 | 35 | 36 | 37 | 38 | 39 | 3A | 3B | 3C | 3F | 3G |
|
||||||
|
* |-------------------------------------------------------------------------------|
|
||||||
|
* | 41 | 42 |43 | 45 | 46 | 47 | 48 | 49 | 4A | 4B | 4C | 4D | 4F | 4G |
|
||||||
|
* |-------------------------------------------------------------------------------|
|
||||||
|
* | 51 | 52 | 53 | 57 | 5A | 5B | 5C | 5D | 5E | 3E | 4E |
|
||||||
|
* `-------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
// The first section contains all of the arguements
|
||||||
|
// The second converts the arguments into a two-dimensional array
|
||||||
|
#define LAYOUT_65_ansi( \
|
||||||
|
k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, k1G, \
|
||||||
|
k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2F, k2G, \
|
||||||
|
k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3F, k3G, \
|
||||||
|
k41, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4F, k4G, \
|
||||||
|
k51, k52, k53, k57, k5B, k5C, k5D, k5E, k3E, k4E \
|
||||||
|
) { \
|
||||||
|
{ k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, ___, k1F, k1G }, \
|
||||||
|
{ k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, ___, k2F, k2G }, \
|
||||||
|
{ k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, ___, k3E, k3F, k3G }, \
|
||||||
|
{ k41, ___, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G }, \
|
||||||
|
{ k51, k52, k53, ___, ___, ___, k57, ___, ___, ___, k5B, k5C, k5D, k5E, ___, ___ }, \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_65_iso( \
|
||||||
|
k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, k1G, \
|
||||||
|
k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2G, \
|
||||||
|
k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3F, k2F, k3G, \
|
||||||
|
k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4F, k4G, \
|
||||||
|
k51, k52, k53, k57, k5B, k5C, k5D, k5E, k3E, k4E \
|
||||||
|
) { \
|
||||||
|
{ k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, ___, k1F, k1G }, \
|
||||||
|
{ k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, ___, k2F, k2G }, \
|
||||||
|
{ k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, ___, k3E, k3F, k3G }, \
|
||||||
|
{ k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G }, \
|
||||||
|
{ k51, k52, k53, ___, ___, ___, k57, ___, ___, ___, k5B, k5C, k5D, k5E, ___, ___ }, \
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: remove backwards compatibility with previous keymaps
|
||||||
|
#define LAYOUT LAYOUT_65_ansi
|
||||||
|
#define LAYOUT_iso( \
|
||||||
|
k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1G, \
|
||||||
|
k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2F, k2G, \
|
||||||
|
k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3F, k3G, \
|
||||||
|
k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4F, k4G, \
|
||||||
|
k51, k52, k53, k57, k5B, k5C, k5D, k5E, k3E, k4E \
|
||||||
|
) { \
|
||||||
|
{ k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, ___, k1G }, \
|
||||||
|
{ k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, ___, k2F, k2G }, \
|
||||||
|
{ k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, ___, k3E, k3F, k3G }, \
|
||||||
|
{ k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G }, \
|
||||||
|
{ k51, k52, k53, ___, ___, ___, k57, ___, ___, ___, k5B, k5C, k5D, k5E, ___, ___ }, \
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = at90usb646
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
RGBLIGHT_CUSTOM_DRIVER = yes # RGB code is implemented in lefkeyboards, not WS2812
|
||||||
|
AUDIO_ENABLE = no # Audio output
|
||||||
|
|
||||||
|
# Extra source files for IS3731 lighting
|
||||||
|
SRC += TWIlib.c issi.c lighting.c
|
||||||
@@ -0,0 +1,134 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 LFKeyboards
|
||||||
|
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 0x4C46 // "LF"
|
||||||
|
#define PRODUCT_ID 0x565F // "s65f"
|
||||||
|
#define DEVICE_VER 0x0006
|
||||||
|
#define MANUFACTURER LFKeyboards
|
||||||
|
#define PRODUCT SMK65v2
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 16
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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, B3, B2, B1, F5 }
|
||||||
|
#define MATRIX_COL_PINS { E6, F4, B7, D5, D3, D2, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
//#define RGB_DI_PIN E2
|
||||||
|
//#ifdef RGB_DI_PIN
|
||||||
|
# define RGBLED_NUM 28
|
||||||
|
//# 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
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 LFKeyboards
|
||||||
|
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_all(
|
||||||
|
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_BSPC, KC_INS,
|
||||||
|
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_BSLS, KC_ENT, KC_PGUP,
|
||||||
|
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_UP, KC_PGDN,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
|
),
|
||||||
|
[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_F13, KC_F14, KC_F15,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[2] = LAYOUT_all(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[3] = LAYOUT_all(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 LFKeyboards
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
// readability
|
||||||
|
#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_65_ansi( \
|
||||||
|
k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, k1G, \
|
||||||
|
k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2F, k2G, \
|
||||||
|
k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3F, k3G, \
|
||||||
|
k41, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4F, k4G, \
|
||||||
|
k51, k52, k53, k57, k5B, k5C, k5D, k5E, k3E, k4E \
|
||||||
|
) { \
|
||||||
|
{ k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, ___, k1F, k1G }, \
|
||||||
|
{ k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, ___, k2F, k2G }, \
|
||||||
|
{ k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, ___, k3E, k3F, k3G }, \
|
||||||
|
{ k41, ___, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G }, \
|
||||||
|
{ k51, k52, k53, ___, ___, ___, k57, ___, ___, ___, k5B, k5C, k5D, k5E, ___, ___ }, \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_65_iso( \
|
||||||
|
k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, k1G, \
|
||||||
|
k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2G, \
|
||||||
|
k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k2F, k3G, \
|
||||||
|
k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4F, k4G, \
|
||||||
|
k51, k52, k53, k57, k5B, k5C, k5D, k5E, k3E, k4E \
|
||||||
|
) { \
|
||||||
|
{ k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, ___, k1F, k1G }, \
|
||||||
|
{ k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, ___, k2F, k2G }, \
|
||||||
|
{ k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, ___, k3G }, \
|
||||||
|
{ k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G }, \
|
||||||
|
{ k51, k52, k53, ___, ___, ___, k57, ___, ___, ___, k5B, k5C, k5D, k5E, ___, ___ }, \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_all( \
|
||||||
|
k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G, \
|
||||||
|
k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2F, k2G, \
|
||||||
|
k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, k3G, \
|
||||||
|
k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4F, k4G, \
|
||||||
|
k51, k52, k53, k55, k57, k59, k5B, k5C, k5D, k5E, k3E, k4E \
|
||||||
|
) { \
|
||||||
|
{ k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G }, \
|
||||||
|
{ k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, ___, k2F, k2G }, \
|
||||||
|
{ k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, k3G }, \
|
||||||
|
{ k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G }, \
|
||||||
|
{ k51, k52, k53, ___, k55, ___, k57, ___, k59, ___, k5B, k5C, k5D, k5E, ___, ___ }, \
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = halfkay
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
RGBLIGHT_ENABLE = no # TODO: Enable keyboard RGB underglow
|
||||||
|
RGBLIGHT_CUSTOM_DRIVER = yes # RGB code is implemented in lefkeyboards, not WS2812
|
||||||
@@ -1,15 +1,20 @@
|
|||||||
# MCU name
|
# Build Options
|
||||||
MCU = at90usb646
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
# 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 = yes # 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
|
||||||
|
|
||||||
# Bootloader selection
|
DEFAULT_FOLDER = lfkeyboards/smk65/revb
|
||||||
# Teensy halfkay
|
|
||||||
# Pro Micro caterina
|
|
||||||
# Atmel DFU atmel-dfu
|
|
||||||
# LUFA DFU lufa-dfu
|
|
||||||
# QMK DFU qmk-dfu
|
|
||||||
# ATmega32A bootloadHID
|
|
||||||
# ATmega328P USBasp
|
|
||||||
BOOTLOADER = atmel-dfu
|
|
||||||
|
|
||||||
# Extra source files for IS3731 lighting
|
LAYOUTS = 65_ansi 65_iso
|
||||||
SRC = TWIlib.c issi.c lighting.c
|
|
||||||
@@ -1,107 +1,23 @@
|
|||||||
#ifndef SMK65_H
|
/*
|
||||||
#define SMK65_H
|
Copyright 2020 LFKeyboards
|
||||||
|
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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
/* if the kb.h file exists (because we're running from qmkbuilder) include it */
|
#pragma once
|
||||||
#ifdef __has_include
|
|
||||||
#if __has_include("kb.h")
|
|
||||||
#include "kb.h"
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
#include "matrix.h"
|
|
||||||
#include <avr/sfr_defs.h>
|
|
||||||
|
|
||||||
#ifndef cbi
|
#ifdef KEYBOARD_lfkeyboards_smk65_revb
|
||||||
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
|
#include "revb.h"
|
||||||
|
#elif KEYBOARD_lfkeyboards_smk65_revf
|
||||||
|
#include "revf.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef sbi
|
|
||||||
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct RGB_Color {
|
|
||||||
uint16_t red;
|
|
||||||
uint16_t green;
|
|
||||||
uint16_t blue;
|
|
||||||
} RGB_Color;
|
|
||||||
|
|
||||||
typedef struct Layer_Info {
|
|
||||||
uint32_t layer;
|
|
||||||
uint32_t mask;
|
|
||||||
RGB_Color color;
|
|
||||||
} Layer_Info;
|
|
||||||
|
|
||||||
extern const uint32_t layer_count;
|
|
||||||
extern const Layer_Info layer_info[];
|
|
||||||
|
|
||||||
enum action_functions {
|
|
||||||
LFK_CLEAR = 0, // Resets all layers
|
|
||||||
LFK_ESC_TILDE, // esc+lshift = ~
|
|
||||||
LFK_SET_DEFAULT_LAYER, // changes and saves current base layer to eeprom
|
|
||||||
LFK_CLICK_TOGGLE, // Adjusts click duration
|
|
||||||
LFK_CLICK_FREQ_HIGHER, // Adjusts click frequency
|
|
||||||
LFK_CLICK_FREQ_LOWER, // Adjusts click frequency
|
|
||||||
LFK_CLICK_TIME_LONGER, // Adjusts click duration
|
|
||||||
LFK_CLICK_TIME_SHORTER, // Adjusts click duration
|
|
||||||
LFK_DEBUG_SETTINGS, // prints LED and click settings to HID
|
|
||||||
LFK_LED_TEST // cycles through switch and RGB LEDs
|
|
||||||
};
|
|
||||||
|
|
||||||
#define CLICK_HZ 500
|
|
||||||
#define CLICK_MS 2
|
|
||||||
#define CLICK_ENABLED 0
|
|
||||||
|
|
||||||
void reset_keyboard_kb(void);
|
|
||||||
void click(uint16_t freq, uint16_t duration);
|
|
||||||
|
|
||||||
// readability
|
|
||||||
#define ___ KC_NO
|
|
||||||
|
|
||||||
/* Vanilla Keymap */
|
|
||||||
// This a shortcut to help you visually see your layout.
|
|
||||||
/*
|
|
||||||
* ,-------------------------------------------------------------------------------.
|
|
||||||
* | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1A | 1B | 1C | 1D | 1E | 1G |
|
|
||||||
* |-------------------------------------------------------------------------------|
|
|
||||||
* | 21 | 22 |23 | 24 | 25 | 26 | 27 | 28 | 29 | 2A | 2B | 2C | 2D | 2F | 2G |
|
|
||||||
* |-------------------------------------------------------------------------------|
|
|
||||||
* | 31 | 32 |33 | 34 | 35 | 36 | 37 | 38 | 39 | 3A | 3B | 3C | 3F | 3G |
|
|
||||||
* |-------------------------------------------------------------------------------|
|
|
||||||
* | 41 | 42 |43 | 45 | 46 | 47 | 48 | 49 | 4A | 4B | 4C | 4D | 4F | 4G |
|
|
||||||
* |-------------------------------------------------------------------------------|
|
|
||||||
* | 51 | 52 | 53 | 57 | 5A | 5B | 5C | 5D | 5E | 3E | 4E |
|
|
||||||
* `-------------------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
// The first section contains all of the arguements
|
|
||||||
// The second converts the arguments into a two-dimensional array
|
|
||||||
#define LAYOUT( \
|
|
||||||
k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, k1G, \
|
|
||||||
k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2F, k2G, \
|
|
||||||
k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3F, k3G, \
|
|
||||||
k41, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4F, k4G, \
|
|
||||||
k51, k52, k53, k57, k5B, k5C, k5D, k5E, k3E, k4E \
|
|
||||||
) { \
|
|
||||||
{ k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, ___, k1F, k1G }, \
|
|
||||||
{ k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, ___, k2F, k2G }, \
|
|
||||||
{ k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, ___, k3E, k3F, k3G }, \
|
|
||||||
{ k41, ___, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G }, \
|
|
||||||
{ k51, k52, k53, ___, ___, ___, k57, ___, ___, ___, k5B, k5C, k5D, k5E, ___, ___ }, \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define LAYOUT_iso( \
|
|
||||||
k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1G, \
|
|
||||||
k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2F, k2G, \
|
|
||||||
k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3F, k3G, \
|
|
||||||
k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4F, k4G, \
|
|
||||||
k51, k52, k53, k57, k5B, k5C, k5D, k5E, k3E, k4E \
|
|
||||||
) { \
|
|
||||||
{ k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, ___, k1G }, \
|
|
||||||
{ k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, ___, k2F, k2G }, \
|
|
||||||
{ k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, ___, k3E, k3F, k3G }, \
|
|
||||||
{ k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G }, \
|
|
||||||
{ k51, k52, k53, ___, ___, ___, k57, ___, ___, ___, k5B, k5C, k5D, k5E, ___, ___ }, \
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif //SMK65_H
|
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
/* Copyright 2020 Chus Jara Peinado
|
||||||
|
*
|
||||||
|
* 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] = {
|
||||||
|
|
||||||
|
/* Layer 0
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Esc | A | S | D | F | G | H | J | K | L | ; |Enter |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| Z | X | C | V | B | N | M | , | . | Up | ? |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Ctrl | GUI | Alt | " |Layer1| Space |Layer2| - | Left | Down |Right |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[0] = LAYOUT_planck_mit(
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||||
|
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_QUOT, MO(1), KC_SPC, MO(2), KC_MINS, KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Layer 1
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | F11 | F12 | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | |Reset |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[1] = LAYOUT_planck_mit(
|
||||||
|
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,
|
||||||
|
_______, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Layer 2 (r_ Indicates RGB Controls)
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | | | | | | [ | ] | \ | " | | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | | | | | | - | = | | | Vol+ |PrtScr|
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | Vol- | Mute |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[2] = LAYOUT_planck_mit(
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_BSLS, KC_QUOT, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, _______, KC_VOLU, KC_PSCR,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_MUTE
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# Dye sub layout
|
||||||
|
|
||||||
|
Simple layout based on the keycaps [DYE SUB](https://kbdfans.com/collections/oem-profile/products/40-layou-dye-sub-keycaps) from KDBFans.
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
- There is a different ESC key position in this layout.
|
||||||
|
- The mouse key, backlight and console for debug are disabled (Enable them by just modifying the `rules.mk` file).
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
MOUSEKEY_ENABLE = no
|
||||||
|
BACKLIGHT_ENABLE = no
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
/* Soy20 PCB}}
|
||||||
|
Copyright (C) {{ 2020 }} {{ Drewkeys }}
|
||||||
|
|
||||||
|
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 "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0x4452 // "DR" short for DrewKeys
|
||||||
|
#define PRODUCT_ID 0x534f // "SO" short for Soy
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER drewkeys
|
||||||
|
#define PRODUCT soy20
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 4
|
||||||
|
|
||||||
|
/* key matrix pins */
|
||||||
|
#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 }
|
||||||
|
#define MATRIX_COL_PINS { B5, B6, B7, C7 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
#ifdef RGB_DI_PIN
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLED_NUM 0
|
||||||
|
#define RGBLIGHT_HUE_STEP 8
|
||||||
|
#define RGBLIGHT_SAT_STEP 8
|
||||||
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Soy20",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "twholt",
|
||||||
|
"width": 4,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_ortho_5x4": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"K00 (B0,B5)", "x":0, "y":0},
|
||||||
|
{"label":"K01 (B0,B6)", "x":1, "y":0},
|
||||||
|
{"label":"K02 (B0,B7)", "x":2, "y":0},
|
||||||
|
{"label":"K03 (B0,C7)", "x":3, "y":0},
|
||||||
|
{"label":"K10 (B1,B5)", "x":0, "y":1},
|
||||||
|
{"label":"K11 (B1,B6)", "x":1, "y":1},
|
||||||
|
{"label":"K12 (B1,B7)", "x":2, "y":1},
|
||||||
|
{"label":"K13 (B1,C7)", "x":3, "y":1},
|
||||||
|
{"label":"K20 (B2,B5)", "x":0, "y":2},
|
||||||
|
{"label":"K21 (B2,B6)", "x":1, "y":2},
|
||||||
|
{"label":"K22 (B2,B7)", "x":2, "y":2},
|
||||||
|
{"label":"K23 (B2,C7)", "x":3, "y":2},
|
||||||
|
{"label":"K30 (B3,B5)", "x":0, "y":3},
|
||||||
|
{"label":"K31 (B3,B6)", "x":1, "y":3},
|
||||||
|
{"label":"K32 (B3,B7)", "x":2, "y":3},
|
||||||
|
{"label":"K33 (B3,C7)", "x":3, "y":3},
|
||||||
|
{"label":"K40 (B4,B5)", "x":0, "y":4},
|
||||||
|
{"label":"K41 (B4,B6)", "x":1, "y":4},
|
||||||
|
{"label":"K42 (B4,B7)", "x":2, "y":4},
|
||||||
|
{"label":"K43 (B4,C7)", "x":3, "y":4}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[0] = LAYOUT_ortho_5x4(
|
||||||
|
KC_PMNS, KC_PAST, KC_PSLS, MO(1),
|
||||||
|
KC_PPLS, KC_P9, KC_P8, KC_P7,
|
||||||
|
KC_TAB, KC_P5, KC_P6, KC_P4,
|
||||||
|
KC_PENT, KC_P3, KC_P2, KC_P1,
|
||||||
|
KC_DEL, KC_SCLN, KC_PDOT, KC_P0),
|
||||||
|
|
||||||
|
[1] = LAYOUT_ortho_5x4(
|
||||||
|
KC_NLCK, KC_PSCR, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, RESET),
|
||||||
|
|
||||||
|
};
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[0] = LAYOUT_ortho_5x4(
|
||||||
|
KC_PMNS, KC_PAST, KC_PSLS, MO(1),
|
||||||
|
KC_PPLS, KC_P9, KC_P8, KC_P7,
|
||||||
|
KC_TAB, KC_P5, KC_P6, KC_P4,
|
||||||
|
KC_PENT, KC_P3, KC_P2, KC_P1,
|
||||||
|
KC_DEL, KC_SCLN, KC_PDOT, KC_P0),
|
||||||
|
|
||||||
|
[1] = LAYOUT_ortho_5x4(
|
||||||
|
KC_NLCK, KC_PSCR, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, RESET),
|
||||||
|
|
||||||
|
[2] = LAYOUT_ortho_5x4(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
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_ortho_5x4(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
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,2 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
|
LTO_ENABLE = yes
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Soy20
|
||||||
|
|
||||||
|
A 4x5 keypad created by drewkeys
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [Friend-Or-F0H](https://github.com/Friend-Or-F0H)
|
||||||
|
* Hardware Supported: drewkeys Soy20 PCB
|
||||||
|
* Hardware Availability: Limited GB
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make soy20: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).
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u2
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # 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 = yes # 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
|
||||||
|
|
||||||
|
LAYOUTS = ortho_5x4
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
/* Soy20 PCB}}
|
||||||
|
Copyright (C) {{ 2020 }} {{ Drewkeys }}
|
||||||
|
|
||||||
|
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 "soy20.h"
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
/* Soy20 PCB}}
|
||||||
|
Copyright (C) {{ 2020 }} {{ Drewkeys }}
|
||||||
|
|
||||||
|
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 "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT_ortho_5x4( \
|
||||||
|
K00, K01, K02, K03, \
|
||||||
|
K10, K11, K12, K13, \
|
||||||
|
K20, K21, K22, K23, \
|
||||||
|
K30, K31, K32, K33, \
|
||||||
|
K40, K41, K42, K43 \
|
||||||
|
) { \
|
||||||
|
{ K00, K01, K02, K03 }, \
|
||||||
|
{ K10, K11, K12, K13 }, \
|
||||||
|
{ K20, K21, K22, K23 }, \
|
||||||
|
{ K30, K31, K32, K33 }, \
|
||||||
|
{ K40, K41, K42, K43 } \
|
||||||
|
}
|
||||||
@@ -3,7 +3,10 @@
|
|||||||
75% keyboard from YMDK. YMDK sell the board and name it "YMD75", however revision 1 of the PCB has "MT84" printed on both sides.
|
75% keyboard from YMDK. YMDK sell the board and name it "YMD75", however revision 1 of the PCB has "MT84" printed on both sides.
|
||||||
|
|
||||||
* Keyboard Maintainer: [Wayne K Jones](github.com/WarmCatUK)
|
* Keyboard Maintainer: [Wayne K Jones](github.com/WarmCatUK)
|
||||||
* Hardware Supported: YMD75/MT84 (rev1 and rev2) with the ATmega32a chip.
|
* Hardware Supported:
|
||||||
|
- rev1 (ATmega32a)
|
||||||
|
- rev2 (ATmega32a)
|
||||||
|
- rev3 (ATmega32u4)
|
||||||
* Hardware Availability: <https://www.aliexpress.com/item/32812690592.html>
|
* Hardware Availability: <https://www.aliexpress.com/item/32812690592.html>
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|||||||
@@ -23,12 +23,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define VENDOR_ID 0x20A0
|
#define VENDOR_ID 0x20A0
|
||||||
#define PRODUCT_ID 0x422D
|
#define PRODUCT_ID 0x422D
|
||||||
#define DEVICE_VER 0x0200
|
|
||||||
|
|
||||||
#define MANUFACTURER YMDK
|
#define MANUFACTURER YMDK
|
||||||
#define PRODUCT YMD75 / MT84
|
#define PRODUCT YMD75 / MT84
|
||||||
#define DESCRIPTION 75% Keyboard
|
|
||||||
|
|
||||||
|
|
||||||
#define BACKLIGHT_PIN D4
|
#define BACKLIGHT_PIN D4
|
||||||
#define BACKLIGHT_LEVELS 12
|
#define BACKLIGHT_LEVELS 12
|
||||||
|
|||||||
@@ -6,7 +6,92 @@
|
|||||||
"height": 6,
|
"height": 6,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Fn", "x":15, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Home", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"End", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"Page Up", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"Page Down", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"GUI", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5}, {"label":"Fn", "x":11, "y":5}, {"label":"Ctrl", "x":12, "y":5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}]
|
"layout": [
|
||||||
|
{"label":"Esc", "x":0, "y":0},
|
||||||
|
{"label":"F1", "x":1, "y":0},
|
||||||
|
{"label":"F2", "x":2, "y":0},
|
||||||
|
{"label":"F3", "x":3, "y":0},
|
||||||
|
{"label":"F4", "x":4, "y":0},
|
||||||
|
{"label":"F5", "x":5, "y":0},
|
||||||
|
{"label":"F6", "x":6, "y":0},
|
||||||
|
{"label":"F7", "x":7, "y":0},
|
||||||
|
{"label":"F8", "x":8, "y":0},
|
||||||
|
{"label":"F9", "x":9, "y":0},
|
||||||
|
{"label":"F10", "x":10, "y":0},
|
||||||
|
{"label":"F11", "x":11, "y":0},
|
||||||
|
{"label":"F12", "x":12, "y":0},
|
||||||
|
{"label":"PrtSc", "x":13, "y":0},
|
||||||
|
{"label":"Del", "x":14, "y":0},
|
||||||
|
{"label":"Fn", "x":15, "y":0},
|
||||||
|
{"label":"~", "x":0, "y":1},
|
||||||
|
{"label":"!", "x":1, "y":1},
|
||||||
|
{"label":"@", "x":2, "y":1},
|
||||||
|
{"label":"#", "x":3, "y":1},
|
||||||
|
{"label":"$", "x":4, "y":1},
|
||||||
|
{"label":"%", "x":5, "y":1},
|
||||||
|
{"label":"^", "x":6, "y":1},
|
||||||
|
{"label":"&", "x":7, "y":1},
|
||||||
|
{"label":"*", "x":8, "y":1},
|
||||||
|
{"label":"(", "x":9, "y":1},
|
||||||
|
{"label":")", "x":10, "y":1},
|
||||||
|
{"label":"_", "x":11, "y":1},
|
||||||
|
{"label":"+", "x":12, "y":1},
|
||||||
|
{"label":"Backspace", "x":13, "y":1, "w":2},
|
||||||
|
{"label":"Home", "x":15, "y":1},
|
||||||
|
{"label":"Tab", "x":0, "y":2, "w":1.5},
|
||||||
|
{"label":"Q", "x":1.5, "y":2},
|
||||||
|
{"label":"W", "x":2.5, "y":2},
|
||||||
|
{"label":"E", "x":3.5, "y":2},
|
||||||
|
{"label":"R", "x":4.5, "y":2},
|
||||||
|
{"label":"T", "x":5.5, "y":2},
|
||||||
|
{"label":"Y", "x":6.5, "y":2},
|
||||||
|
{"label":"U", "x":7.5, "y":2},
|
||||||
|
{"label":"I", "x":8.5, "y":2},
|
||||||
|
{"label":"O", "x":9.5, "y":2},
|
||||||
|
{"label":"P", "x":10.5, "y":2},
|
||||||
|
{"label":"{", "x":11.5, "y":2},
|
||||||
|
{"label":"}", "x":12.5, "y":2},
|
||||||
|
{"label":"|", "x":13.5, "y":2, "w":1.5},
|
||||||
|
{"label":"End", "x":15, "y":2},
|
||||||
|
{"label":"Caps Lock", "x":0, "y":3, "w":1.75},
|
||||||
|
{"label":"A", "x":1.75, "y":3},
|
||||||
|
{"label":"S", "x":2.75, "y":3},
|
||||||
|
{"label":"D", "x":3.75, "y":3},
|
||||||
|
{"label":"F", "x":4.75, "y":3},
|
||||||
|
{"label":"G", "x":5.75, "y":3},
|
||||||
|
{"label":"H", "x":6.75, "y":3},
|
||||||
|
{"label":"J", "x":7.75, "y":3},
|
||||||
|
{"label":"K", "x":8.75, "y":3},
|
||||||
|
{"label":"L", "x":9.75, "y":3},
|
||||||
|
{"label":":", "x":10.75, "y":3},
|
||||||
|
{"label":"\"", "x":11.75, "y":3},
|
||||||
|
{"label":"Enter", "x":12.75, "y":3, "w":2.25},
|
||||||
|
{"label":"Page Up", "x":15, "y":3},
|
||||||
|
{"label":"Shift", "x":0, "y":4, "w":2.25},
|
||||||
|
{"label":"Z", "x":2.25, "y":4},
|
||||||
|
{"label":"X", "x":3.25, "y":4},
|
||||||
|
{"label":"C", "x":4.25, "y":4},
|
||||||
|
{"label":"V", "x":5.25, "y":4},
|
||||||
|
{"label":"B", "x":6.25, "y":4},
|
||||||
|
{"label":"N", "x":7.25, "y":4},
|
||||||
|
{"label":"M", "x":8.25, "y":4},
|
||||||
|
{"label":"<", "x":9.25, "y":4},
|
||||||
|
{"label":">", "x":10.25, "y":4},
|
||||||
|
{"label":"?", "x":11.25, "y":4},
|
||||||
|
{"label":"Shift", "x":12.25, "y":4, "w":1.75},
|
||||||
|
{"label":"\u2191", "x":14, "y":4},
|
||||||
|
{"label":"Page Down", "x":15, "y":4},
|
||||||
|
{"label":"Ctrl", "x":0, "y":5, "w":1.25},
|
||||||
|
{"label":"GUI", "x":1.25, "y":5, "w":1.25},
|
||||||
|
{"label":"Alt", "x":2.5, "y":5, "w":1.25},
|
||||||
|
{"x":3.75, "y":5, "w":6.25},
|
||||||
|
{"label":"Alt", "x":10, "y":5},
|
||||||
|
{"label":"Fn", "x":11, "y":5},
|
||||||
|
{"label":"Ctrl", "x":12, "y":5},
|
||||||
|
{"label":"\u2190", "x":13, "y":5},
|
||||||
|
{"label":"\u2193", "x":14, "y":5},
|
||||||
|
{"label":"\u2192", "x":15, "y":5}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"LAYOUT_75_iso": {
|
"LAYOUT_75_iso": {
|
||||||
"layout": [
|
"layout": [
|
||||||
|
|||||||
@@ -20,15 +20,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
[1] = LAYOUT_75_iso(
|
[1] = LAYOUT_75_iso(
|
||||||
/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */
|
/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT,
|
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT,
|
||||||
/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┤ */
|
/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┤ */
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU,
|
||||||
/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */
|
/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD,
|
RGB_MOD, RGB_TOG, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, KC_VOLD,
|
||||||
/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬ ├─────────┤ */
|
/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬ ├─────────┤ */
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
/* ├───────────┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴─────────┴─┬─────────┼─────────┤ */
|
/* ├───────────┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴─────────┴─┬─────────┼─────────┤ */
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, _______, _______, _______, _______, _______, _______, _______,
|
||||||
/* ├───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ */
|
/* ├───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ */
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */
|
/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */
|
||||||
|
|||||||
@@ -25,3 +25,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 }
|
#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 }
|
||||||
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 }
|
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 }
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
#define DEVICE_VER 0x0100
|
||||||
@@ -6,3 +6,4 @@
|
|||||||
#define MATRIX_ROW_PINS { B7, B6, B5, B4, B3, B0 }
|
#define MATRIX_ROW_PINS { B7, B6, B5, B4, B3, B0 }
|
||||||
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 }
|
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 }
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
#define DEVICE_VER 0x0200
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214 }, \
|
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214 }, \
|
||||||
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \
|
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \
|
||||||
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414 }, \
|
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414 }, \
|
||||||
{ K500, K501, K502, KC_NO, KC_NO, K505, K506, K507, K508, K509, K510, K511, KC_NO, K513, K514 } \
|
{ K500, K501, K502, KC_NO, KC_NO, K505, K506, K507, K508, K509, K510, K511, KC_NO, K513, K514 } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LAYOUT_75_iso_rwkl( \
|
#define LAYOUT_75_iso_rwkl( \
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define MATRIX_ROWS 12
|
||||||
|
#define MATRIX_COLS 9
|
||||||
|
#define MATRIX_ROW_PINS { B7, B3, B2, B1, B0, E6, F0, F1, F4, F5, F6, F7 }
|
||||||
|
#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4 }
|
||||||
|
#define DIODE_DIRECTION ROW2COL
|
||||||
|
#define DEVICE_VER 0x0300
|
||||||
|
#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 4
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 Luiz Ribeiro <[email protected]>
|
||||||
|
|
||||||
|
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 "ymd75.h"
|
||||||
|
|
||||||
|
void keyboard_pre_init_kb(void) {
|
||||||
|
led_init_ports();
|
||||||
|
keyboard_pre_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_init_ports(void) { setPinOutput(D1); }
|
||||||
|
|
||||||
|
bool led_update_kb(led_t led_state) {
|
||||||
|
if (led_update_user(led_state)) {
|
||||||
|
writePin(D1, led_state.caps_lock);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* LAYOUT
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
||||||
|
* │Esc│F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Psc│Pse│Del│
|
||||||
|
* ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┤
|
||||||
|
* │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │0 │ - │ = │BckSpc │Hm │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
|
||||||
|
* │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │End│
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤
|
||||||
|
* │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgU│
|
||||||
|
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤
|
||||||
|
* │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RShift│ ↑ │PgD│
|
||||||
|
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤
|
||||||
|
* │Ctrl│Sup │Alt │ Space │Alt│Sup│Ctl│ ← │ ↓ │ → │
|
||||||
|
* └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
K50, K51, K52, K53, K54, K55, K56, K57, K58, KB8, KB7, KB5, KB4, KB3, KB6, KB2, \
|
||||||
|
K40, K41, K42, K43, K44, K45, K46, K47, K48, KA8, KA7, KA5, KA4, KA6, KA2, \
|
||||||
|
K30, K31, K32, K33, K34, K35, K36, K37, K38, K98, K97, K95, K94, K84, K96, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K88, K87, K85, K93, K86, \
|
||||||
|
K10, K12, K13, K14, K15, K16, K17, K18, K78, K77, K75, K74, K73, K76, \
|
||||||
|
K00, K01, K02, K06, K08, K07, K05, K04, K03, K66 \
|
||||||
|
) { \
|
||||||
|
{ K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \
|
||||||
|
{ K10, KC_NO, K12, K13, K14, K15, K16, K17, K18 }, \
|
||||||
|
{ K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \
|
||||||
|
{ K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \
|
||||||
|
{ K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \
|
||||||
|
{ K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K66, KC_NO, KC_NO }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, K73, K74, K75, K76, K77, K78 }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, KC_NO, K84, K85, K86, K87, K88 }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, K93, K94, K95, K96, K97, K98 }, \
|
||||||
|
{ KC_NO, KC_NO, KA2, KC_NO, KA4, KA5, KA6, KA7, KA8 }, \
|
||||||
|
{ KC_NO, KC_NO, KB2, KB3, KB4, KB5, KB6, KB7, KB8 }, \
|
||||||
|
}
|
||||||
|
|
||||||
|
/* LAYOUT_75_iso
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
||||||
|
* │Esc│F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Psc│Pse│Del│
|
||||||
|
* ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┤
|
||||||
|
* │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │0 │ - │ = │BckSpc │Hm │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
|
||||||
|
* │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ │End│
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐Ent ├───┤
|
||||||
|
* │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │ │PgU│
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤
|
||||||
|
* │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │Shift │ ↑ │PgD│
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤
|
||||||
|
* │Ctrl│Sup │Alt │ Space │Alt│Mo │Ctl│ ← │ ↓ │ → │
|
||||||
|
* └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define LAYOUT_75_iso( \
|
||||||
|
K50, K51, K52, K53, K54, K55, K56, K57, K58, KB8, KB7, KB5, KB4, KB3, KB6, KB2, \
|
||||||
|
K40, K41, K42, K43, K44, K45, K46, K47, K48, KA8, KA7, KA5, KA4, KA6, KA2, \
|
||||||
|
K30, K31, K32, K33, K34, K35, K36, K37, K38, K98, K97, K95, K94, K96, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K88, K87, K85, K93, K84, K86, \
|
||||||
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K78, K77, K75, K74, K73, K76, \
|
||||||
|
K00, K01, K02, K06, K08, K07, K05, K04, K03, K66 \
|
||||||
|
) { \
|
||||||
|
{ K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \
|
||||||
|
{ K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \
|
||||||
|
{ K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \
|
||||||
|
{ K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \
|
||||||
|
{ K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \
|
||||||
|
{ K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K66, KC_NO, KC_NO }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, K73, K74, K75, K76, K77, K78 }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, KC_NO, K93, K85, K86, K87, K88 }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, K84, K94, K95, K96, K97, K98 }, \
|
||||||
|
{ KC_NO, KC_NO, KA2, KC_NO, KA4, KA5, KA6, KA7, KA8 }, \
|
||||||
|
{ KC_NO, KC_NO, KB2, KB3, KB4, KB5, KB6, KB7, KB8 }, \
|
||||||
|
}
|
||||||
|
|
||||||
|
/* LAYOUT_75_iso_rwkl
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
||||||
|
* │Esc│F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Psc│Pse│Del│
|
||||||
|
* ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┤
|
||||||
|
* │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │0 │ - │ = │BckSpc │Hm │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
|
||||||
|
* │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ │End│
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐Ent ├───┤
|
||||||
|
* │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │ │PgU│
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤
|
||||||
|
* │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │Shift │ ↑ │PgD│
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┼───┼───┤
|
||||||
|
* │Ctrl│Sup │Alt │ Space │ Alt │ Ctl │ ← │ ↓ │ → │
|
||||||
|
* └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┴───┘
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define LAYOUT_75_iso_rwkl( \
|
||||||
|
K50, K51, K52, K53, K54, K55, K56, K57, K58, KB8, KB7, KB5, KB4, KB3, KB6, KB2, \
|
||||||
|
K40, K41, K42, K43, K44, K45, K46, K47, K48, KA8, KA7, KA5, KA4, KA6, KA2, \
|
||||||
|
K30, K31, K32, K33, K34, K35, K36, K37, K38, K98, K97, K95, K94, K96, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K88, K87, K85, K93, K84, K86, \
|
||||||
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K78, K77, K75, K74, K73, K76, \
|
||||||
|
K00, K01, K02, K06, K08, K05, K04, K03, K66 \
|
||||||
|
) { \
|
||||||
|
{ K00, K01, K02, K03, K04, K05, K06, KC_NO, K08 }, \
|
||||||
|
{ K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \
|
||||||
|
{ K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \
|
||||||
|
{ K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \
|
||||||
|
{ K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \
|
||||||
|
{ K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K66, KC_NO, KC_NO }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, K73, K74, K75, K76, K77, K78 }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, KC_NO, K93, K85, K86, K87, K88 }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, K84, K94, K95, K96, K97, K98 }, \
|
||||||
|
{ KC_NO, KC_NO, KA2, KC_NO, KA4, KA5, KA6, KA7, KA8 }, \
|
||||||
|
{ KC_NO, KC_NO, KB2, KB3, KB4, KB5, KB6, KB7, KB8 }, \
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # 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 = yes # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||||
|
AUDIO_ENABLE = no # Audio output
|
||||||
|
KEY_LOCK_ENABLE = yes # Enable KC_LOCK support
|
||||||
@@ -6,4 +6,6 @@
|
|||||||
#include "rev1.h"
|
#include "rev1.h"
|
||||||
#elif defined(KEYBOARD_ymd75_rev2)
|
#elif defined(KEYBOARD_ymd75_rev2)
|
||||||
#include "rev2.h"
|
#include "rev2.h"
|
||||||
|
#elif defined(KEYBOARD_ymd75_rev3)
|
||||||
|
#include "rev3.h"
|
||||||
#endif
|
#endif
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright 2020 Daniel Reibl <[email protected]>
|
/* Copyright 2020 Janos Daniel Reibl <[email protected]> @riblee
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
+2
-180
@@ -1,5 +1,4 @@
|
|||||||
/* Copyright 2015-2017 Jack Humbert
|
/* Copyright 2020 Janos Daniel Reibl <[email protected]> @riblee
|
||||||
* Copyright 2020 Daniel Reibl <janos.daniel.reibl@protonmail.com>
|
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -14,146 +13,8 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
#include "riblee.h"
|
||||||
|
|
||||||
#include QMK_KEYBOARD_H
|
|
||||||
|
|
||||||
enum preonic_layers {
|
|
||||||
_QWERTY,
|
|
||||||
_COLEMAK,
|
|
||||||
_DVORAK,
|
|
||||||
_LOWER,
|
|
||||||
_RAISE,
|
|
||||||
_ADJUST
|
|
||||||
};
|
|
||||||
|
|
||||||
enum preonic_keycodes {
|
|
||||||
QWERTY = SAFE_RANGE,
|
|
||||||
COLEMAK,
|
|
||||||
DVORAK,
|
|
||||||
BACKLIT
|
|
||||||
};
|
|
||||||
|
|
||||||
#define LOWER MO(_LOWER)
|
|
||||||
#define RAISE MO(_RAISE)
|
|
||||||
|
|
||||||
// Tap Dance declarations
|
|
||||||
enum {
|
|
||||||
TD_A,
|
|
||||||
TD_E,
|
|
||||||
TD_I,
|
|
||||||
TD_O,
|
|
||||||
TD_U,
|
|
||||||
};
|
|
||||||
|
|
||||||
const uint8_t shift = MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT);
|
|
||||||
|
|
||||||
// Tap Dance functions
|
|
||||||
void dance_key_a (qk_tap_dance_state_t *state, void *user_data) {
|
|
||||||
if (state->count == 1) {
|
|
||||||
SEND_STRING("a");
|
|
||||||
reset_tap_dance(state);
|
|
||||||
} else if (state->count == 2) {
|
|
||||||
if (!(keyboard_report->mods & shift)) {
|
|
||||||
send_unicode_string("á");
|
|
||||||
} else {
|
|
||||||
send_unicode_string("Á");
|
|
||||||
}
|
|
||||||
|
|
||||||
reset_tap_dance(state);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void dance_key_e (qk_tap_dance_state_t *state, void *user_data) {
|
|
||||||
if (state->count == 1) {
|
|
||||||
SEND_STRING("e");
|
|
||||||
reset_tap_dance(state);
|
|
||||||
} else if (state->count == 2) {
|
|
||||||
if (!(keyboard_report->mods & shift)) {
|
|
||||||
send_unicode_string("é");
|
|
||||||
} else {
|
|
||||||
send_unicode_string("É");
|
|
||||||
}
|
|
||||||
|
|
||||||
reset_tap_dance(state);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void dance_key_i (qk_tap_dance_state_t *state, void *user_data) {
|
|
||||||
if (state->count == 1) {
|
|
||||||
SEND_STRING("i");
|
|
||||||
reset_tap_dance(state);
|
|
||||||
} else if (state->count == 2) {
|
|
||||||
if (!(keyboard_report->mods & shift)) {
|
|
||||||
send_unicode_string("í");
|
|
||||||
} else {
|
|
||||||
send_unicode_string("Í");
|
|
||||||
}
|
|
||||||
|
|
||||||
reset_tap_dance(state);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void dance_key_o (qk_tap_dance_state_t *state, void *user_data) {
|
|
||||||
if (state->count == 1) {
|
|
||||||
SEND_STRING("o");
|
|
||||||
reset_tap_dance(state);
|
|
||||||
} else if (state->count == 2) {
|
|
||||||
if (!(keyboard_report->mods & shift)) {
|
|
||||||
send_unicode_string("ó");
|
|
||||||
} else {
|
|
||||||
send_unicode_string("Ó");
|
|
||||||
}
|
|
||||||
|
|
||||||
reset_tap_dance(state);
|
|
||||||
} else if (state->count == 3) {
|
|
||||||
if (!(keyboard_report->mods & shift)) {
|
|
||||||
send_unicode_string("ö");
|
|
||||||
} else {
|
|
||||||
send_unicode_string("Ö");
|
|
||||||
}
|
|
||||||
|
|
||||||
reset_tap_dance(state);
|
|
||||||
} else if (state->count == 4) {
|
|
||||||
if (!(keyboard_report->mods & shift)) {
|
|
||||||
send_unicode_string("ő");
|
|
||||||
} else {
|
|
||||||
send_unicode_string("Ő");
|
|
||||||
}
|
|
||||||
|
|
||||||
reset_tap_dance(state);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void dance_key_u (qk_tap_dance_state_t *state, void *user_data) {
|
|
||||||
if (state->count == 1) {
|
|
||||||
SEND_STRING("u");
|
|
||||||
reset_tap_dance(state);
|
|
||||||
} else if (state->count == 2) {
|
|
||||||
if (!(keyboard_report->mods & shift)) {
|
|
||||||
send_unicode_string("ú");
|
|
||||||
} else {
|
|
||||||
send_unicode_string("Ú");
|
|
||||||
}
|
|
||||||
|
|
||||||
reset_tap_dance(state);
|
|
||||||
} else if (state->count == 3) {
|
|
||||||
if (!(keyboard_report->mods & shift)) {
|
|
||||||
send_unicode_string("ü");
|
|
||||||
} else {
|
|
||||||
send_unicode_string("Ü");
|
|
||||||
}
|
|
||||||
|
|
||||||
reset_tap_dance(state);
|
|
||||||
} else if (state->count == 4) {
|
|
||||||
if (!(keyboard_report->mods & shift)) {
|
|
||||||
send_unicode_string("ű");
|
|
||||||
} else {
|
|
||||||
send_unicode_string("Ű");
|
|
||||||
}
|
|
||||||
|
|
||||||
reset_tap_dance(state);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Tap Dance definitions
|
// Tap Dance definitions
|
||||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
@@ -300,42 +161,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
)
|
)
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
|
||||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
||||||
switch (keycode) {
|
|
||||||
case QWERTY:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
set_single_persistent_default_layer(_QWERTY);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
case COLEMAK:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
set_single_persistent_default_layer(_COLEMAK);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
case DVORAK:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
set_single_persistent_default_layer(_DVORAK);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
case BACKLIT:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
register_code(keycode_config(KC_LGUI));
|
|
||||||
#ifdef BACKLIGHT_ENABLE
|
|
||||||
backlight_step();
|
|
||||||
#endif
|
|
||||||
} else {
|
|
||||||
unregister_code(keycode_config(KC_LGUI));
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
File renamed without changes.
File renamed without changes.
@@ -6,6 +6,7 @@ import sys
|
|||||||
|
|
||||||
from milc import cli
|
from milc import cli
|
||||||
|
|
||||||
|
from . import c2json
|
||||||
from . import cformat
|
from . import cformat
|
||||||
from . import compile
|
from . import compile
|
||||||
from . import config
|
from . import config
|
||||||
|
|||||||
@@ -0,0 +1,62 @@
|
|||||||
|
"""Generate a keymap.json from a keymap.c file.
|
||||||
|
"""
|
||||||
|
import json
|
||||||
|
import sys
|
||||||
|
|
||||||
|
from milc import cli
|
||||||
|
|
||||||
|
import qmk.keymap
|
||||||
|
import qmk.path
|
||||||
|
|
||||||
|
|
||||||
|
@cli.argument('--no-cpp', arg_only=True, action='store_false', help='Do not use \'cpp\' on keymap.c')
|
||||||
|
@cli.argument('-o', '--output', arg_only=True, type=qmk.path.normpath, help='File to write to')
|
||||||
|
@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages")
|
||||||
|
@cli.argument('-kb', '--keyboard', arg_only=True, required=True, help='The keyboard\'s name')
|
||||||
|
@cli.argument('-km', '--keymap', arg_only=True, required=True, help='The keymap\'s name')
|
||||||
|
@cli.argument('filename', arg_only=True, help='keymap.c file')
|
||||||
|
@cli.subcommand('Creates a keymap.json from a keymap.c file.')
|
||||||
|
def c2json(cli):
|
||||||
|
"""Generate a keymap.json from a keymap.c file.
|
||||||
|
|
||||||
|
This command uses the `qmk.keymap` module to generate a keymap.json from a keymap.c file. The generated keymap is written to stdout, or to a file if -o is provided.
|
||||||
|
"""
|
||||||
|
cli.args.filename = qmk.path.normpath(cli.args.filename)
|
||||||
|
|
||||||
|
# Error checking
|
||||||
|
if not cli.args.filename.exists():
|
||||||
|
cli.log.error('C file does not exist!')
|
||||||
|
cli.print_usage()
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
if str(cli.args.filename) == '-':
|
||||||
|
# TODO(skullydazed/anyone): Read file contents from STDIN
|
||||||
|
cli.log.error('Reading from STDIN is not (yet) supported.')
|
||||||
|
cli.print_usage()
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
# Environment processing
|
||||||
|
if cli.args.output == ('-'):
|
||||||
|
cli.args.output = None
|
||||||
|
|
||||||
|
# Parse the keymap.c
|
||||||
|
keymap_json = qmk.keymap.c2json(cli.args.keyboard, cli.args.keymap, cli.args.filename, use_cpp=cli.args.no_cpp)
|
||||||
|
|
||||||
|
# Generate the keymap.json
|
||||||
|
try:
|
||||||
|
keymap_json = qmk.keymap.generate(keymap_json['keyboard'], keymap_json['layout'], keymap_json['layers'], type='json', keymap=keymap_json['keymap'])
|
||||||
|
except KeyError:
|
||||||
|
cli.log.error('Something went wrong. Try to use --no-cpp.')
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
if cli.args.output:
|
||||||
|
cli.args.output.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
if cli.args.output.exists():
|
||||||
|
cli.args.output.replace(cli.args.output.name + '.bak')
|
||||||
|
cli.args.output.write_text(json.dumps(keymap_json))
|
||||||
|
|
||||||
|
if not cli.args.quiet:
|
||||||
|
cli.log.info('Wrote keymap to %s.', cli.args.output)
|
||||||
|
|
||||||
|
else:
|
||||||
|
print(json.dumps(keymap_json))
|
||||||
@@ -58,7 +58,7 @@ def parse_gcc_version(version):
|
|||||||
return {
|
return {
|
||||||
'major': int(m.group(1)),
|
'major': int(m.group(1)),
|
||||||
'minor': int(m.group(2)) if m.group(2) else 0,
|
'minor': int(m.group(2)) if m.group(2) else 0,
|
||||||
'patch': int(m.group(3)) if m.group(3) else 0
|
'patch': int(m.group(3)) if m.group(3) else 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -364,3 +364,5 @@ def doctor(cli):
|
|||||||
else:
|
else:
|
||||||
cli.log.info('{fg_yellow}Problems detected, please fix these problems before proceeding.')
|
cli.log.info('{fg_yellow}Problems detected, please fix these problems before proceeding.')
|
||||||
# FIXME(skullydazed/unclaimed): Link to a document about troubleshooting, or discord or something
|
# FIXME(skullydazed/unclaimed): Link to a document about troubleshooting, or discord or something
|
||||||
|
|
||||||
|
return ok
|
||||||
@@ -134,11 +134,11 @@ def info(cli):
|
|||||||
if not cli.config.info.keyboard:
|
if not cli.config.info.keyboard:
|
||||||
cli.log.error('Missing paramater: --keyboard')
|
cli.log.error('Missing paramater: --keyboard')
|
||||||
cli.subcommands['info'].print_help()
|
cli.subcommands['info'].print_help()
|
||||||
exit(1)
|
return False
|
||||||
|
|
||||||
if not is_keyboard(cli.config.info.keyboard):
|
if not is_keyboard(cli.config.info.keyboard):
|
||||||
cli.log.error('Invalid keyboard: "%s"', cli.config.info.keyboard)
|
cli.log.error('Invalid keyboard: "%s"', cli.config.info.keyboard)
|
||||||
exit(1)
|
return False
|
||||||
|
|
||||||
# Build the info.json file
|
# Build the info.json file
|
||||||
kb_info_json = info_json(cli.config.info.keyboard)
|
kb_info_json = info_json(cli.config.info.keyboard)
|
||||||
@@ -146,13 +146,10 @@ def info(cli):
|
|||||||
# Output in the requested format
|
# Output in the requested format
|
||||||
if cli.args.format == 'json':
|
if cli.args.format == 'json':
|
||||||
print(json.dumps(kb_info_json))
|
print(json.dumps(kb_info_json))
|
||||||
exit()
|
elif cli.args.format == 'text':
|
||||||
|
|
||||||
if cli.args.format == 'text':
|
|
||||||
print_text_output(kb_info_json)
|
print_text_output(kb_info_json)
|
||||||
|
|
||||||
elif cli.args.format == 'friendly':
|
elif cli.args.format == 'friendly':
|
||||||
print_friendly_output(kb_info_json)
|
print_friendly_output(kb_info_json)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
cli.log.error('Unknown format: %s', cli.args.format)
|
cli.log.error('Unknown format: %s', cli.args.format)
|
||||||
|
return False
|
||||||
@@ -13,4 +13,4 @@ def json_keymap(cli):
|
|||||||
"""Renamed to `qmk json2c`.
|
"""Renamed to `qmk json2c`.
|
||||||
"""
|
"""
|
||||||
cli.log.error('This command has been renamed to `qmk json2c`.')
|
cli.log.error('This command has been renamed to `qmk json2c`.')
|
||||||
exit(1)
|
return False
|
||||||
@@ -22,12 +22,12 @@ def json2c(cli):
|
|||||||
# TODO(skullydazed/anyone): Read file contents from STDIN
|
# TODO(skullydazed/anyone): Read file contents from STDIN
|
||||||
cli.log.error('Reading from STDIN is not (yet) supported.')
|
cli.log.error('Reading from STDIN is not (yet) supported.')
|
||||||
cli.print_usage()
|
cli.print_usage()
|
||||||
exit(1)
|
return False
|
||||||
|
|
||||||
if not cli.args.filename.exists():
|
if not cli.args.filename.exists():
|
||||||
cli.log.error('JSON file does not exist!')
|
cli.log.error('JSON file does not exist!')
|
||||||
cli.print_usage()
|
cli.print_usage()
|
||||||
exit(1)
|
return False
|
||||||
|
|
||||||
# Environment processing
|
# Environment processing
|
||||||
if cli.args.output and cli.args.output.name == '-':
|
if cli.args.output and cli.args.output.name == '-':
|
||||||
|
|||||||
@@ -37,7 +37,8 @@ def kle2json(cli):
|
|||||||
file_path = Path(os.environ['ORIG_CWD'], cli.args.filename)
|
file_path = Path(os.environ['ORIG_CWD'], cli.args.filename)
|
||||||
# Check for valid file_path for more graceful failure
|
# Check for valid file_path for more graceful failure
|
||||||
if not file_path.exists():
|
if not file_path.exists():
|
||||||
return cli.log.error('File {fg_cyan}%s{style_reset_all} was not found.', file_path)
|
cli.log.error('File {fg_cyan}%s{style_reset_all} was not found.', file_path)
|
||||||
|
return False
|
||||||
out_path = file_path.parent
|
out_path = file_path.parent
|
||||||
raw_code = file_path.open().read()
|
raw_code = file_path.open().read()
|
||||||
# Check if info.json exists, allow overwrite with force
|
# Check if info.json exists, allow overwrite with force
|
||||||
@@ -50,8 +51,7 @@ def kle2json(cli):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
cli.log.error('Could not parse KLE raw data: %s', raw_code)
|
cli.log.error('Could not parse KLE raw data: %s', raw_code)
|
||||||
cli.log.exception(e)
|
cli.log.exception(e)
|
||||||
# FIXME: This should be better
|
return False
|
||||||
return cli.log.error('Could not parse KLE raw data.')
|
|
||||||
keyboard = OrderedDict(
|
keyboard = OrderedDict(
|
||||||
keyboard_name=kle.name,
|
keyboard_name=kle.name,
|
||||||
url='',
|
url='',
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ def list_keymaps(cli):
|
|||||||
"""
|
"""
|
||||||
if not is_keyboard(cli.config.list_keymaps.keyboard):
|
if not is_keyboard(cli.config.list_keymaps.keyboard):
|
||||||
cli.log.error('Keyboard %s does not exist!', cli.config.list_keymaps.keyboard)
|
cli.log.error('Keyboard %s does not exist!', cli.config.list_keymaps.keyboard)
|
||||||
exit(1)
|
return False
|
||||||
|
|
||||||
for name in qmk.keymap.list_keymaps(cli.config.list_keymaps.keyboard):
|
for name in qmk.keymap.list_keymaps(cli.config.list_keymaps.keyboard):
|
||||||
print(name)
|
print(name)
|
||||||
@@ -29,15 +29,15 @@ def new_keymap(cli):
|
|||||||
# check directories
|
# check directories
|
||||||
if not kb_path.exists():
|
if not kb_path.exists():
|
||||||
cli.log.error('Keyboard %s does not exist!', kb_path)
|
cli.log.error('Keyboard %s does not exist!', kb_path)
|
||||||
exit(1)
|
return False
|
||||||
|
|
||||||
if not keymap_path_default.exists():
|
if not keymap_path_default.exists():
|
||||||
cli.log.error('Keyboard default %s does not exist!', keymap_path_default)
|
cli.log.error('Keyboard default %s does not exist!', keymap_path_default)
|
||||||
exit(1)
|
return False
|
||||||
|
|
||||||
if keymap_path_new.exists():
|
if keymap_path_new.exists():
|
||||||
cli.log.error('Keymap %s already exists!', keymap_path_new)
|
cli.log.error('Keymap %s already exists!', keymap_path_new)
|
||||||
exit(1)
|
return False
|
||||||
|
|
||||||
# create user directory with default keymap files
|
# create user directory with default keymap files
|
||||||
shutil.copytree(keymap_path_default, keymap_path_new, symlinks=True)
|
shutil.copytree(keymap_path_default, keymap_path_new, symlinks=True)
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import subprocess
|
|||||||
import shlex
|
import shlex
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
from milc import cli
|
|
||||||
import qmk.keymap
|
import qmk.keymap
|
||||||
|
|
||||||
|
|
||||||
@@ -84,6 +83,4 @@ def run(command, *args, **kwargs):
|
|||||||
safecmd = ' '.join(safecmd)
|
safecmd = ' '.join(safecmd)
|
||||||
command = [os.environ['SHELL'], '-c', safecmd]
|
command = [os.environ['SHELL'], '-c', safecmd]
|
||||||
|
|
||||||
cli.log.debug('Running command: %s', command)
|
|
||||||
|
|
||||||
return subprocess.run(command, *args, **kwargs)
|
return subprocess.run(command, *args, **kwargs)
|
||||||
@@ -9,7 +9,6 @@ QMK_FIRMWARE = Path.cwd()
|
|||||||
MAX_KEYBOARD_SUBFOLDERS = 5
|
MAX_KEYBOARD_SUBFOLDERS = 5
|
||||||
|
|
||||||
# Supported processor types
|
# Supported processor types
|
||||||
ARM_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303', 'STM32F401', 'STM32F411'
|
CHIBIOS_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303', 'STM32F401', 'STM32F411'
|
||||||
AVR_PROCESSORS = 'atmega16u2', 'atmega32u2', 'atmega16u4', 'atmega32u4', 'at90usb646', 'at90usb647', 'at90usb1286', 'at90usb1287', 'atmega328p', 'atmega32a', None
|
LUFA_PROCESSORS = 'atmega16u2', 'atmega32u2', 'atmega16u4', 'atmega32u4', 'at90usb646', 'at90usb647', 'at90usb1286', 'at90usb1287', None
|
||||||
ALL_PROCESSORS = ARM_PROCESSORS + AVR_PROCESSORS
|
VUSB_PROCESSORS = 'atmega32a', 'atmega328p', 'atmega328', 'attiny85'
|
||||||
VUSB_PROCESSORS = 'atmega328p', 'atmega32a', 'atmega328', 'attiny85'
|
|
||||||
+22
-13
@@ -6,15 +6,22 @@ from pathlib import Path
|
|||||||
|
|
||||||
from milc import cli
|
from milc import cli
|
||||||
|
|
||||||
from qmk.constants import ARM_PROCESSORS, AVR_PROCESSORS, VUSB_PROCESSORS
|
from qmk.constants import CHIBIOS_PROCESSORS, LUFA_PROCESSORS, VUSB_PROCESSORS
|
||||||
from qmk.c_parse import find_layouts
|
from qmk.c_parse import find_layouts
|
||||||
from qmk.keyboard import config_h, rules_mk
|
from qmk.keyboard import config_h, rules_mk
|
||||||
|
from qmk.makefile import parse_rules_mk_file
|
||||||
from qmk.math import compute
|
from qmk.math import compute
|
||||||
|
|
||||||
|
|
||||||
def info_json(keyboard):
|
def info_json(keyboard):
|
||||||
"""Generate the info.json data for a specific keyboard.
|
"""Generate the info.json data for a specific keyboard.
|
||||||
"""
|
"""
|
||||||
|
cur_dir = Path('keyboards')
|
||||||
|
rules = parse_rules_mk_file(cur_dir / keyboard / 'rules.mk')
|
||||||
|
if 'DEFAULT_FOLDER' in rules:
|
||||||
|
keyboard = rules['DEFAULT_FOLDER']
|
||||||
|
rules = parse_rules_mk_file(cur_dir / keyboard / 'rules.mk', rules)
|
||||||
|
|
||||||
info_data = {
|
info_data = {
|
||||||
'keyboard_name': str(keyboard),
|
'keyboard_name': str(keyboard),
|
||||||
'keyboard_folder': str(keyboard),
|
'keyboard_folder': str(keyboard),
|
||||||
@@ -22,7 +29,7 @@ def info_json(keyboard):
|
|||||||
'maintainer': 'qmk',
|
'maintainer': 'qmk',
|
||||||
}
|
}
|
||||||
|
|
||||||
for layout_name, layout_json in _find_all_layouts(keyboard).items():
|
for layout_name, layout_json in _find_all_layouts(keyboard, rules).items():
|
||||||
if not layout_name.startswith('LAYOUT_kc'):
|
if not layout_name.startswith('LAYOUT_kc'):
|
||||||
info_data['layouts'][layout_name] = layout_json
|
info_data['layouts'][layout_name] = layout_json
|
||||||
|
|
||||||
@@ -88,9 +95,9 @@ def _extract_rules_mk(info_data):
|
|||||||
rules = rules_mk(info_data['keyboard_folder'])
|
rules = rules_mk(info_data['keyboard_folder'])
|
||||||
mcu = rules.get('MCU')
|
mcu = rules.get('MCU')
|
||||||
|
|
||||||
if mcu in ARM_PROCESSORS:
|
if mcu in CHIBIOS_PROCESSORS:
|
||||||
arm_processor_rules(info_data, rules)
|
arm_processor_rules(info_data, rules)
|
||||||
elif mcu in AVR_PROCESSORS:
|
elif mcu in LUFA_PROCESSORS + VUSB_PROCESSORS:
|
||||||
avr_processor_rules(info_data, rules)
|
avr_processor_rules(info_data, rules)
|
||||||
else:
|
else:
|
||||||
cli.log.warning("%s: Unknown MCU: %s" % (info_data['keyboard_folder'], mcu))
|
cli.log.warning("%s: Unknown MCU: %s" % (info_data['keyboard_folder'], mcu))
|
||||||
@@ -99,22 +106,24 @@ def _extract_rules_mk(info_data):
|
|||||||
return info_data
|
return info_data
|
||||||
|
|
||||||
|
|
||||||
def _find_all_layouts(keyboard):
|
def _search_keyboard_h(path):
|
||||||
"""Looks for layout macros associated with this keyboard.
|
|
||||||
"""
|
|
||||||
layouts = {}
|
|
||||||
rules = rules_mk(keyboard)
|
|
||||||
keyboard_path = Path(rules.get('DEFAULT_FOLDER', keyboard))
|
|
||||||
|
|
||||||
# Pull in all layouts defined in the standard files
|
|
||||||
current_path = Path('keyboards/')
|
current_path = Path('keyboards/')
|
||||||
for directory in keyboard_path.parts:
|
layouts = {}
|
||||||
|
for directory in path.parts:
|
||||||
current_path = current_path / directory
|
current_path = current_path / directory
|
||||||
keyboard_h = '%s.h' % (directory,)
|
keyboard_h = '%s.h' % (directory,)
|
||||||
keyboard_h_path = current_path / keyboard_h
|
keyboard_h_path = current_path / keyboard_h
|
||||||
if keyboard_h_path.exists():
|
if keyboard_h_path.exists():
|
||||||
layouts.update(find_layouts(keyboard_h_path))
|
layouts.update(find_layouts(keyboard_h_path))
|
||||||
|
|
||||||
|
return layouts
|
||||||
|
|
||||||
|
|
||||||
|
def _find_all_layouts(keyboard, rules):
|
||||||
|
"""Looks for layout macros associated with this keyboard.
|
||||||
|
"""
|
||||||
|
layouts = _search_keyboard_h(Path(keyboard))
|
||||||
|
|
||||||
if not layouts:
|
if not layouts:
|
||||||
# If we didn't find any layouts above we widen our search. This is error
|
# If we didn't find any layouts above we widen our search. This is error
|
||||||
# prone which is why we want to encourage people to follow the standard above.
|
# prone which is why we want to encourage people to follow the standard above.
|
||||||
|
|||||||
+247
-25
@@ -1,11 +1,18 @@
|
|||||||
"""Functions that help you work with QMK keymaps.
|
"""Functions that help you work with QMK keymaps.
|
||||||
"""
|
"""
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
import json
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
from pygments.lexers.c_cpp import CLexer
|
||||||
|
from pygments.token import Token
|
||||||
|
from pygments import lex
|
||||||
|
|
||||||
from milc import cli
|
from milc import cli
|
||||||
|
|
||||||
from qmk.keyboard import rules_mk
|
from qmk.keyboard import rules_mk
|
||||||
import qmk.path
|
import qmk.path
|
||||||
|
import qmk.commands
|
||||||
|
|
||||||
# The `keymap.c` template to use when a keyboard doesn't have its own
|
# The `keymap.c` template to use when a keyboard doesn't have its own
|
||||||
DEFAULT_KEYMAP_C = """#include QMK_KEYBOARD_H
|
DEFAULT_KEYMAP_C = """#include QMK_KEYBOARD_H
|
||||||
@@ -22,22 +29,35 @@ __KEYMAP_GOES_HERE__
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
def template(keyboard):
|
def template(keyboard, type='c'):
|
||||||
"""Returns the `keymap.c` template for a keyboard.
|
"""Returns the `keymap.c` or `keymap.json` template for a keyboard.
|
||||||
|
|
||||||
If a template exists in `keyboards/<keyboard>/templates/keymap.c` that
|
If a template exists in `keyboards/<keyboard>/templates/keymap.c` that
|
||||||
text will be used instead of `DEFAULT_KEYMAP_C`.
|
text will be used instead of `DEFAULT_KEYMAP_C`.
|
||||||
|
|
||||||
|
If a template exists in `keyboards/<keyboard>/templates/keymap.json` that
|
||||||
|
text will be used instead of an empty dictionary.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
keyboard
|
keyboard
|
||||||
The keyboard to return a template for.
|
The keyboard to return a template for.
|
||||||
|
|
||||||
|
type
|
||||||
|
'json' for `keymap.json` and 'c' (or anything else) for `keymap.c`
|
||||||
"""
|
"""
|
||||||
template_file = Path('keyboards/%s/templates/keymap.c' % keyboard)
|
if type == 'json':
|
||||||
|
template_file = Path('keyboards/%s/templates/keymap.json' % keyboard)
|
||||||
|
template = {'keyboard': keyboard}
|
||||||
|
if template_file.exists():
|
||||||
|
template.update(json.loads(template_file.read_text()))
|
||||||
|
else:
|
||||||
|
template_file = Path('keyboards/%s/templates/keymap.c' % keyboard)
|
||||||
|
if template_file.exists():
|
||||||
|
template = template_file.read_text()
|
||||||
|
else:
|
||||||
|
template = DEFAULT_KEYMAP_C
|
||||||
|
|
||||||
if template_file.exists():
|
return template
|
||||||
return template_file.read_text()
|
|
||||||
|
|
||||||
return DEFAULT_KEYMAP_C
|
|
||||||
|
|
||||||
|
|
||||||
def _strip_any(keycode):
|
def _strip_any(keycode):
|
||||||
@@ -57,8 +77,8 @@ def is_keymap_dir(keymap):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
def generate(keyboard, layout, layers):
|
def generate(keyboard, layout, layers, type='c', keymap=None):
|
||||||
"""Returns a keymap.c for the specified keyboard, layout, and layers.
|
"""Returns a `keymap.c` or `keymap.json` for the specified keyboard, layout, and layers.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
keyboard
|
keyboard
|
||||||
@@ -69,24 +89,30 @@ def generate(keyboard, layout, layers):
|
|||||||
|
|
||||||
layers
|
layers
|
||||||
An array of arrays describing the keymap. Each item in the inner array should be a string that is a valid QMK keycode.
|
An array of arrays describing the keymap. Each item in the inner array should be a string that is a valid QMK keycode.
|
||||||
|
|
||||||
|
type
|
||||||
|
'json' for `keymap.json` and 'c' (or anything else) for `keymap.c`
|
||||||
"""
|
"""
|
||||||
layer_txt = []
|
new_keymap = template(keyboard, type)
|
||||||
|
if type == 'json':
|
||||||
|
new_keymap['keymap'] = keymap
|
||||||
|
new_keymap['layout'] = layout
|
||||||
|
new_keymap['layers'] = layers
|
||||||
|
else:
|
||||||
|
layer_txt = []
|
||||||
|
for layer_num, layer in enumerate(layers):
|
||||||
|
if layer_num != 0:
|
||||||
|
layer_txt[-1] = layer_txt[-1] + ','
|
||||||
|
layer_keys = ', '.join(layer)
|
||||||
|
layer_txt.append('\t[%s] = %s(%s)' % (layer_num, layout, layer_keys))
|
||||||
|
|
||||||
for layer_num, layer in enumerate(layers):
|
keymap = '\n'.join(layer_txt)
|
||||||
if layer_num != 0:
|
new_keymap = new_keymap.replace('__KEYMAP_GOES_HERE__', keymap)
|
||||||
layer_txt[-1] = layer_txt[-1] + ','
|
|
||||||
|
|
||||||
layer = map(_strip_any, layer)
|
return new_keymap
|
||||||
layer_keys = ', '.join(layer)
|
|
||||||
layer_txt.append('\t[%s] = %s(%s)' % (layer_num, layout, layer_keys))
|
|
||||||
|
|
||||||
keymap = '\n'.join(layer_txt)
|
|
||||||
keymap_c = template(keyboard)
|
|
||||||
|
|
||||||
return keymap_c.replace('__KEYMAP_GOES_HERE__', keymap)
|
|
||||||
|
|
||||||
|
|
||||||
def write(keyboard, keymap, layout, layers):
|
def write(keyboard, keymap, layout, layers, type='c'):
|
||||||
"""Generate the `keymap.c` and write it to disk.
|
"""Generate the `keymap.c` and write it to disk.
|
||||||
|
|
||||||
Returns the filename written to.
|
Returns the filename written to.
|
||||||
@@ -103,12 +129,19 @@ def write(keyboard, keymap, layout, layers):
|
|||||||
|
|
||||||
layers
|
layers
|
||||||
An array of arrays describing the keymap. Each item in the inner array should be a string that is a valid QMK keycode.
|
An array of arrays describing the keymap. Each item in the inner array should be a string that is a valid QMK keycode.
|
||||||
|
|
||||||
|
type
|
||||||
|
'json' for `keymap.json` and 'c' (or anything else) for `keymap.c`
|
||||||
"""
|
"""
|
||||||
keymap_c = generate(keyboard, layout, layers)
|
keymap_content = generate(keyboard, layout, layers, type)
|
||||||
keymap_file = qmk.path.keymap(keyboard) / keymap / 'keymap.c'
|
if type == 'json':
|
||||||
|
keymap_file = qmk.path.keymap(keyboard) / keymap / 'keymap.json'
|
||||||
|
keymap_content = json.dumps(keymap_content)
|
||||||
|
else:
|
||||||
|
keymap_file = qmk.path.keymap(keyboard) / keymap / 'keymap.c'
|
||||||
|
|
||||||
keymap_file.parent.mkdir(parents=True, exist_ok=True)
|
keymap_file.parent.mkdir(parents=True, exist_ok=True)
|
||||||
keymap_file.write_text(keymap_c)
|
keymap_file.write_text(keymap_content)
|
||||||
|
|
||||||
cli.log.info('Wrote keymap to {fg_cyan}%s', keymap_file)
|
cli.log.info('Wrote keymap to {fg_cyan}%s', keymap_file)
|
||||||
|
|
||||||
@@ -188,3 +221,192 @@ def list_keymaps(keyboard):
|
|||||||
names = names.union([keymap.name for keymap in cl_path.iterdir() if is_keymap_dir(keymap)])
|
names = names.union([keymap.name for keymap in cl_path.iterdir() if is_keymap_dir(keymap)])
|
||||||
|
|
||||||
return sorted(names)
|
return sorted(names)
|
||||||
|
|
||||||
|
|
||||||
|
def _c_preprocess(path):
|
||||||
|
""" Run a file through the C pre-processor
|
||||||
|
|
||||||
|
Args:
|
||||||
|
path: path of the keymap.c file
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
the stdout of the pre-processor
|
||||||
|
"""
|
||||||
|
pre_processed_keymap = qmk.commands.run(['cpp', path], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
|
||||||
|
return pre_processed_keymap.stdout
|
||||||
|
|
||||||
|
|
||||||
|
def _get_layers(keymap): # noqa C901 : until someone has a good idea how to simplify/split up this code
|
||||||
|
""" Find the layers in a keymap.c file.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
keymap: the content of the keymap.c file
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
a dictionary containing the parsed keymap
|
||||||
|
"""
|
||||||
|
layers = list()
|
||||||
|
opening_braces = '({['
|
||||||
|
closing_braces = ')}]'
|
||||||
|
keymap_certainty = brace_depth = 0
|
||||||
|
is_keymap = is_layer = is_adv_kc = False
|
||||||
|
layer = dict(name=False, layout=False, keycodes=list())
|
||||||
|
for line in lex(keymap, CLexer()):
|
||||||
|
if line[0] is Token.Name:
|
||||||
|
if is_keymap:
|
||||||
|
# If we are inside the keymap array
|
||||||
|
# we know the keymap's name and the layout macro will come,
|
||||||
|
# followed by the keycodes
|
||||||
|
if not layer['name']:
|
||||||
|
if line[1].startswith('LAYOUT') or line[1].startswith('KEYMAP'):
|
||||||
|
# This can happen if the keymap array only has one layer,
|
||||||
|
# for macropads and such
|
||||||
|
layer['name'] = '0'
|
||||||
|
layer['layout'] = line[1]
|
||||||
|
else:
|
||||||
|
layer['name'] = line[1]
|
||||||
|
elif not layer['layout']:
|
||||||
|
layer['layout'] = line[1]
|
||||||
|
elif is_layer:
|
||||||
|
# If we are inside a layout macro,
|
||||||
|
# collect all keycodes
|
||||||
|
if line[1] == '_______':
|
||||||
|
kc = 'KC_TRNS'
|
||||||
|
elif line[1] == 'XXXXXXX':
|
||||||
|
kc = 'KC_NO'
|
||||||
|
else:
|
||||||
|
kc = line[1]
|
||||||
|
if is_adv_kc:
|
||||||
|
# If we are inside an advanced keycode
|
||||||
|
# collect everything and hope the user
|
||||||
|
# knew what he/she was doing
|
||||||
|
layer['keycodes'][-1] += kc
|
||||||
|
else:
|
||||||
|
layer['keycodes'].append(kc)
|
||||||
|
|
||||||
|
# The keymaps array's signature:
|
||||||
|
# const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS]
|
||||||
|
#
|
||||||
|
# Only if we've found all 6 keywords in this specific order
|
||||||
|
# can we know for sure that we are inside the keymaps array
|
||||||
|
elif line[1] == 'PROGMEM' and keymap_certainty == 2:
|
||||||
|
keymap_certainty = 3
|
||||||
|
elif line[1] == 'keymaps' and keymap_certainty == 3:
|
||||||
|
keymap_certainty = 4
|
||||||
|
elif line[1] == 'MATRIX_ROWS' and keymap_certainty == 4:
|
||||||
|
keymap_certainty = 5
|
||||||
|
elif line[1] == 'MATRIX_COLS' and keymap_certainty == 5:
|
||||||
|
keymap_certainty = 6
|
||||||
|
elif line[0] is Token.Keyword:
|
||||||
|
if line[1] == 'const' and keymap_certainty == 0:
|
||||||
|
keymap_certainty = 1
|
||||||
|
elif line[0] is Token.Keyword.Type:
|
||||||
|
if line[1] == 'uint16_t' and keymap_certainty == 1:
|
||||||
|
keymap_certainty = 2
|
||||||
|
elif line[0] is Token.Punctuation:
|
||||||
|
if line[1] in opening_braces:
|
||||||
|
brace_depth += 1
|
||||||
|
if is_keymap:
|
||||||
|
if is_layer:
|
||||||
|
# We found the beginning of a non-basic keycode
|
||||||
|
is_adv_kc = True
|
||||||
|
layer['keycodes'][-1] += line[1]
|
||||||
|
elif line[1] == '(' and brace_depth == 2:
|
||||||
|
# We found the beginning of a layer
|
||||||
|
is_layer = True
|
||||||
|
elif line[1] == '{' and keymap_certainty == 6:
|
||||||
|
# We found the beginning of the keymaps array
|
||||||
|
is_keymap = True
|
||||||
|
elif line[1] in closing_braces:
|
||||||
|
brace_depth -= 1
|
||||||
|
if is_keymap:
|
||||||
|
if is_adv_kc:
|
||||||
|
layer['keycodes'][-1] += line[1]
|
||||||
|
if brace_depth == 2:
|
||||||
|
# We found the end of a non-basic keycode
|
||||||
|
is_adv_kc = False
|
||||||
|
elif line[1] == ')' and brace_depth == 1:
|
||||||
|
# We found the end of a layer
|
||||||
|
is_layer = False
|
||||||
|
layers.append(layer)
|
||||||
|
layer = dict(name=False, layout=False, keycodes=list())
|
||||||
|
elif line[1] == '}' and brace_depth == 0:
|
||||||
|
# We found the end of the keymaps array
|
||||||
|
is_keymap = False
|
||||||
|
keymap_certainty = 0
|
||||||
|
elif is_adv_kc:
|
||||||
|
# Advanced keycodes can contain other punctuation
|
||||||
|
# e.g.: MT(MOD_LCTL | MOD_LSFT, KC_ESC)
|
||||||
|
layer['keycodes'][-1] += line[1]
|
||||||
|
|
||||||
|
elif line[0] is Token.Literal.Number.Integer and is_keymap and not is_adv_kc:
|
||||||
|
# If the pre-processor finds the 'meaning' of the layer names,
|
||||||
|
# they will be numbers
|
||||||
|
if not layer['name']:
|
||||||
|
layer['name'] = line[1]
|
||||||
|
|
||||||
|
else:
|
||||||
|
# We only care about
|
||||||
|
# operators and such if we
|
||||||
|
# are inside an advanced keycode
|
||||||
|
# e.g.: MT(MOD_LCTL | MOD_LSFT, KC_ESC)
|
||||||
|
if is_adv_kc:
|
||||||
|
layer['keycodes'][-1] += line[1]
|
||||||
|
|
||||||
|
return layers
|
||||||
|
|
||||||
|
|
||||||
|
def parse_keymap_c(keymap_file, use_cpp=True):
|
||||||
|
""" Parse a keymap.c file.
|
||||||
|
|
||||||
|
Currently only cares about the keymaps array.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
keymap_file: path of the keymap.c file
|
||||||
|
|
||||||
|
use_cpp: if True, pre-process the file with the C pre-processor
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
a dictionary containing the parsed keymap
|
||||||
|
"""
|
||||||
|
if use_cpp:
|
||||||
|
keymap_file = _c_preprocess(keymap_file)
|
||||||
|
else:
|
||||||
|
keymap_file = keymap_file.read_text()
|
||||||
|
|
||||||
|
keymap = dict()
|
||||||
|
keymap['layers'] = _get_layers(keymap_file)
|
||||||
|
return keymap
|
||||||
|
|
||||||
|
|
||||||
|
def c2json(keyboard, keymap, keymap_file, use_cpp=True):
|
||||||
|
""" Convert keymap.c to keymap.json
|
||||||
|
|
||||||
|
Args:
|
||||||
|
keyboard: The name of the keyboard
|
||||||
|
|
||||||
|
keymap: The name of the keymap
|
||||||
|
|
||||||
|
layout: The LAYOUT macro this keymap uses.
|
||||||
|
|
||||||
|
keymap_file: path of the keymap.c file
|
||||||
|
|
||||||
|
use_cpp: if True, pre-process the file with the C pre-processor
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
a dictionary in keymap.json format
|
||||||
|
"""
|
||||||
|
keymap_json = parse_keymap_c(keymap_file, use_cpp)
|
||||||
|
|
||||||
|
dirty_layers = keymap_json.pop('layers', None)
|
||||||
|
keymap_json['layers'] = list()
|
||||||
|
for layer in dirty_layers:
|
||||||
|
layer.pop('name')
|
||||||
|
layout = layer.pop('layout')
|
||||||
|
if not keymap_json.get('layout', False):
|
||||||
|
keymap_json['layout'] = layout
|
||||||
|
keymap_json['layers'].append(layer.pop('keycodes'))
|
||||||
|
|
||||||
|
keymap_json['keyboard'] = keyboard
|
||||||
|
keymap_json['keymap'] = keymap
|
||||||
|
return keymap_json
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
# Ignore generated info.json from pytest
|
||||||
|
info.json
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
import subprocess
|
from subprocess import STDOUT, PIPE
|
||||||
|
|
||||||
from qmk.commands import run
|
from qmk.commands import run
|
||||||
|
|
||||||
|
|
||||||
def check_subcommand(command, *args):
|
def check_subcommand(command, *args):
|
||||||
cmd = ['bin/qmk', command] + list(args)
|
cmd = ['bin/qmk', command] + list(args)
|
||||||
result = run(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
|
result = run(cmd, stdout=PIPE, stderr=STDOUT, universal_newlines=True)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
@@ -28,6 +29,11 @@ def test_compile():
|
|||||||
check_returncode(result)
|
check_returncode(result)
|
||||||
|
|
||||||
|
|
||||||
|
def test_compile_json():
|
||||||
|
result = check_subcommand('compile', '-kb', 'handwired/onekey/pytest', '-km', 'default_json')
|
||||||
|
check_returncode(result)
|
||||||
|
|
||||||
|
|
||||||
def test_flash():
|
def test_flash():
|
||||||
result = check_subcommand('flash', '-kb', 'handwired/onekey/pytest', '-km', 'default', '-n')
|
result = check_subcommand('flash', '-kb', 'handwired/onekey/pytest', '-km', 'default', '-n')
|
||||||
check_returncode(result)
|
check_returncode(result)
|
||||||
@@ -45,8 +51,9 @@ def test_config():
|
|||||||
|
|
||||||
|
|
||||||
def test_kle2json():
|
def test_kle2json():
|
||||||
result = check_subcommand('kle2json', 'kle.txt', '-f')
|
result = check_subcommand('kle2json', 'lib/python/qmk/tests/kle.txt', '-f')
|
||||||
check_returncode(result)
|
check_returncode(result)
|
||||||
|
assert 'Wrote out' in result.stdout
|
||||||
|
|
||||||
|
|
||||||
def test_doctor():
|
def test_doctor():
|
||||||
@@ -152,3 +159,15 @@ def test_info_matrix_render():
|
|||||||
assert 'LAYOUT_ortho_1x1' in result.stdout
|
assert 'LAYOUT_ortho_1x1' in result.stdout
|
||||||
assert '│0A│' in result.stdout
|
assert '│0A│' in result.stdout
|
||||||
assert 'Matrix for "LAYOUT_ortho_1x1"' in result.stdout
|
assert 'Matrix for "LAYOUT_ortho_1x1"' in result.stdout
|
||||||
|
|
||||||
|
|
||||||
|
def test_c2json():
|
||||||
|
result = check_subcommand("c2json", "-kb", "handwired/onekey/pytest", "-km", "default", "keyboards/handwired/onekey/keymaps/default/keymap.c")
|
||||||
|
check_returncode(result)
|
||||||
|
assert result.stdout.strip() == '{"keyboard": "handwired/onekey/pytest", "documentation": "This file is a keymap.json file for handwired/onekey/pytest", "keymap": "default", "layout": "LAYOUT_ortho_1x1", "layers": [["KC_A"]]}'
|
||||||
|
|
||||||
|
|
||||||
|
def test_c2json_nocpp():
|
||||||
|
result = check_subcommand("c2json", "--no-cpp", "-kb", "handwired/onekey/pytest", "-km", "default", "keyboards/handwired/onekey/keymaps/pytest_nocpp/keymap.c")
|
||||||
|
check_returncode(result)
|
||||||
|
assert result.stdout.strip() == '{"keyboard": "handwired/onekey/pytest", "documentation": "This file is a keymap.json file for handwired/onekey/pytest", "keymap": "default", "layout": "LAYOUT", "layers": [["KC_ENTER"]]}'
|
||||||
@@ -6,14 +6,34 @@ def test_template_onekey_proton_c():
|
|||||||
assert templ == qmk.keymap.DEFAULT_KEYMAP_C
|
assert templ == qmk.keymap.DEFAULT_KEYMAP_C
|
||||||
|
|
||||||
|
|
||||||
|
def test_template_onekey_proton_c_json():
|
||||||
|
templ = qmk.keymap.template('handwired/onekey/proton_c', type='json')
|
||||||
|
assert templ == {'keyboard': 'handwired/onekey/proton_c'}
|
||||||
|
|
||||||
|
|
||||||
def test_template_onekey_pytest():
|
def test_template_onekey_pytest():
|
||||||
templ = qmk.keymap.template('handwired/onekey/pytest')
|
templ = qmk.keymap.template('handwired/onekey/pytest')
|
||||||
assert templ == '#include QMK_KEYBOARD_H\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__};\n'
|
assert templ == '#include QMK_KEYBOARD_H\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__};\n'
|
||||||
|
|
||||||
|
|
||||||
|
def test_template_onekey_pytest_json():
|
||||||
|
templ = qmk.keymap.template('handwired/onekey/pytest', type='json')
|
||||||
|
assert templ == {'keyboard': 'handwired/onekey/pytest', "documentation": "This file is a keymap.json file for handwired/onekey/pytest"}
|
||||||
|
|
||||||
|
|
||||||
def test_generate_onekey_pytest():
|
def test_generate_onekey_pytest():
|
||||||
templ = qmk.keymap.generate('handwired/onekey/pytest', 'LAYOUT', [['KC_A']])
|
templ = qmk.keymap.generate('handwired/onekey/pytest', 'LAYOUT', [['KC_A']])
|
||||||
assert templ == '#include QMK_KEYBOARD_H\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\t[0] = LAYOUT(KC_A)};\n'
|
assert templ == '#include QMK_KEYBOARD_H\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\t[0] = LAYOUT(KC_A)};\n'
|
||||||
|
|
||||||
|
|
||||||
|
def test_generate_onekey_pytest_json():
|
||||||
|
templ = qmk.keymap.generate('handwired/onekey/pytest', 'LAYOUT', [['KC_A']], type='json', keymap='default')
|
||||||
|
assert templ == {"keyboard": "handwired/onekey/pytest", "documentation": "This file is a keymap.json file for handwired/onekey/pytest", "keymap": "default", "layout": "LAYOUT", "layers": [["KC_A"]]}
|
||||||
|
|
||||||
|
|
||||||
|
def test_parse_keymap_c():
|
||||||
|
parsed_keymap_c = qmk.keymap.parse_keymap_c('keyboards/handwired/onekey/keymaps/default/keymap.c')
|
||||||
|
assert parsed_keymap_c == {'layers': [{'name': '0', 'layout': 'LAYOUT_ortho_1x1', 'keycodes': ['KC_A']}]}
|
||||||
|
|
||||||
|
|
||||||
# FIXME(skullydazed): Add a test for qmk.keymap.write that mocks up an FD.
|
# FIXME(skullydazed): Add a test for qmk.keymap.write that mocks up an FD.
|
||||||
@@ -68,10 +68,12 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) {
|
|||||||
uint8_t tone = keycode - MIDI_TONE_MIN;
|
uint8_t tone = keycode - MIDI_TONE_MIN;
|
||||||
uint8_t velocity = compute_velocity(midi_config.velocity);
|
uint8_t velocity = compute_velocity(midi_config.velocity);
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
uint8_t note = midi_compute_note(keycode);
|
if (tone_status[tone] == MIDI_INVALID_NOTE) {
|
||||||
midi_send_noteon(&midi_device, channel, note, velocity);
|
uint8_t note = midi_compute_note(keycode);
|
||||||
dprintf("midi noteon channel:%d note:%d velocity:%d\n", channel, note, velocity);
|
midi_send_noteon(&midi_device, channel, note, velocity);
|
||||||
tone_status[tone] = note;
|
dprintf("midi noteon channel:%d note:%d velocity:%d\n", channel, note, velocity);
|
||||||
|
tone_status[tone] = note;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
uint8_t note = tone_status[tone];
|
uint8_t note = tone_status[tone];
|
||||||
if (note != MIDI_INVALID_NOTE) {
|
if (note != MIDI_INVALID_NOTE) {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ typedef void (*rgb_func_pointer)(void);
|
|||||||
*
|
*
|
||||||
* noinline to optimise for firmware size not speed (not in hot path)
|
* noinline to optimise for firmware size not speed (not in hot path)
|
||||||
*/
|
*/
|
||||||
#if !(defined(RGBLIGHT_DISABLE_KEYCODES) || defined(RGB_MATRIX_DISABLE_KEYCODES))
|
#if (defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)) || (defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES))
|
||||||
static void __attribute__((noinline)) handleKeycodeRGB(const uint8_t is_shifted, const rgb_func_pointer inc_func, const rgb_func_pointer dec_func) {
|
static void __attribute__((noinline)) handleKeycodeRGB(const uint8_t is_shifted, const rgb_func_pointer inc_func, const rgb_func_pointer dec_func) {
|
||||||
if (is_shifted) {
|
if (is_shifted) {
|
||||||
dec_func();
|
dec_func();
|
||||||
@@ -58,7 +58,7 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) {
|
|||||||
// Split keyboards need to trigger on key-up for edge-case issue
|
// Split keyboards need to trigger on key-up for edge-case issue
|
||||||
if (!record->event.pressed) {
|
if (!record->event.pressed) {
|
||||||
#endif
|
#endif
|
||||||
#if !(defined(RGBLIGHT_DISABLE_KEYCODES) || defined(RGB_MATRIX_DISABLE_KEYCODES))
|
#if (defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)) || (defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES))
|
||||||
uint8_t shifted = get_mods() & MOD_MASK_SHIFT;
|
uint8_t shifted = get_mods() & MOD_MASK_SHIFT;
|
||||||
#endif
|
#endif
|
||||||
switch (keycode) {
|
switch (keycode) {
|
||||||
|
|||||||
@@ -4,3 +4,4 @@ appdirs
|
|||||||
argcomplete
|
argcomplete
|
||||||
colorama
|
colorama
|
||||||
hjson
|
hjson
|
||||||
|
pygments
|
||||||
Loaded 100 of 104 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user