mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-08-24 05:28:53 +00:00
Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
d84eb14b3a | ||
![]() |
fe814be287 | ||
![]() |
6a0e155afe | ||
![]() |
917eebcfac | ||
![]() |
de288adb97 | ||
![]() |
78ae77f307 | ||
![]() |
b015c37922 | ||
![]() |
ae7b208d32 | ||
![]() |
9fe0c87e9a | ||
![]() |
b32a9a201d | ||
![]() |
fb980cf032 | ||
![]() |
d3286af398 | ||
![]() |
aed18a5ff3 | ||
![]() |
307be48de9 | ||
![]() |
a557a5b2c5 | ||
![]() |
a6b0a74d95 | ||
![]() |
393937b43f | ||
![]() |
efe8bd8e92 |
@@ -420,6 +420,12 @@ ifeq ($(strip $(LEADER_ENABLE)), yes)
|
||||
OPT_DEFS += -DLEADER_ENABLE
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/dip_switch.c
|
||||
OPT_DEFS += -DDIP_SWITCH_ENABLE
|
||||
endif
|
||||
|
||||
include $(DRIVER_PATH)/qwiic/qwiic.mk
|
||||
|
||||
QUANTUM_SRC:= \
|
||||
@@ -505,12 +511,13 @@ ifeq ($(strip $(MAGIC_ENABLE)), yes)
|
||||
OPT_DEFS += -DMAGIC_KEYCODE_ENABLE
|
||||
endif
|
||||
|
||||
GRAVE_ESC_ENABLE ?= yes
|
||||
ifeq ($(strip $(GRAVE_ESC_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_grave_esc.c
|
||||
OPT_DEFS += -DGRAVE_ESC_ENABLE
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(DYNAMIC_MACRO_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_dynamic_macro.c
|
||||
OPT_DEFS += -DDYNAMIC_MACRO_ENABLE
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/dip_switch.c
|
||||
OPT_DEFS += -DDIP_SWITCH_ENABLE
|
||||
endif
|
||||
|
@@ -276,9 +276,12 @@ There are a few different ways to set handedness for split keyboards (listed in
|
||||
* Default behavior for ARM
|
||||
* Required for AVR Teensy
|
||||
|
||||
* `#define SPLIT_USB_TIMEOUT 2500`
|
||||
* `#define SPLIT_USB_TIMEOUT 2000`
|
||||
* Maximum timeout when detecting master/slave when using `SPLIT_USB_DETECT`
|
||||
|
||||
* `#define SPLIT_USB_TIMEOUT_POLL 10`
|
||||
* Poll frequency when detecting master/slave when using `SPLIT_USB_DETECT`
|
||||
|
||||
# The `rules.mk` File
|
||||
|
||||
This is a [make](https://www.gnu.org/software/make/manual/make.html) file that is included by the top-level `Makefile`. It is used to set some information about the MCU that we will be compiling for as well as enabling and disabling certain features.
|
||||
|
@@ -198,10 +198,15 @@ This option changes the startup behavior to detect an active USB connection when
|
||||
?> This setting will stop the ability to demo using battery packs.
|
||||
|
||||
```c
|
||||
#define SPLIT_USB_TIMEOUT 2500
|
||||
#define SPLIT_USB_TIMEOUT 2000
|
||||
```
|
||||
This sets the maximum timeout when detecting master/slave when using `SPLIT_USB_DETECT`.
|
||||
|
||||
```c
|
||||
#define SPLIT_USB_TIMEOUT_POLL 10
|
||||
```
|
||||
This sets the poll frequency when detecting master/slave when using `SPLIT_USB_DETECT`
|
||||
|
||||
## Additional Resources
|
||||
|
||||
Nicinabox has a [very nice and detailed guide](https://github.com/nicinabox/lets-split-guide) for the Let's Split keyboard, that covers most everything you need to know, including troubleshooting information.
|
||||
|
@@ -3,8 +3,8 @@
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define VENDOR_ID 0x6F75 // OU
|
||||
#define PRODUCT_ID 0x7267 // RG
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER 1upkeyboards
|
||||
#define PRODUCT 1UP RGB Underglow PCB
|
||||
|
34
keyboards/1upkeyboards/1up60rgb/keymaps/via/keymap.c
Normal file
34
keyboards/1upkeyboards/1up60rgb/keymaps/via/keymap.c
Normal file
@@ -0,0 +1,34 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[0] = LAYOUT_all(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT,
|
||||
KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL),
|
||||
|
||||
[1] = LAYOUT_all(
|
||||
RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
[2] = 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, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_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, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
|
||||
|
||||
};
|
||||
|
2
keyboards/1upkeyboards/1up60rgb/keymaps/via/rules.mk
Normal file
2
keyboards/1upkeyboards/1up60rgb/keymaps/via/rules.mk
Normal file
@@ -0,0 +1,2 @@
|
||||
VIA_ENABLE = yes
|
||||
LTO_ENABLE = yes
|
75
keyboards/akb/raine/keymaps/mehadviceguy/keymap.c
Normal file
75
keyboards/akb/raine/keymaps/mehadviceguy/keymap.c
Normal file
@@ -0,0 +1,75 @@
|
||||
/* Copyright 2019 Elliot Powell
|
||||
*
|
||||
* 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
|
||||
|
||||
/*
|
||||
BLANK
|
||||
,----------------------------------------------------------------. ,--------------.
|
||||
| | | | | | | | | | | | | | | | | |
|
||||
|----------------------------------------------------------------| |--------------|
|
||||
| | | | | | | | | | | | | | | | |
|
||||
|------------------------------------------------------------ | |--------------|
|
||||
| | | | | | | | | | | | | | | | |
|
||||
|----------------------------------------------------------------' |--------------|
|
||||
| | | | | | | | | | | | ,----. | | | |
|
||||
|-----------------------------------------------------------' | | `--------------|
|
||||
| | | | | | ,--------------. | | |
|
||||
`------` '------------------------------` '-----' | | | | `---------'
|
||||
`--------------'
|
||||
*/
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT( /* Base
|
||||
,----------------------------------------------------------------. ,--------------.
|
||||
|Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | Bac| | / | * | + |
|
||||
|----------------------------------------------------------------| |--------------|
|
||||
| Tab | Q | W | E | R | T | Y | U | I | O | P | Enter| | 7 | 8 | 9 |
|
||||
|------------------------------------------------------------ | |--------------|
|
||||
|CapsLock | A | S | D | F | G | H | J | K | L | : | | | 4 | 5 | 6 |
|
||||
|----------------------------------------------------------------' |--------------|
|
||||
|Shift | \ | Z | X | C | V | B | N | M | , | . | ,----. | 1 | 2 | 3 |
|
||||
|-----------------------------------------------------------' | Up | `--------------|
|
||||
| Ctrl | | SPACE | |AltGr| ,--------------. | 0 | . |
|
||||
`------` '------------------------------` '-----' |L/fn|Down|Rght| `---------'
|
||||
`--------------'
|
||||
*/
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_BSPC, KC_PSLS, KC_PAST, KC_PPLS,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, _______, KC_P7, KC_P8, KC_P9,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, KC_P4, KC_P5, KC_P6,
|
||||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_UP, KC_P1, KC_P2, KC_P3,
|
||||
KC_LCTL, _______, _______, _______, KC_SPC, _______, _______, KC_RALT, LT(1, KC_LEFT), KC_DOWN, KC_RGHT, KC_P0, KC_PDOT),
|
||||
|
||||
[1] = LAYOUT( /* Second
|
||||
,----------------------------------------------------------------. ,--------------.
|
||||
| GRV| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9| F10| F11| F12 | |Nlck|Pscr| = |
|
||||
|----------------------------------------------------------------| |--------------|
|
||||
| | | | | | | | | | | ? | DEL | |Home| Up |PgUp|
|
||||
|------------------------------------------------------------ | |--------------|
|
||||
| | | | | | | | | | | ' |DEL | |Left|ScrL|Rght|
|
||||
|----------------------------------------------------------------' |--------------|
|
||||
| | | | | | | | | | [ | ] | ,----. |End |Down|PgDn|
|
||||
|-----------------------------------------------------------' | | `--------------|
|
||||
| GUI | | | | | ,--------------. | |Rest|
|
||||
`------` '------------------------------` '-----' | | | | `---------'
|
||||
`--------------'
|
||||
*/
|
||||
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_NLCK, KC_PSCR, KC_EQUAL,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SLSH, _______, KC_HOME, KC_UP, KC_PGUP,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_QUOT, KC_DEL, KC_LEFT, KC_SLCK, KC_RGHT,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, KC_END, KC_DOWN, KC_PGDN,
|
||||
KC_LGUI, _______, _______, _______, KC_LALT, _______, _______, _______, _______, _______, _______, _______, RESET),
|
||||
};
|
||||
|
68
keyboards/akb/raine/keymaps/mehadviceguy/readme.md
Normal file
68
keyboards/akb/raine/keymaps/mehadviceguy/readme.md
Normal file
@@ -0,0 +1,68 @@
|
||||
# Eyecandy
|
||||

|
||||
|
||||
# MehAdviceGuy Raine layout
|
||||
|
||||
Welcome to one of the most useless layouts you will find this side of town!
|
||||
The layout is born out of the need for AltGr to get to æø and å when you don't have a full bottom row.
|
||||
|
||||
## Base Layer (0)
|
||||
The base layer borrows alot from the Default Raine layer in regards to the alphas, and the numpad. But deviates ever so slightly by putting the layer key on the Left arrow key, relacing it from its original location with AltGr. And putting , and . on what was normally ? and right shift.
|
||||
```
|
||||
,----------------------------------------------------------------. ,--------------.
|
||||
|Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | Bac| | / | * | + |
|
||||
|----------------------------------------------------------------| |--------------|
|
||||
| Tab | Q | W | E | R | T | Y | U | I | O | P | Enter| | 7 | 8 | 9 |
|
||||
|------------------------------------------------------------ | |--------------|
|
||||
|CapsLock | A | S | D | F | G | H | J | K | L | : | | | 4 | 5 | 6 |
|
||||
|----------------------------------------------------------------' |--------------|
|
||||
|Shift | \ | Z | X | C | V | B | N | M | , | . | ,----. | 1 | 2 | 3 |
|
||||
|-----------------------------------------------------------' | Up | `--------------|
|
||||
| Ctrl | | SPACE | |AltGr| ,--------------. | 0 | . |
|
||||
`------` '------------------------------` '-----' |L/fn|Down|Rght| `---------'
|
||||
`--------------'
|
||||
```
|
||||
|
||||
## Modifier Layer (1)
|
||||
The Modifier layer also borrows a few things from the Default Raine layout, but changes a fair bit of things in it. These changes include:
|
||||
* Moving Delete to Enter and completing the F-row
|
||||
* Moving [ and ] to , and .
|
||||
* Adding GUI to Left Ctrl
|
||||
* Replacing insert with =
|
||||
* Adding / to the P position
|
||||
* Moving ' one to the left
|
||||
|
||||
```
|
||||
,----------------------------------------------------------------. ,--------------.
|
||||
| GRV| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9| F10| F11| F12 | |Nlck|Pscr| = |
|
||||
|----------------------------------------------------------------| |--------------|
|
||||
| | | | | | | | | | | ? | DEL | |Home| Up |PgUp|
|
||||
|------------------------------------------------------------ | |--------------|
|
||||
| | | | | | | | | | | ' |DEL | |Left|ScrL|Rght|
|
||||
|----------------------------------------------------------------' |--------------|
|
||||
| | | | | | | | | | [ | ] | ,----. |End |Down|PgDn|
|
||||
|-----------------------------------------------------------' | | `--------------|
|
||||
| GUI | | | | | ,--------------. | |Rest|
|
||||
`------` '------------------------------` '-----' | | | | `---------'
|
||||
`--------------'
|
||||
```
|
||||
|
||||
### Blank ASKII version if anyone needs!
|
||||
```
|
||||
,----------------------------------------------------------------. ,--------------.
|
||||
| | | | | | | | | | | | | | | | | |
|
||||
|----------------------------------------------------------------| |--------------|
|
||||
| | | | | | | | | | | | | | | | |
|
||||
|------------------------------------------------------------ | |--------------|
|
||||
| | | | | | | | | | | | | | | | |
|
||||
|----------------------------------------------------------------' |--------------|
|
||||
| | | | | | | | | | | | ,----. | | | |
|
||||
|-----------------------------------------------------------' | | `--------------|
|
||||
| | | | | | ,--------------. | | |
|
||||
`------` '------------------------------` '-----' | | | | `---------'
|
||||
`--------------'
|
||||
```
|
||||
|
||||
### KLE
|
||||

|
||||
%0A0&=%2F_%0A-&=+%0A%2F=&_x:0.25%3B&=%2F%2F&=*&=+%3B&@_w:1.5%3B&=Tab&=Q&=W&=E&=R&=T&=Y&=U&=I&=O&=P&_x:0.25&w:1.25&h:2&w2:1.5&h2:1&x2:-0.25%3B&=Enter&_x:0.25%3B&=7&=8&=9%3B&@_w:1.75%3B&=Caps%20Lock&=A&=S&=D&=F&=G&=H&=J&=K&=L&=%2F:%0A%2F%3B&_x:1.5%3B&=4&=5&=6%3B&@_w:1.25%3B&=Shift&=%7C%0A%5C&=Z&=X&=C&=V&=B&=N&=M&=%3C%0A,&_w:1.5%3B&=%3E%0A.&_x:1.5%3B&=1&=2&=3%3B&@_y:-0.75&x:12%3B&=%E2%86%91%3B&@_y:-0.25&w:1.25%3B&=Ctrl&_x:1&a:7&w:6.25%3B&=&_x:1&a:4&w:1.25%3B&=AltGr&_x:3.5%3B&=0&=.%3B&@_y:-0.75&x:11%3B&=%E2%86%90%0AFN&=%E2%86%93&=%E2%86%92%3B&@_y:0.25%3B&=%60&=F1&=F2&=F3&=F4&=F5&=F6&=F7&=F8&=F9&=F10&=F11&=F12&_x:0.25%3B&=NLock&=Print&=%2F=%3B&@_a:7&w:1.5%3B&=&=&=&=&=&=&=&=&=&=&_a:4%3B&=%2F%2F&_x:0.25&w:1.25&h:2&w2:1.5&h2:1&x2:-0.25%3B&=Del&_x:0.25%3B&=Home&=Up&=PgUp%3B&@_a:7&w:1.75%3B&=&=&=&=&=&=&=&=&=&=&_a:4%3B&='&_x:1.5%3B&=Left&=ScrLc&=Right%3B&@_a:7&w:1.25%3B&=&=&=&=&=&=&=&=&=&_a:4%3B&=%5B&_w:1.5%3B&=%5D&_x:1.5%3B&=End&=Down&=PgDn%3B&@_y:-0.75&x:12&a:7%3B&=%3B&@_y:-0.25&a:4&w:1.25%3B&=Win&_x:1&w:6.25%3B&=RAlt&_x:1&a:7&w:1.25%3B&=&_x:3.5%3B&=&_a:4%3B&=Rst%3B&@_y:-0.75&x:11&a:7%3B&=&=&=)
|
@@ -24,6 +24,8 @@
|
||||
#include "astar_mirrored.h"
|
||||
#elif KEYBOARD_atreus_teensy2
|
||||
#include "teensy2.h"
|
||||
#elif KEYBOARD_atreus_promicro
|
||||
#include "promicro.h"
|
||||
#endif
|
||||
|
||||
// This a shortcut to help you visually see your layout.
|
||||
|
5
keyboards/atreus/keymaps/ibnuda/config.h
Normal file
5
keyboards/atreus/keymaps/ibnuda/config.h
Normal file
@@ -0,0 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#define TAPPING_TERM 200
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
#define COMBO_COUNT 15
|
258
keyboards/atreus/keymaps/ibnuda/keymap.c
Normal file
258
keyboards/atreus/keymaps/ibnuda/keymap.c
Normal file
@@ -0,0 +1,258 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
typedef enum {
|
||||
SINGLE_TAP,
|
||||
SINGLE_HOLD,
|
||||
DOUBLE_TAP,
|
||||
} td_state_t;
|
||||
|
||||
static td_state_t td_state;
|
||||
|
||||
int current_dance(qk_tap_dance_state_t *state);
|
||||
|
||||
void dance_tmb_finished(qk_tap_dance_state_t *state, void *user_data);
|
||||
void dance_tmb_reset(qk_tap_dance_state_t *state, void *user_data);
|
||||
|
||||
// enum for tap dances.
|
||||
enum {
|
||||
TD_DLT_CTLDLT = 0,
|
||||
TD_SCLN_CLN,
|
||||
TD_LEFT_THUMB,
|
||||
};
|
||||
|
||||
// enum for combos.
|
||||
enum combos {
|
||||
// left hand combinations.
|
||||
COLON_COMMA,
|
||||
COMMA_DOT,
|
||||
DOT_P,
|
||||
Q_J,
|
||||
J_K,
|
||||
|
||||
// right hand combinations.
|
||||
L_R,
|
||||
R_C,
|
||||
C_G,
|
||||
V_W,
|
||||
W_M,
|
||||
|
||||
// both hands combinations.
|
||||
DOT_C,
|
||||
J_W,
|
||||
P_G,
|
||||
U_H,
|
||||
K_M,
|
||||
};
|
||||
|
||||
enum {
|
||||
_BASE,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST,
|
||||
_MUIS
|
||||
};
|
||||
|
||||
// thumb keys.
|
||||
#define ALT_ENT ALT_T(KC_ENT)
|
||||
#define SFT_ESC SFT_T(KC_ESC)
|
||||
|
||||
// home row mods.
|
||||
#define CT_O RCTL_T(KC_O)
|
||||
#define CT_N RCTL_T(KC_N)
|
||||
#define SH_A RSFT_T(KC_A)
|
||||
#define SH_S RSFT_T(KC_S)
|
||||
#define AL_E RALT_T(KC_E)
|
||||
#define AL_T RALT_T(KC_T)
|
||||
#define GU_I RGUI_T(KC_I)
|
||||
#define GU_D RGUI_T(KC_D)
|
||||
|
||||
// layer toggle.
|
||||
#define LW_BSPC LT(_LOWER, KC_BSPC)
|
||||
#define RS_SPC LT(_RAISE, KC_SPC)
|
||||
#define RS_D LT(_RAISE, KC_D)
|
||||
#define LW_I LT(_LOWER, KC_I)
|
||||
#define MU_QUOT LT(_MUIS, KC_QUOT)
|
||||
#define MU_Z LT(_MUIS, KC_Z)
|
||||
|
||||
// idk, man. not used, i guess.
|
||||
#define RAISE MO(_RAISE)
|
||||
#define LOWER MO(_LOWER)
|
||||
#define ADDDD MO(_ADJUST)
|
||||
#define MUIS MO(_MUIS)
|
||||
|
||||
// common shortcuts for windows and linux that i use.
|
||||
#define NXTTAB LCTL(KC_PGDN)
|
||||
#define PRVTAB LCTL(KC_PGUP)
|
||||
#define UPTAB LCTL(LSFT(KC_PGUP))
|
||||
#define DNTAB LCTL(LSFT(KC_PGDN))
|
||||
#define NXTWIN LALT(KC_TAB)
|
||||
#define PRVWIN LALT(LSFT(KC_TAB))
|
||||
#define CALDL LCTL(LALT(KC_DELT))
|
||||
#define TSKMGR LCTL(LSFT(KC_ESC))
|
||||
#define EXPLR LGUI(KC_E)
|
||||
#define LCKGUI LGUI(KC_L)
|
||||
#define CONPST LSFT(KC_INS)
|
||||
#define CLSGUI LALT(KC_F4)
|
||||
|
||||
// tap dances
|
||||
#define CTL_DLT TD(TD_DLT_CTLDLT)
|
||||
#define SM_CLN TD(TD_SCLN_CLN)
|
||||
#define LFT_TMB TD(TD_LEFT_THUMB)
|
||||
|
||||
// left hand combinations.
|
||||
const uint16_t PROGMEM colon_comma_combo[] = {KC_SCLN, KC_COMM, COMBO_END};
|
||||
const uint16_t PROGMEM comma_dot_combo[] = {KC_COMM, KC_DOT, COMBO_END};
|
||||
const uint16_t PROGMEM dot_p_combo[] = {KC_DOT, KC_P, COMBO_END};
|
||||
const uint16_t PROGMEM q_j_combo[] = {KC_Q, KC_J, COMBO_END};
|
||||
const uint16_t PROGMEM j_k_combo[] = {KC_J, KC_K, COMBO_END};
|
||||
|
||||
// right hand combinations.
|
||||
const uint16_t PROGMEM l_r_combo[] = {KC_L, KC_R, COMBO_END};
|
||||
const uint16_t PROGMEM r_c_combo[] = {KC_R, KC_C, COMBO_END};
|
||||
const uint16_t PROGMEM c_g_combo[] = {KC_C, KC_G, COMBO_END};
|
||||
const uint16_t PROGMEM v_w_combo[] = {KC_V, KC_W, COMBO_END};
|
||||
const uint16_t PROGMEM w_m_combo[] = {KC_W, KC_M, COMBO_END};
|
||||
|
||||
// both hand combinations.
|
||||
const uint16_t PROGMEM dot_c_combo[] = {KC_DOT, KC_C, COMBO_END};
|
||||
const uint16_t PROGMEM j_w_combo[] = {KC_J, KC_W, COMBO_END};
|
||||
const uint16_t PROGMEM u_h_combo[] = {KC_U, KC_H, COMBO_END};
|
||||
const uint16_t PROGMEM p_g_combo[] = {KC_P, KC_G, COMBO_END};
|
||||
const uint16_t PROGMEM k_m_combo[] = {KC_K, KC_M, COMBO_END};
|
||||
|
||||
combo_t key_combos[COMBO_COUNT] = {
|
||||
// left hand combinations.
|
||||
[COLON_COMMA] = COMBO(colon_comma_combo, KC_TAB),
|
||||
[COMMA_DOT] = COMBO(comma_dot_combo, KC_QUES),
|
||||
[DOT_P] = COMBO(dot_p_combo, KC_UNDS),
|
||||
[Q_J] = COMBO(q_j_combo, LCTL(KC_W)),
|
||||
[J_K] = COMBO(j_k_combo, KC_DELT),
|
||||
|
||||
// right hand combinations.
|
||||
[L_R] = COMBO(l_r_combo, KC_BSPC),
|
||||
[R_C] = COMBO(r_c_combo, KC_SLSH),
|
||||
[C_G] = COMBO(c_g_combo, KC_MINS),
|
||||
[V_W] = COMBO(v_w_combo, KC_APP),
|
||||
[W_M] = COMBO(w_m_combo, KC_DELT),
|
||||
|
||||
// both hand combinations.
|
||||
[DOT_C] = COMBO(dot_c_combo, KC_PGUP),
|
||||
[J_W] = COMBO(j_w_combo, KC_PGDN),
|
||||
[U_H] = COMBO(u_h_combo, KC_ENT),
|
||||
[P_G] = COMBO(p_g_combo, KC_HOME),
|
||||
[K_M] = COMBO(k_m_combo, KC_END),
|
||||
};
|
||||
|
||||
void dance_dlt_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count == 1) {
|
||||
register_code16(KC_DELT);
|
||||
} else {
|
||||
register_code16(C(KC_DELT));
|
||||
}
|
||||
}
|
||||
|
||||
void dance_dlt_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count == 1) {
|
||||
unregister_code16(KC_DELT);
|
||||
} else {
|
||||
unregister_code16(C(KC_DELT));
|
||||
}
|
||||
}
|
||||
|
||||
void dance_cln_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count == 1) {
|
||||
register_code(KC_LSFT);
|
||||
}
|
||||
register_code(KC_SCLN);
|
||||
}
|
||||
|
||||
void dance_cln_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count == 1) {
|
||||
unregister_code(KC_LSFT);
|
||||
}
|
||||
unregister_code(KC_SCLN);
|
||||
}
|
||||
|
||||
int current_dance(qk_tap_dance_state_t *state) {
|
||||
if (state->count == 1) {
|
||||
if (state->interrupted || !state->pressed) {
|
||||
return SINGLE_TAP;
|
||||
} else {
|
||||
return SINGLE_HOLD;
|
||||
}
|
||||
}
|
||||
if (state->count == 2) {
|
||||
return DOUBLE_TAP;
|
||||
} else {
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
|
||||
void dance_tmb_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||
td_state = current_dance(state);
|
||||
switch (td_state) {
|
||||
case SINGLE_TAP:
|
||||
register_code16(KC_ESC);
|
||||
break;
|
||||
case SINGLE_HOLD:
|
||||
register_mods(MOD_BIT(KC_LSFT));
|
||||
break;
|
||||
case DOUBLE_TAP:
|
||||
register_code16(KC_DELT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void dance_tmb_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||
switch (td_state) {
|
||||
case SINGLE_TAP:
|
||||
unregister_code16(KC_ESC);
|
||||
break;
|
||||
case SINGLE_HOLD:
|
||||
unregister_mods(MOD_BIT(KC_LSFT));
|
||||
break;
|
||||
case DOUBLE_TAP:
|
||||
unregister_code16(KC_DELT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
[TD_DLT_CTLDLT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_dlt_finished, dance_dlt_reset),
|
||||
[TD_SCLN_CLN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_cln_finished, dance_cln_reset),
|
||||
[TD_LEFT_THUMB] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_tmb_finished, dance_tmb_reset),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_BASE] = LAYOUT(
|
||||
SM_CLN, KC_COMM,KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L,
|
||||
SH_A, CT_O, AL_E, KC_U, GU_I, GU_D, KC_H, AL_T, CT_N, SH_S,
|
||||
MU_QUOT,KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, MU_Z,
|
||||
_______,_______,_______,_______,LW_BSPC,SFT_ESC, ALT_ENT,RS_SPC, _______,_______,_______,_______
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT(
|
||||
KC_EXLM,KC_AT, KC_UP, KC_LCBR,KC_RCBR, KC_BSLS,KC_7, KC_8, KC_9, KC_ASTR ,
|
||||
KC_HASH,KC_LEFT,KC_DOWN,KC_RGHT,KC_DLR, KC_EQL, KC_4, KC_5, KC_6, KC_TILD ,
|
||||
KC_LBRC,KC_RBRC,KC_LPRN,KC_RPRN,KC_AMPR, KC_GRV, KC_1, KC_2, KC_3, KC_PLUS ,
|
||||
_______,_______,_______,_______,ADDDD, _______, ALT_ENT,RS_SPC, _______,KC_0, _______,_______
|
||||
),
|
||||
[_LOWER] = LAYOUT(
|
||||
KC_ESC, KC_QUES,KC_UNDS,KC_F1, KC_F2, KC_F3, KC_F4, KC_MINS,KC_SLSH,KC_BSPC ,
|
||||
KC_LSFT,KC_TAB, KC_PGUP,KC_F5, KC_F6, KC_F7, KC_F8, KC_HOME,KC_LALT,KC_ENT ,
|
||||
KC_CLCK,KC_SLCK,KC_PGDN,KC_F9, KC_F10, KC_F11, KC_F12, KC_END, KC_INS, KC_SLSH ,
|
||||
_______,_______,_______,_______,ADDDD, _______, KC_DELT,ADDDD, _______,_______,_______,_______
|
||||
),
|
||||
[_ADJUST] = LAYOUT(
|
||||
_______,EXPLR, KC_UP, PRVTAB, PRVWIN, NXTWIN, NXTTAB, _______,_______,LCKGUI,
|
||||
TSKMGR, KC_LEFT,KC_DOWN,KC_RGHT,UPTAB, DNTAB, KC_ENT, KC_LGUI,_______,CALDL,
|
||||
_______,CLSGUI, _______,CONPST, RESET, _______,_______,_______,_______,_______,
|
||||
_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______
|
||||
),
|
||||
[_MUIS] = LAYOUT(
|
||||
_______,KC_BTN2,KC_MS_U,KC_BTN1,_______, _______,KC_BTN1,KC_MS_U,KC_BTN2,_______,
|
||||
_______,KC_MS_L,KC_MS_D,KC_MS_R,_______, _______,KC_MS_L,KC_MS_D,KC_MS_R,_______,
|
||||
_______,_______,KC_WH_D,KC_WH_U,_______, _______,KC_WH_U,KC_WH_D,_______,_______,
|
||||
_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______
|
||||
),
|
||||
};
|
7
keyboards/atreus/keymaps/ibnuda/rules.mk
Normal file
7
keyboards/atreus/keymaps/ibnuda/rules.mk
Normal file
@@ -0,0 +1,7 @@
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
|
||||
MOUSEKEY_ENABLE = yes
|
||||
COMBO_ENABLE = yes
|
||||
TAP_DANCE_ENABLE = yes
|
40
keyboards/atreus/promicro/config.h
Normal file
40
keyboards/atreus/promicro/config.h
Normal file
@@ -0,0 +1,40 @@
|
||||
/* Copyright 2019
|
||||
*
|
||||
* 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"
|
||||
|
||||
/*
|
||||
* 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 { F4, B2, B4, B5 }
|
||||
#if defined(PCBDOWN)
|
||||
#define MATRIX_COL_PINS { D0, D4, C6, D7, E6, B6, B3, B1, F7, F6, F5 }
|
||||
#else
|
||||
#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B6, E6, D7, C6, D4, D0 }
|
||||
#endif
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL*/
|
||||
#define DIODE_DIRECTION COL2ROW
|
16
keyboards/atreus/promicro/promicro.c
Normal file
16
keyboards/atreus/promicro/promicro.c
Normal file
@@ -0,0 +1,16 @@
|
||||
/* Copyright 2020
|
||||
*
|
||||
* 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 "promicro.h"
|
17
keyboards/atreus/promicro/promicro.h
Normal file
17
keyboards/atreus/promicro/promicro.h
Normal file
@@ -0,0 +1,17 @@
|
||||
/* Copyright 2019
|
||||
*
|
||||
* 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
|
12
keyboards/atreus/promicro/rules.mk
Normal file
12
keyboards/atreus/promicro/rules.mk
Normal file
@@ -0,0 +1,12 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = caterina
|
@@ -16,8 +16,9 @@ Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
If you would like to use one of the alternative controllers:
|
||||
|
||||
make atreus/astar:default:avrdude
|
||||
make atreus/teensy2:default:teensy
|
||||
make atreus/astar:default:flash
|
||||
make atreus/teensy2:default:flash
|
||||
make atreus/promicro:default:flash
|
||||
|
||||
If your keyboard layout is a mirror image of what you expected (i.e. you do not get QWERTY on the left but YTREWQ on the right), then you have an A-Star powered Atreus (older than March 2016) with PCB labels facing *down* instead of up. Specify that by adding `PCBDOWN=yes` to your `make` commands, e.g.
|
||||
|
||||
|
@@ -32,6 +32,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLOCK_SET,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
};
|
||||
|
366
keyboards/chidori/board.c
Normal file
366
keyboards/chidori/board.c
Normal file
@@ -0,0 +1,366 @@
|
||||
/* Copyright 2019 ENDO Katsuhiro <ka2hiro@kagizaraya.jp>
|
||||
*
|
||||
* 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 <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "wait.h"
|
||||
#include "print.h"
|
||||
#include "debug.h"
|
||||
#include "matrix.h"
|
||||
#include "quantum.h"
|
||||
#include "board.h"
|
||||
#include "i2c_master.h"
|
||||
|
||||
static board_info_t boards[NUM_BOARDS] = BOARD_INFOS;
|
||||
static board_info_t* master_board = NULL;
|
||||
|
||||
static bool board_is_master(board_info_t* board);
|
||||
static bool board_is_initialized(board_info_t* board);
|
||||
static board_info_t* get_board_by_index(uint8_t board_index);
|
||||
static uint8_t board_merge_led_config(board_info_t* board, uint8_t iodir);
|
||||
static uint8_t board_merge_led_status(board_info_t* board, uint8_t data);
|
||||
static void board_master_init(void);
|
||||
static void board_slave_init(void);
|
||||
|
||||
//
|
||||
// board interface
|
||||
//
|
||||
static void board_select_master_row(board_info_t* board, uint8_t row);
|
||||
static void board_unselect_master_row(board_info_t* board, uint8_t row);
|
||||
static void board_unselect_master_rows(board_info_t* board);
|
||||
static bool board_read_cols_on_master_row(board_info_t* board, matrix_row_t current_matrix[], uint8_t row);
|
||||
static void board_set_master_led(board_info_t* board, uint8_t led_index, bool status);
|
||||
static void board_select_slave_row(board_info_t* board, uint8_t row);
|
||||
static void board_unselect_slave_row(board_info_t* board, uint8_t row);
|
||||
static void board_unselect_slave_rows(board_info_t* board);
|
||||
static bool board_read_cols_on_slave_row(board_info_t* board, matrix_row_t current_matrix[], uint8_t row);
|
||||
static void board_set_slave_led(board_info_t* board, uint8_t led_index, bool status);
|
||||
|
||||
static board_interface_t master_interface = {board_select_master_row, board_unselect_master_row, board_unselect_master_rows, board_read_cols_on_master_row, board_set_master_led};
|
||||
static board_interface_t slave_interface = {board_select_slave_row, board_unselect_slave_row, board_unselect_slave_rows, board_read_cols_on_slave_row, board_set_slave_led};
|
||||
|
||||
static board_interface_t* get_interface(board_info_t* board) {
|
||||
if (board_is_master(board)) {
|
||||
return &master_interface;
|
||||
}
|
||||
return &slave_interface;
|
||||
}
|
||||
|
||||
static void board_set_master_led(board_info_t* board, uint8_t led_index, bool status) {
|
||||
pin_t pin = board->led_pins[led_index];
|
||||
board->led_status[led_index] = status;
|
||||
setPinOutput(pin);
|
||||
status ? writePinHigh(pin) : writePinLow(pin);
|
||||
}
|
||||
|
||||
static void board_set_slave_led(board_info_t* board, uint8_t led_index, bool status) {
|
||||
board->led_status[led_index] = status;
|
||||
uint8_t iodir = board_merge_led_config(board, 0xff);
|
||||
uint8_t data = board_merge_led_status(board, 0x00);
|
||||
i2c_writeReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_IODIRB, (const uint8_t*)&iodir, sizeof(iodir), BOARD_I2C_TIMEOUT);
|
||||
i2c_writeReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_OLATB, (const uint8_t*)&data, sizeof(data), BOARD_I2C_TIMEOUT);
|
||||
}
|
||||
|
||||
static uint8_t board_merge_led_config(board_info_t* board, uint8_t iodir) {
|
||||
for (uint8_t i = 0; i < NUM_LEDS; i++) {
|
||||
iodir &= PIN2MASK(board->led_pins[i]);
|
||||
}
|
||||
return iodir;
|
||||
}
|
||||
|
||||
static bool board_slave_config(board_info_t* board) {
|
||||
uint8_t set = 0xff;
|
||||
uint8_t clear = 0x00;
|
||||
i2c_status_t res = 0;
|
||||
|
||||
// Set to input
|
||||
res = i2c_writeReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_IODIRA, (const uint8_t*)&set, sizeof(set), BOARD_I2C_TIMEOUT);
|
||||
if (res < 0) return false;
|
||||
// RESTRICTION: LEDs only on PORT B.
|
||||
set = board_merge_led_config(board, set);
|
||||
res = i2c_writeReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_IODIRB, (const uint8_t*)&set, sizeof(set), BOARD_I2C_TIMEOUT);
|
||||
if (res < 0) return false;
|
||||
set = 0xff;
|
||||
|
||||
// Pull up for input - enable
|
||||
res = i2c_writeReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_GPPUA, (const uint8_t*)&set, sizeof(set), BOARD_I2C_TIMEOUT);
|
||||
if (res < 0) return false;
|
||||
res = i2c_writeReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_GPPUB, (const uint8_t*)&set, sizeof(set), BOARD_I2C_TIMEOUT);
|
||||
if (res < 0) return false;
|
||||
|
||||
// Disable interrupt
|
||||
res = i2c_writeReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_GPINTENA, (const uint8_t*)&clear, sizeof(clear), BOARD_I2C_TIMEOUT);
|
||||
if (res < 0) return false;
|
||||
res = i2c_writeReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_GPINTENB, (const uint8_t*)&clear, sizeof(clear), BOARD_I2C_TIMEOUT);
|
||||
if (res < 0) return false;
|
||||
|
||||
// Polarity - same logic
|
||||
res = i2c_writeReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_IPOLA, (const uint8_t*)&clear, sizeof(clear), BOARD_I2C_TIMEOUT);
|
||||
if (res < 0) return false;
|
||||
res = i2c_writeReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_IPOLB, (const uint8_t*)&clear, sizeof(clear), BOARD_I2C_TIMEOUT);
|
||||
if (res < 0) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void board_slave_init(void) {
|
||||
i2c_init();
|
||||
_delay_ms(500);
|
||||
|
||||
for (uint8_t i = 0; i < NUM_BOARDS; i++) {
|
||||
board_info_t* board = &boards[i];
|
||||
if (board_is_master(board)) {
|
||||
continue;
|
||||
}
|
||||
if (i2c_start(EXPANDER_ADDR(board->i2c_address), BOARD_I2C_TIMEOUT) != I2C_STATUS_SUCCESS) {
|
||||
continue;
|
||||
}
|
||||
i2c_stop();
|
||||
if (board_slave_config(board)) {
|
||||
board->initialized = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inline bool board_is_master(board_info_t* board) {
|
||||
if (board) {
|
||||
return board->master;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
inline uint8_t matrix_rows(void) { return MATRIX_ROWS; }
|
||||
|
||||
inline uint8_t matrix2board(uint8_t row) { return row % NUM_ROWS; }
|
||||
|
||||
inline uint8_t board_index(uint8_t row) { return row / NUM_ROWS; }
|
||||
|
||||
static board_info_t* get_master_board(void) {
|
||||
if (master_board == NULL) {
|
||||
for (uint8_t i = 0; i < NUM_BOARDS; i++) {
|
||||
if (boards[i].master) {
|
||||
master_board = &boards[i];
|
||||
return master_board;
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline bool board_is_initialized(board_info_t* board) { return board == NULL ? false : board->initialized; }
|
||||
|
||||
static board_info_t* get_board_by_index(uint8_t board_index) {
|
||||
if (board_index >= 0 && board_index < NUM_BOARDS) {
|
||||
if (!board_is_initialized(&boards[board_index])) {
|
||||
return NULL;
|
||||
}
|
||||
return &boards[board_index];
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static board_info_t* get_board(uint8_t row) {
|
||||
uint8_t idx = board_index(row);
|
||||
if (idx >= 0 && idx < NUM_BOARDS) {
|
||||
if (!board_is_initialized(&boards[idx])) {
|
||||
return NULL;
|
||||
}
|
||||
return &boards[idx];
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static uint8_t board_merge_led_status(board_info_t* board, uint8_t data) {
|
||||
if (!board_is_initialized(board)) {
|
||||
return data;
|
||||
}
|
||||
for (uint8_t i = 0; i < NUM_LEDS; i++) {
|
||||
bool status = board->led_status[i];
|
||||
if (status) {
|
||||
data |= (uint8_t)1 << PIN2INDEX(board->led_pins[i]);
|
||||
} else {
|
||||
data &= PIN2MASK(board->led_pins[i]);
|
||||
}
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
//
|
||||
// Functions for slave
|
||||
//
|
||||
static uint8_t board_read_slave_cols(board_info_t* board) {
|
||||
if (!board_is_initialized(board)) {
|
||||
return 0xff;
|
||||
}
|
||||
uint8_t data = 0xff;
|
||||
i2c_status_t res = i2c_readReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_GPIOA, &data, sizeof(data), BOARD_I2C_TIMEOUT);
|
||||
return (res < 0) ? 0xff : data;
|
||||
}
|
||||
|
||||
static void board_select_slave_row(board_info_t* board, uint8_t board_row) {
|
||||
if (!board_is_initialized(board)) {
|
||||
return;
|
||||
}
|
||||
uint8_t pin = board->row_pins[board_row];
|
||||
uint8_t iodir = board_merge_led_config(board, PIN2MASK(pin));
|
||||
uint8_t status = board_merge_led_status(board, PIN2MASK(pin));
|
||||
i2c_writeReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_IODIRB, (const uint8_t*)&iodir, sizeof(iodir), BOARD_I2C_TIMEOUT);
|
||||
i2c_writeReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_OLATB, (const uint8_t*)&status, sizeof(status), BOARD_I2C_TIMEOUT);
|
||||
}
|
||||
|
||||
static void board_unselect_slave_rows(board_info_t* board) {
|
||||
if (!board_is_initialized(board)) {
|
||||
return;
|
||||
}
|
||||
uint8_t iodir = board_merge_led_config(board, 0xff);
|
||||
uint8_t data = board_merge_led_status(board, 0x00);
|
||||
i2c_writeReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_IODIRB, (const uint8_t*)&iodir, sizeof(iodir), BOARD_I2C_TIMEOUT);
|
||||
i2c_writeReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_OLATB, (const uint8_t*)&data, sizeof(data), BOARD_I2C_TIMEOUT);
|
||||
}
|
||||
|
||||
static void board_unselect_slave_row(board_info_t* board, uint8_t board_row) { board_unselect_slave_rows(board); }
|
||||
|
||||
/*
|
||||
* row : matrix row (not board row)
|
||||
*/
|
||||
static bool board_read_cols_on_slave_row(board_info_t* board, matrix_row_t current_matrix[], uint8_t row) {
|
||||
matrix_row_t last_row_value = current_matrix[row];
|
||||
current_matrix[row] = 0;
|
||||
|
||||
uint8_t board_row = matrix2board(row);
|
||||
board_select_slave_row(board, board_row);
|
||||
wait_us(30);
|
||||
|
||||
uint8_t cols = board_read_slave_cols(board);
|
||||
for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
|
||||
uint8_t pin = board->col_pins[col_index];
|
||||
uint8_t pin_state = cols & PIN2BIT(pin);
|
||||
current_matrix[row] |= pin_state ? 0 : (1 << col_index);
|
||||
}
|
||||
board_unselect_slave_row(board, board_row);
|
||||
|
||||
return (last_row_value != current_matrix[row]);
|
||||
}
|
||||
|
||||
//
|
||||
// Functions for master board
|
||||
//
|
||||
static void board_select_master_row(board_info_t* board, uint8_t board_row) {
|
||||
setPinOutput(board->row_pins[board_row]);
|
||||
writePinLow(board->row_pins[board_row]);
|
||||
}
|
||||
|
||||
static void board_unselect_master_row(board_info_t* board, uint8_t board_row) { setPinInputHigh(board->row_pins[board_row]); }
|
||||
|
||||
static void board_unselect_master_rows(board_info_t* board) {
|
||||
if (!board) {
|
||||
return;
|
||||
}
|
||||
for (uint8_t x = 0; x < NUM_ROWS; x++) {
|
||||
setPinInput(board->row_pins[x]);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* row : matrix row (not board row)
|
||||
*/
|
||||
static bool board_read_cols_on_master_row(board_info_t* board, matrix_row_t current_matrix[], uint8_t row) {
|
||||
matrix_row_t last_row_value = current_matrix[row];
|
||||
current_matrix[row] = 0;
|
||||
|
||||
uint8_t board_row = matrix2board(row);
|
||||
board_select_master_row(board, board_row);
|
||||
wait_us(30);
|
||||
|
||||
for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
|
||||
uint8_t pin_state = readPin(board->col_pins[col_index]);
|
||||
current_matrix[row] |= pin_state ? 0 : (1 << col_index);
|
||||
}
|
||||
board_unselect_master_row(board, board_row);
|
||||
|
||||
return (last_row_value != current_matrix[row]);
|
||||
}
|
||||
|
||||
static void board_master_init(void) {
|
||||
board_info_t* board = get_master_board();
|
||||
if (!board) {
|
||||
return;
|
||||
}
|
||||
for (uint8_t x = 0; x < NUM_COLS; x++) {
|
||||
setPinInputHigh(board->col_pins[x]);
|
||||
}
|
||||
board->initialized = true;
|
||||
}
|
||||
|
||||
static void board_setup(void) {
|
||||
for (uint8_t i = 0; i < NUM_BOARDS; i++) {
|
||||
board_info_t* board = &boards[i];
|
||||
board->interface = get_interface(board);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Public functions
|
||||
//
|
||||
|
||||
// NOTE: Do not call this while matrix scanning...
|
||||
void board_set_led_by_index(uint8_t board_index, uint8_t led_index, bool status) {
|
||||
board_info_t* board = get_board_by_index(board_index);
|
||||
if (!board) return;
|
||||
if (led_index < 0 || led_index > NUM_LEDS) return;
|
||||
(*board->interface->set_led)(board, led_index, status);
|
||||
}
|
||||
|
||||
bool board_read_cols_on_row(matrix_row_t current_matrix[], uint8_t row) {
|
||||
bool result = false;
|
||||
board_info_t* board = get_board(row);
|
||||
if (!board) {
|
||||
return false;
|
||||
}
|
||||
result = (*board->interface->read_cols_on_row)(board, current_matrix, row);
|
||||
return result;
|
||||
}
|
||||
|
||||
void board_select_row(uint8_t row) {
|
||||
board_info_t* board = get_board(row);
|
||||
if (!board) {
|
||||
return;
|
||||
}
|
||||
uint8_t board_row = matrix2board(row);
|
||||
(*board->interface->select_row)(board, board_row);
|
||||
}
|
||||
|
||||
void board_unselect_row(uint8_t row) {
|
||||
board_info_t* board = get_board(row);
|
||||
if (!board) {
|
||||
return;
|
||||
}
|
||||
uint8_t board_row = matrix2board(row);
|
||||
(*board->interface->unselect_row)(board, board_row);
|
||||
}
|
||||
|
||||
void board_unselect_rows(void) {
|
||||
for (uint8_t i = 0; i < NUM_BOARDS; i++) {
|
||||
board_info_t* board = &boards[i];
|
||||
(*board->interface->unselect_rows)(board);
|
||||
}
|
||||
}
|
||||
|
||||
void board_init(void) {
|
||||
board_setup();
|
||||
board_master_init();
|
||||
board_slave_init();
|
||||
board_unselect_rows();
|
||||
}
|
190
keyboards/chidori/board.h
Normal file
190
keyboards/chidori/board.h
Normal file
@@ -0,0 +1,190 @@
|
||||
/* Copyright 2019 ENDO Katsuhiro <ka2hiro@kagizaraya.jp>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#define NUM_ROWS 4
|
||||
#define NUM_COLS 6
|
||||
#define NUM_LEDS 2
|
||||
|
||||
#define LED_GREEN 0
|
||||
#define LED_YELLOW 1
|
||||
|
||||
typedef struct board_info_t board_info_t;
|
||||
typedef struct board_interface_t board_interface_t;
|
||||
|
||||
struct board_info_t {
|
||||
bool master;
|
||||
bool initialized;
|
||||
uint8_t i2c_address;
|
||||
pin_t row_pins[NUM_ROWS];
|
||||
pin_t col_pins[NUM_COLS];
|
||||
pin_t led_pins[NUM_LEDS];
|
||||
bool led_status[NUM_LEDS];
|
||||
board_interface_t* interface;
|
||||
};
|
||||
|
||||
struct board_interface_t {
|
||||
void (*select_row)(board_info_t* board, uint8_t row);
|
||||
void (*unselect_row)(board_info_t* board, uint8_t row);
|
||||
void (*unselect_rows)(board_info_t* board);
|
||||
bool (*read_cols_on_row)(board_info_t* board, matrix_row_t current_matrix[], uint8_t row);
|
||||
void (*set_led)(board_info_t* board, uint8_t led_index, bool status);
|
||||
};
|
||||
|
||||
#define BOARD_I2C_TIMEOUT 20
|
||||
|
||||
#define GPA0 0x00
|
||||
#define GPA1 0x01
|
||||
#define GPA2 0x02
|
||||
#define GPA3 0x03
|
||||
#define GPA4 0x04
|
||||
#define GPA5 0x05
|
||||
#define GPA6 0x06
|
||||
#define GPA7 0x07
|
||||
#define GPB0 0x08
|
||||
#define GPB1 0x09
|
||||
#define GPB2 0x0A
|
||||
#define GPB3 0x0B
|
||||
#define GPB4 0x0C
|
||||
#define GPB5 0x0D
|
||||
#define GPB6 0x0E
|
||||
#define GPB7 0x0F
|
||||
|
||||
//#define PORTA 0x00
|
||||
//#define PORTB 0x01
|
||||
#define PORT_MASK 0x08
|
||||
#define PIN_MASK 0x07
|
||||
|
||||
#define PIN2REGISTER(reg, pin) (reg & ((pin & PORT_MASK) >> 3))
|
||||
#define PIN2PORT(pin) ((pin & PORT_MASK) >> 3)
|
||||
#define PIN2MASK(pin) (~(1 << PIN2INDEX(pin)))
|
||||
#define PIN2INDEX(pin) (pin & ~PORT_MASK)
|
||||
#define PIN2BIT(pin) (1 << PIN2INDEX(pin))
|
||||
|
||||
#define EXPANDER_ADDR(addr) (addr << 1)
|
||||
|
||||
#define EXPANDER_IODIR(pin) (0x00 | PIN2PORT(pin))
|
||||
#define EXPANDER_IPOL(pin) (0x02 | PIN2PORT(pin))
|
||||
#define EXPANDER_GPINTEN(pin) (0x04 | PIN2PORT(pin))
|
||||
#define EXPANDER_DEFVAL(pin) (0x06 | PIN2PORT(pin))
|
||||
#define EXPANDER_INTCON(pin) (0x08 | PIN2PORT(pin))
|
||||
#define EXPANDER_IOCON(pin) (0x0A | PIN2PORT(pin))
|
||||
#define EXPANDER_GPPU(pin) (0x0C | PIN2PORT(pin))
|
||||
#define EXPANDER_INTF(pin) (0x0E | PIN2PORT(pin))
|
||||
#define EXPANDER_INTCAP(pin) (0x10 | PIN2PORT(pin))
|
||||
#define EXPANDER_GPIO(pin) (0x12 | PIN2PORT(pin))
|
||||
#define EXPANDER_OLAT(pin) (0x14 | PIN2PORT(pin))
|
||||
|
||||
#define EXPANDER_IODIRA 0x00
|
||||
#define EXPANDER_IODIRB 0x01
|
||||
#define EXPANDER_IPOLA 0x02
|
||||
#define EXPANDER_IPOLB 0x03
|
||||
#define EXPANDER_GPINTENA 0x04
|
||||
#define EXPANDER_GPINTENB 0x05
|
||||
#define EXPANDER_DEFVALA 0x06
|
||||
#define EXPANDER_DEFVALB 0x07
|
||||
#define EXPANDER_INTCONA 0x08
|
||||
#define EXPANDER_INTCONB 0x09
|
||||
#define EXPANDER_IOCONA 0x0A
|
||||
#define EXPANDER_IOCONB 0x0B
|
||||
#define EXPANDER_GPPUA 0x0C
|
||||
#define EXPANDER_GPPUB 0x0D
|
||||
#define EXPANDER_INTFA 0x0E
|
||||
#define EXPANDER_INTFB 0x0F
|
||||
#define EXPANDER_INTCAPA 0x10
|
||||
#define EXPANDER_INTCAPB 0x11
|
||||
#define EXPANDER_GPIOA 0x12
|
||||
#define EXPANDER_GPIOB 0x13
|
||||
#define EXPANDER_OLATA 0x14
|
||||
#define EXPANDER_OLATB 0x15
|
||||
|
||||
//
|
||||
// Default board config
|
||||
//
|
||||
#ifndef NUM_BOARDS
|
||||
# define NUM_BOARDS 2
|
||||
#endif
|
||||
|
||||
// clang-format off
|
||||
#ifndef BOARD_INFOS
|
||||
#if NUM_BOARDS == 2
|
||||
#define BOARD_INFOS \
|
||||
{ \
|
||||
{ \
|
||||
true, \
|
||||
false, \
|
||||
0x00, \
|
||||
{ D4, D5, D6, D7 }, \
|
||||
{ D1, D0, C3, C2, C1, C0 }, \
|
||||
{ B1, B2 }, \
|
||||
{ false, false }, \
|
||||
NULL \
|
||||
}, \
|
||||
{ \
|
||||
false, \
|
||||
false, \
|
||||
0x20, \
|
||||
{ GPB4, GPB5, GPB6, GPB7 }, \
|
||||
{ GPA7, GPA6, GPA5, GPA4, GPA3, GPA2 }, \
|
||||
{ GPB0, GPB1 }, \
|
||||
{ false, false }, \
|
||||
NULL \
|
||||
}, \
|
||||
}
|
||||
#elif NUM_BOARDS == 3
|
||||
#define BOARD_INFOS \
|
||||
{ \
|
||||
{ \
|
||||
true, \
|
||||
false, \
|
||||
0x00, \
|
||||
{ D4, D5, D6, D7 }, \
|
||||
{ D1, D0, C3, C2, C1, C0 }, \
|
||||
{ B1, B2 }, \
|
||||
{ false, false }, \
|
||||
NULL \
|
||||
}, \
|
||||
{ \
|
||||
false, \
|
||||
false, \
|
||||
0x20, \
|
||||
{ GPB4, GPB5, GPB6, GPB7 }, \
|
||||
{ GPA7, GPA6, GPA5, GPA4, GPA3, GPA2 }, \
|
||||
{ GPB0, GPB1 }, \
|
||||
{ false, false }, \
|
||||
NULL \
|
||||
}, \
|
||||
{ \
|
||||
false, \
|
||||
false, \
|
||||
0x21, \
|
||||
{ GPB4, GPB5, GPB6, GPB7 }, \
|
||||
{ GPA7, GPA6, GPA5, GPA4, GPA3, GPA2 }, \
|
||||
{ GPB0, GPB1 }, \
|
||||
{ false, false }, \
|
||||
NULL \
|
||||
}, \
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
// clang-format on
|
||||
|
||||
void board_set_led_by_index(uint8_t board_index, uint8_t led_index, bool status);
|
||||
bool board_read_cols_on_row(matrix_row_t current_matrix[], uint8_t row);
|
||||
void board_select_row(uint8_t row);
|
||||
void board_unselect_row(uint8_t row);
|
||||
void board_unselect_rows(void);
|
||||
void board_init(void);
|
15
keyboards/chidori/chidori.c
Normal file
15
keyboards/chidori/chidori.c
Normal file
@@ -0,0 +1,15 @@
|
||||
/* Copyright 2019 ENDO Katsuhiro <ka2hiro@kagizaraya.jp>
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
59
keyboards/chidori/chidori.h
Normal file
59
keyboards/chidori/chidori.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/* Copyright 2019 ENDO Katsuhiro <ka2hiro@kagizaraya.jp>
|
||||
*
|
||||
* 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"
|
||||
|
||||
// clang-format off
|
||||
#define LAYOUT( \
|
||||
L01, L02, L03, L04, L05, L06, R01, R02, R03, R04, R05, R06, \
|
||||
L07, L08, L09, L10, L11, L12, R07, R08, R09, R10, R11, R12, \
|
||||
L13, L14, L15, L16, L17, L18, R13, R14, R15, R16, R17, R18, \
|
||||
L19, L20, L21, L22, L23, L24, R19, R20, R21, R22, R23, R24 \
|
||||
) \
|
||||
{ \
|
||||
{ L01, L02, L03, L04, L05, L06 }, \
|
||||
{ L07, L08, L09, L10, L11, L12 }, \
|
||||
{ L13, L14, L15, L16, L17, L18 }, \
|
||||
{ L19, L20, L21, L22, L23, L24 }, \
|
||||
{ R01, R02, R03, R04, R05, R06 }, \
|
||||
{ R07, R08, R09, R10, R11, R12 }, \
|
||||
{ R13, R14, R15, R16, R17, R18 }, \
|
||||
{ R19, R20, R21, R22, R23, R24 } \
|
||||
}
|
||||
|
||||
#define LAYOUT_extended( \
|
||||
L01, L02, L03, L04, L05, L06, M01, M02, M03, M04, M05, M06, R01, R02, R03, R04, R05, R06, \
|
||||
L07, L08, L09, L10, L11, L12, M07, M08, M09, M10, M11, M12, R07, R08, R09, R10, R11, R12, \
|
||||
L13, L14, L15, L16, L17, L18, M13, M14, M15, M16, M17, M18, R13, R14, R15, R16, R17, R18, \
|
||||
L19, L20, L21, L22, L23, L24, M19, M20, M21, M22, M23, M24, R19, R20, R21, R22, R23, R24 \
|
||||
) \
|
||||
{ \
|
||||
{ L01, L02, L03, L04, L05, L06 }, \
|
||||
{ L07, L08, L09, L10, L11, L12 }, \
|
||||
{ L13, L14, L15, L16, L17, L18 }, \
|
||||
{ L19, L20, L21, L22, L23, L24 }, \
|
||||
{ M01, M02, M03, M04, M05, M06 }, \
|
||||
{ M07, M08, M09, M10, M11, M12 }, \
|
||||
{ M13, M14, M15, M16, M17, M18 }, \
|
||||
{ M19, M20, M21, M22, M23, M24 }, \
|
||||
{ R01, R02, R03, R04, R05, R06 }, \
|
||||
{ R07, R08, R09, R10, R11, R12 }, \
|
||||
{ R13, R14, R15, R16, R17, R18 }, \
|
||||
{ R19, R20, R21, R22, R23, R24 } \
|
||||
}
|
||||
|
||||
// clang-format on
|
253
keyboards/chidori/config.h
Normal file
253
keyboards/chidori/config.h
Normal file
@@ -0,0 +1,253 @@
|
||||
/*
|
||||
Copyright 2019 ENDO Katsuhiro <ka2hiro@kagizaraya.jp>
|
||||
|
||||
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 0x3942
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Kagizaraya
|
||||
#define PRODUCT Chidori
|
||||
#define DESCRIPTION Yet another split keyboard made with only through - hole components
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 12
|
||||
#define MATRIX_COLS 6
|
||||
|
||||
/*
|
||||
* 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 \
|
||||
{ D0, D5 }
|
||||
#define MATRIX_COL_PINS \
|
||||
{ F1, F0, B0 }
|
||||
*/
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL*/
|
||||
// #define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/*
|
||||
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
||||
*/
|
||||
// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
|
||||
|
||||
// #define BACKLIGHT_PIN B7
|
||||
// #define BACKLIGHT_BREATHING
|
||||
// #define BACKLIGHT_LEVELS 3
|
||||
|
||||
// #define RGB_DI_PIN E2
|
||||
// #ifdef RGB_DI_PIN
|
||||
// #define RGBLED_NUM 16
|
||||
// #define RGBLIGHT_HUE_STEP 8
|
||||
// #define RGBLIGHT_SAT_STEP 8
|
||||
// #define RGBLIGHT_VAL_STEP 8
|
||||
// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
||||
// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||
// /*== all animations enable ==*/
|
||||
// #define RGBLIGHT_ANIMATIONS
|
||||
// /*== or choose animations ==*/
|
||||
// #define RGBLIGHT_EFFECT_BREATHING
|
||||
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
// #define RGBLIGHT_EFFECT_SNAKE
|
||||
// #define RGBLIGHT_EFFECT_KNIGHT
|
||||
// #define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
// #define RGBLIGHT_EFFECT_RGB_TEST
|
||||
// #define RGBLIGHT_EFFECT_ALTERNATING
|
||||
// /*== customize breathing effect ==*/
|
||||
// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
|
||||
// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
|
||||
// /*==== use exp() and sin() ====*/
|
||||
// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
|
||||
// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
|
||||
// #endif
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||
* This is 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
|
||||
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/* key combination for magic key command */
|
||||
/* defined by default; to change, uncomment and set to the combination you want */
|
||||
#define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_LCTL)))
|
||||
|
||||
/* 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_HELP H
|
||||
//#define MAGIC_KEY_HELP_ALT 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 0
|
||||
//#define MAGIC_KEY_LAYER0_ALT GRAVE
|
||||
//#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 B
|
||||
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
|
||||
//#define MAGIC_KEY_LOCK CAPS
|
||||
//#define MAGIC_KEY_EEPROM E
|
||||
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
|
||||
//#define MAGIC_KEY_NKRO N
|
||||
//#define MAGIC_KEY_SLEEP_LED Z
|
||||
|
||||
/*
|
||||
* 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
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* Prevent use of disabled MIDI features in the keymap */
|
||||
//#define MIDI_ENABLE_STRICT 1
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
//#define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||
|
||||
/*
|
||||
* HD44780 LCD Display Configuration
|
||||
*/
|
||||
/*
|
||||
#define LCD_LINES 2 //< number of visible lines of the display
|
||||
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
|
||||
|
||||
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
|
||||
|
||||
#if LCD_IO_MODE
|
||||
#define LCD_PORT PORTB //< port for the LCD lines
|
||||
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
|
||||
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
|
||||
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
|
||||
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
|
||||
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
|
||||
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
|
||||
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
|
||||
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
|
||||
#define LCD_RS_PORT LCD_PORT //< port for RS line
|
||||
#define LCD_RS_PIN 3 //< pin for RS line
|
||||
#define LCD_RW_PORT LCD_PORT //< port for RW line
|
||||
#define LCD_RW_PIN 2 //< pin for RW line
|
||||
#define LCD_E_PORT LCD_PORT //< port for Enable line
|
||||
#define LCD_E_PIN 1 //< pin for Enable line
|
||||
#endif
|
||||
*/
|
||||
|
||||
/* Bootmagic Lite key configuration */
|
||||
// #define BOOTMAGIC_LITE_ROW 0
|
||||
// #define BOOTMAGIC_LITE_COLUMN 0
|
25
keyboards/chidori/info.json
Normal file
25
keyboards/chidori/info.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"keyboard_name": "Chidori",
|
||||
"url": "",
|
||||
"maintainer": "ka2hiro",
|
||||
"width": 12,
|
||||
"height": 4,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0},
|
||||
{"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1},
|
||||
{"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2},
|
||||
{"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}
|
||||
]
|
||||
},
|
||||
"LAYOUT_extended": {
|
||||
"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":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0},
|
||||
{"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1},
|
||||
{"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2},
|
||||
{"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}, {"x":13, "y":3}, {"x":14, "y":3}, {"x":15, "y":3}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
48
keyboards/chidori/keymaps/default/config.h
Normal file
48
keyboards/chidori/keymaps/default/config.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/* Copyright 2019 ENDO Katsuhiro <ka2hiro@kagizaraya.jp>
|
||||
*
|
||||
* 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
|
||||
|
||||
/*
|
||||
* Board config
|
||||
*/
|
||||
/*
|
||||
#define NUM_BOARDS 2
|
||||
|
||||
#define BOARD_INFOS \
|
||||
{ \
|
||||
{ \
|
||||
true, \
|
||||
false, \
|
||||
0x00, \
|
||||
{ D4, D5, D6, D7 }, \
|
||||
{ D1, D0, C3, C2, C1, C0 }, \
|
||||
{ B1, B2 }, \
|
||||
{ false, false }, \
|
||||
NULL \
|
||||
}, \
|
||||
{ \
|
||||
false, \
|
||||
false, \
|
||||
0x20, \
|
||||
{ GPB4, GPB5, GPB6, GPB7 }, \
|
||||
{ GPA7, GPA6, GPA5, GPA4, GPA3, GPA2 }, \
|
||||
{ GPB0, GPB1 }, \
|
||||
{ false, false }, \
|
||||
NULL \
|
||||
}, \
|
||||
}
|
||||
*/
|
176
keyboards/chidori/keymaps/default/keymap.c
Normal file
176
keyboards/chidori/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,176 @@
|
||||
/* Copyright 2019 ENDO Katsuhiro <ka2hiro@kagizaraya.jp>
|
||||
*
|
||||
* 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 "board.h"
|
||||
|
||||
enum layer_number { _QWERTY = 0, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST };
|
||||
|
||||
// Defines the keycodes used by our macros in process_record_user
|
||||
enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK };
|
||||
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
#define ADJUST MO(_ADJUST)
|
||||
|
||||
// clang-format off
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* |ADJUST| Esc | Alt | GUI |LOWER |Space | | Space| RAISE| Left | Down | Up | Right|
|
||||
* `-----------------------------------------' `-----------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT(
|
||||
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_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_ENT,
|
||||
ADJUST, KC_ESC, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
/* Colemak
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | | K | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* |ADJUST| Esc | Alt | GUI |LOWER |Space | | Space| RAISE| Left | Down | Up | Right|
|
||||
* `-----------------------------------------' `-----------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = LAYOUT(
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
|
||||
KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
|
||||
ADJUST, KC_ESC, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Dvorak
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | Tab | ' | , | . | P | Y | | F | G | C | R | L | Bksp |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Ctrl | A | O | E | U | I | | D | H | T | N | S | / |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Shift| ; | Q | J | K | X | | B | M | W | V | Z |Enter |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* |ADJUST| Esc | Alt | GUI |LOWER |Space | | Space| RAISE| Left | Down | Up | Right|
|
||||
* `-----------------------------------------' `-----------------------------------------'
|
||||
*/
|
||||
[_DVORAK] = LAYOUT(
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC,
|
||||
KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH,
|
||||
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT,
|
||||
ADJUST, KC_ESC, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | | | | - | _ | + | { | } | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | Home | End | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------' `-----------------------------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT(
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
|
||||
_______, _______, _______, _______, _______, _______, KC_MINS, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | | F12 | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------' `-----------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | | Reset| | | | | | |Qwerty|Colemk|Dvorak| | Ins |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Caps | | | | | Mac | | Win | - | = |Print |ScLock|Pause |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | | | | KANA | | Home |PageDn|PageUp| End |
|
||||
* `-----------------------------------------' `-----------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT(
|
||||
_______, RESET, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, KC_INS,
|
||||
KC_CAPS, _______, _______, _______, _______, AG_NORM, AG_SWAP, KC_MINS, KC_EQL, KC_PSCR, KC_SLCK, KC_PAUS,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
|
||||
)
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
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;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
|
||||
board_set_led_by_index(0, LED_YELLOW, true);
|
||||
} else {
|
||||
board_set_led_by_index(0, LED_YELLOW, false);
|
||||
}
|
||||
if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
|
||||
board_set_led_by_index(1, LED_YELLOW, true);
|
||||
} else {
|
||||
board_set_led_by_index(1, LED_YELLOW, false);
|
||||
}
|
||||
}
|
1
keyboards/chidori/keymaps/default/readme.md
Normal file
1
keyboards/chidori/keymaps/default/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
# The default keymap for chidori
|
59
keyboards/chidori/keymaps/extended/config.h
Normal file
59
keyboards/chidori/keymaps/extended/config.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/* Copyright 2019 ENDO Katsuhiro <ka2hiro@kagizaraya.jp>
|
||||
*
|
||||
* 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
|
||||
|
||||
/*
|
||||
* Board config
|
||||
*/
|
||||
#define NUM_BOARDS 3
|
||||
|
||||
/*
|
||||
#define BOARD_INFOS \
|
||||
{ \
|
||||
{ \
|
||||
true, \
|
||||
false, \
|
||||
0x00, \
|
||||
{ D4, D5, D6, D7 }, \
|
||||
{ D1, D0, C3, C2, C1, C0 }, \
|
||||
{ B1, B2 }, \
|
||||
{ false, false }, \
|
||||
NULL \
|
||||
}, \
|
||||
{ \
|
||||
false, \
|
||||
false, \
|
||||
0x20, \
|
||||
{ GPB4, GPB5, GPB6, GPB7 }, \
|
||||
{ GPA7, GPA6, GPA5, GPA4, GPA3, GPA2 }, \
|
||||
{ GPB0, GPB1 }, \
|
||||
{ false, false }, \
|
||||
NULL \
|
||||
}, \
|
||||
{ \
|
||||
false, \
|
||||
false, \
|
||||
0x21, \
|
||||
{ GPB4, GPB5, GPB6, GPB7 }, \
|
||||
{ GPA7, GPA6, GPA5, GPA4, GPA3, GPA2 }, \
|
||||
{ GPB0, GPB1 }, \
|
||||
{ false, false }, \
|
||||
NULL \
|
||||
}, \
|
||||
}
|
||||
*/
|
||||
|
181
keyboards/chidori/keymaps/extended/keymap.c
Normal file
181
keyboards/chidori/keymaps/extended/keymap.c
Normal file
@@ -0,0 +1,181 @@
|
||||
/* Copyright 2019 ENDO Katsuhiro <ka2hiro@kagizaraya.jp>
|
||||
*
|
||||
* 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 "board.h"
|
||||
|
||||
enum layer_number { _QWERTY = 0, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST };
|
||||
|
||||
// Defines the keycodes used by our macros in process_record_user
|
||||
enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK };
|
||||
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
#define ADJUST MO(_ADJUST)
|
||||
|
||||
// clang-format off
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------. ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | | 7 | 8 | 9 | |NumLck| Esc |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------| |------+------+------| + |------+------|
|
||||
* | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | | 4 | 5 | 6 | | / | Tab |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | | 1 | 2 | 3 | | * | = |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------| |-------------+------|Enter |------+------|
|
||||
* |ADJUST| Esc | Alt | GUI |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| | 0 | . | | - | Bksp |
|
||||
* `-----------------------------------------' `-----------------------------------------' `-----------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_extended(
|
||||
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_P7, KC_P8, KC_P9, KC_PPLS, KC_NLCK, KC_ESC,
|
||||
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_P4, KC_P5, KC_P6, _______, KC_PSLS, KC_TAB,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , KC_P1, KC_P2, KC_P3, KC_PENT, KC_PAST, KC_PEQL,
|
||||
ADJUST, KC_ESC, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_P0, _______, KC_PDOT,_______, KC_PMNS, KC_BSPC
|
||||
),
|
||||
/* Colemak
|
||||
* ,-----------------------------------------. ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | | 7 | 8 | 9 | |NumLck| Esc |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------| |------+------+------| + |------+------|
|
||||
* | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' | | 4 | 5 | 6 | | / | Tab |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | | K | M | , | . | / |Enter | | 1 | 2 | 3 | | * | = |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------| |-------------+------|Enter |------+------|
|
||||
* |ADJUST| Esc | Alt | GUI |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| | 0 | . | | - | Bksp |
|
||||
* `-----------------------------------------' `-----------------------------------------' `-----------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = LAYOUT_extended(
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_NLCK, KC_ESC,
|
||||
KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_P4, KC_P5, KC_P6, _______, KC_PSLS, KC_TAB,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , KC_P1, KC_P2, KC_P3, KC_PENT, KC_PAST, KC_PEQL,
|
||||
ADJUST, KC_ESC, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_P0, _______, KC_PDOT,_______, KC_PMNS, KC_BSPC
|
||||
),
|
||||
|
||||
/* Dvorak
|
||||
* ,-----------------------------------------. ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | Tab | ' | , | . | P | Y | | F | G | C | R | L | Del | | 7 | 8 | 9 | |NumLck| Esc |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------| |------+------+------| + |------+------|
|
||||
* | Ctrl | A | O | E | U | I | | D | H | T | N | S | / | | 4 | 5 | 6 | | / | Tab |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Shift| ; | Q | J | K | X | | B | M | W | V | Z |Enter | | 1 | 2 | 3 | | * | = |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------| |-------------+------|Enter |------+------|
|
||||
* |ADJUST| Esc | Alt | GUI |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| | 0 | . | | - | Bksp |
|
||||
* `-----------------------------------------' `-----------------------------------------' `-----------------------------------------'
|
||||
*/
|
||||
[_DVORAK] = LAYOUT_extended(
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_NLCK, KC_ESC,
|
||||
KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, KC_P4, KC_P5, KC_P6, _______, KC_PSLS, KC_TAB,
|
||||
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , KC_P1, KC_P2, KC_P3, KC_PENT, KC_PAST, KC_PEQL,
|
||||
ADJUST, KC_ESC, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_P0, _______, KC_PDOT,_______, KC_PMNS, KC_BSPC
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------. ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | | 7 | 8 | 9 | |NumLck| Esc |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------| |------+------+------| + |------+------|
|
||||
* | | | | | | | | - | _ | + | { | } | | | | 4 | 5 | 6 | | / | Tab |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | Home | End | | | 1 | 2 | 3 | | * | = |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------| |-------------+------|Enter |------+------|
|
||||
* | | | | | | | | | | Next | Vol- | Vol+ | Play | | 0 | . | | - | Bksp |
|
||||
* `-----------------------------------------' `-----------------------------------------' `-----------------------------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT_extended(
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_NLCK, KC_ESC,
|
||||
_______, _______, _______, _______, _______, _______, KC_MINS, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_P4, KC_P5, KC_P6, _______, KC_PSLS, KC_TAB,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, _______, KC_P1, KC_P2, KC_P3, KC_PENT, KC_PAST, KC_PEQL,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_P0, _______, KC_PDOT,_______, KC_PMNS, KC_BSPC
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------. ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | | 7 | 8 | 9 | |NumLck| Esc |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------| |------+------+------| + |------+------|
|
||||
* | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | | 4 | 5 | 6 | | / | Tab |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | | F12 | | | | | | 1 | 2 | 3 | | * | = |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------| |-------------+------|Enter |------+------|
|
||||
* | | | | | | | | | | Next | Vol- | Vol+ | Play | | 0 | . | | - | Bksp |
|
||||
* `-----------------------------------------' `-----------------------------------------' `-----------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT_extended(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_NLCK, KC_ESC,
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_P4, KC_P5, KC_P6, _______, KC_PSLS, KC_TAB,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, KC_PAST, KC_PEQL,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_P0, _______, KC_PDOT,_______, KC_PMNS, KC_BSPC
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------. ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | | Reset| | | | | | |Qwerty|Colemk|Dvorak| | Ins | | 7 | 8 | 9 | |NumLck| Esc |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------| |------+------+------| + |------+------|
|
||||
* | Caps | | | | | Mac | | Win | - | = |Print |ScLock|Pause | | 4 | 5 | 6 | | / | Tab |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | | | | 1 | 2 | 3 | | * | = |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------| |-------------+------|Enter |------+------|
|
||||
* | | | | | | | | | | Home |PageDn|PageUp| End | | 0 | . | | - | Bksp |
|
||||
* `-----------------------------------------' `-----------------------------------------' `-----------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT_extended(
|
||||
_______, RESET, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, KC_INS, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_NLCK, KC_ESC,
|
||||
KC_CAPS, _______, _______, _______, _______, AG_NORM, AG_SWAP, KC_MINS, KC_EQL, KC_PSCR, KC_SLCK, KC_PAUS, KC_P4, KC_P5, KC_P6, _______, KC_PSLS, KC_TAB,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, KC_PAST, KC_PEQL,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_P0, _______, KC_PDOT,_______, KC_PMNS, KC_BSPC
|
||||
)
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
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;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
|
||||
board_set_led_by_index(0, LED_YELLOW, true);
|
||||
} else {
|
||||
board_set_led_by_index(0, LED_YELLOW, false);
|
||||
}
|
||||
if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
|
||||
board_set_led_by_index(1, LED_YELLOW, true);
|
||||
} else {
|
||||
board_set_led_by_index(1, LED_YELLOW, false);
|
||||
}
|
||||
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
|
||||
board_set_led_by_index(2, LED_YELLOW, true);
|
||||
} else {
|
||||
board_set_led_by_index(2, LED_YELLOW, false);
|
||||
}
|
||||
}
|
1
keyboards/chidori/keymaps/extended/readme.md
Normal file
1
keyboards/chidori/keymaps/extended/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
# The extended keymap for chidori
|
113
keyboards/chidori/matrix.c
Normal file
113
keyboards/chidori/matrix.c
Normal file
@@ -0,0 +1,113 @@
|
||||
/*
|
||||
Copyright 2012-2018 Jun Wako, Jack Humbert, Yiancar
|
||||
|
||||
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 <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "wait.h"
|
||||
#include "print.h"
|
||||
#include "debug.h"
|
||||
#include "util.h"
|
||||
#include "matrix.h"
|
||||
#include "debounce.h"
|
||||
#include "quantum.h"
|
||||
#include "board.h"
|
||||
|
||||
#if (MATRIX_COLS <= 8)
|
||||
# define print_matrix_header() print("\nr/c 01234567\n")
|
||||
# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row))
|
||||
# define matrix_bitpop(i) bitpop(matrix[i])
|
||||
# define ROW_SHIFTER ((uint8_t)1)
|
||||
#elif (MATRIX_COLS <= 16)
|
||||
# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n")
|
||||
# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row))
|
||||
# define matrix_bitpop(i) bitpop16(matrix[i])
|
||||
# define ROW_SHIFTER ((uint16_t)1)
|
||||
#elif (MATRIX_COLS <= 32)
|
||||
# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n")
|
||||
# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row))
|
||||
# define matrix_bitpop(i) bitpop32(matrix[i])
|
||||
# define ROW_SHIFTER ((uint32_t)1)
|
||||
#endif
|
||||
|
||||
#ifdef MATRIX_MASKED
|
||||
extern const matrix_row_t matrix_mask[];
|
||||
#endif
|
||||
|
||||
/* matrix state(1:on, 0:off) */
|
||||
static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values
|
||||
static matrix_row_t matrix[MATRIX_ROWS]; // debounced values
|
||||
|
||||
__attribute__((weak)) void matrix_init_quantum(void) { matrix_init_kb(); }
|
||||
|
||||
__attribute__((weak)) void matrix_scan_quantum(void) { matrix_scan_kb(); }
|
||||
|
||||
__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); }
|
||||
|
||||
__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); }
|
||||
|
||||
__attribute__((weak)) void matrix_init_user(void) {}
|
||||
|
||||
__attribute__((weak)) void matrix_scan_user(void) {}
|
||||
|
||||
inline matrix_row_t matrix_get_row(uint8_t row) {
|
||||
// Matrix mask lets you disable switches in the returned matrix data. For example, if you have a
|
||||
// switch blocker installed and the switch is always pressed.
|
||||
#ifdef MATRIX_MASKED
|
||||
return matrix[row] & matrix_mask[row];
|
||||
#else
|
||||
return matrix[row];
|
||||
#endif
|
||||
}
|
||||
|
||||
void matrix_print(void) {
|
||||
print_matrix_header();
|
||||
|
||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||
phex(row);
|
||||
print(": ");
|
||||
print_matrix_row(row);
|
||||
print("\n");
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_init(void) {
|
||||
// initialize key pins
|
||||
board_init();
|
||||
|
||||
// initialize matrix state: all keys off
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
raw_matrix[i] = 0;
|
||||
matrix[i] = 0;
|
||||
}
|
||||
|
||||
debounce_init(MATRIX_ROWS);
|
||||
|
||||
matrix_init_quantum();
|
||||
}
|
||||
|
||||
uint8_t matrix_scan(void) {
|
||||
bool changed = false;
|
||||
|
||||
// Set row, read cols
|
||||
for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) {
|
||||
changed |= board_read_cols_on_row(raw_matrix, current_row);
|
||||
}
|
||||
|
||||
debounce(raw_matrix, matrix, MATRIX_ROWS, changed);
|
||||
|
||||
matrix_scan_quantum();
|
||||
return 1;
|
||||
}
|
15
keyboards/chidori/readme.md
Normal file
15
keyboards/chidori/readme.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# chidori
|
||||
|
||||

|
||||
|
||||
Yet another split keyboard made with only through-hole components.
|
||||
|
||||
* Keyboard Maintainer: [ka2hiro](https://github.com/ka2hiro) [@ka2hiro](https://twitter.com/ka2hiro)
|
||||
* Hardware Supported: Chidori PCB, ATMEGA328P
|
||||
* Hardware Availability: [@kagizaraya](https://twitter.com/kagizaraya)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make chidori:default:usbasp
|
||||
|
||||
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).
|
44
keyboards/chidori/rules.mk
Normal file
44
keyboards/chidori/rules.mk
Normal file
@@ -0,0 +1,44 @@
|
||||
# MCU name
|
||||
MCU = atmega328p
|
||||
ARCH = AVR8
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = USBasp
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # 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 = 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
|
||||
MIDI_ENABLE = no # MIDI support
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||
|
||||
CUSTOM_MATRIX = yes
|
||||
|
||||
# project specific files
|
||||
SRC += matrix.c
|
||||
SRC += board.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
397
keyboards/chidori/usbconfig.h
Normal file
397
keyboards/chidori/usbconfig.h
Normal file
@@ -0,0 +1,397 @@
|
||||
/* Name: usbconfig.h
|
||||
* Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers
|
||||
* Author: Christian Starkjohann
|
||||
* Creation Date: 2005-04-01
|
||||
* Tabsize: 4
|
||||
* Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH
|
||||
* License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
|
||||
* This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $
|
||||
*/
|
||||
|
||||
#ifndef __usbconfig_h_included__
|
||||
#define __usbconfig_h_included__
|
||||
|
||||
#include "config.h"
|
||||
|
||||
/*
|
||||
General Description:
|
||||
This file is an example configuration (with inline documentation) for the USB
|
||||
driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is
|
||||
also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may
|
||||
wire the lines to any other port, as long as D+ is also wired to INT0 (or any
|
||||
other hardware interrupt, as long as it is the highest level interrupt, see
|
||||
section at the end of this file).
|
||||
*/
|
||||
|
||||
/* ---------------------------- Hardware Config ---------------------------- */
|
||||
|
||||
#define USB_CFG_IOPORTNAME D
|
||||
/* This is the port where the USB bus is connected. When you configure it to
|
||||
* "B", the registers PORTB, PINB and DDRB will be used.
|
||||
*/
|
||||
#define USB_CFG_DMINUS_BIT 3
|
||||
/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected.
|
||||
* This may be any bit in the port.
|
||||
*/
|
||||
#define USB_CFG_DPLUS_BIT 2
|
||||
/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected.
|
||||
* This may be any bit in the port. Please note that D+ must also be connected
|
||||
* to interrupt pin INT0! [You can also use other interrupts, see section
|
||||
* "Optional MCU Description" below, or you can connect D- to the interrupt, as
|
||||
* it is required if you use the USB_COUNT_SOF feature. If you use D- for the
|
||||
* interrupt, the USB interrupt will also be triggered at Start-Of-Frame
|
||||
* markers every millisecond.]
|
||||
*/
|
||||
#define USB_CFG_CLOCK_KHZ (F_CPU/1000)
|
||||
/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000,
|
||||
* 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code
|
||||
* require no crystal, they tolerate +/- 1% deviation from the nominal
|
||||
* frequency. All other rates require a precision of 2000 ppm and thus a
|
||||
* crystal!
|
||||
* Since F_CPU should be defined to your actual clock rate anyway, you should
|
||||
* not need to modify this setting.
|
||||
*/
|
||||
#define USB_CFG_CHECK_CRC 0
|
||||
/* Define this to 1 if you want that the driver checks integrity of incoming
|
||||
* data packets (CRC checks). CRC checks cost quite a bit of code size and are
|
||||
* currently only available for 18 MHz crystal clock. You must choose
|
||||
* USB_CFG_CLOCK_KHZ = 18000 if you enable this option.
|
||||
*/
|
||||
|
||||
/* ----------------------- Optional Hardware Config ------------------------ */
|
||||
|
||||
/* #define USB_CFG_PULLUP_IOPORTNAME D */
|
||||
/* If you connect the 1.5k pullup resistor from D- to a port pin instead of
|
||||
* V+, you can connect and disconnect the device from firmware by calling
|
||||
* the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h).
|
||||
* This constant defines the port on which the pullup resistor is connected.
|
||||
*/
|
||||
/* #define USB_CFG_PULLUP_BIT 4 */
|
||||
/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined
|
||||
* above) where the 1.5k pullup resistor is connected. See description
|
||||
* above for details.
|
||||
*/
|
||||
|
||||
/* --------------------------- Functional Range ---------------------------- */
|
||||
|
||||
#define USB_CFG_HAVE_INTRIN_ENDPOINT 1
|
||||
/* Define this to 1 if you want to compile a version with two endpoints: The
|
||||
* default control endpoint 0 and an interrupt-in endpoint (any other endpoint
|
||||
* number).
|
||||
*/
|
||||
#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1
|
||||
/* Define this to 1 if you want to compile a version with three endpoints: The
|
||||
* default control endpoint 0, an interrupt-in endpoint 3 (or the number
|
||||
* configured below) and a catch-all default interrupt-in endpoint as above.
|
||||
* You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature.
|
||||
*/
|
||||
#define USB_CFG_EP3_NUMBER 3
|
||||
/* If the so-called endpoint 3 is used, it can now be configured to any other
|
||||
* endpoint number (except 0) with this macro. Default if undefined is 3.
|
||||
*/
|
||||
/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */
|
||||
/* The above macro defines the startup condition for data toggling on the
|
||||
* interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1.
|
||||
* Since the token is toggled BEFORE sending any data, the first packet is
|
||||
* sent with the oposite value of this configuration!
|
||||
*/
|
||||
#define USB_CFG_IMPLEMENT_HALT 0
|
||||
/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature
|
||||
* for endpoint 1 (interrupt endpoint). Although you may not need this feature,
|
||||
* it is required by the standard. We have made it a config option because it
|
||||
* bloats the code considerably.
|
||||
*/
|
||||
#define USB_CFG_SUPPRESS_INTR_CODE 0
|
||||
/* Define this to 1 if you want to declare interrupt-in endpoints, but don't
|
||||
* want to send any data over them. If this macro is defined to 1, functions
|
||||
* usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if
|
||||
* you need the interrupt-in endpoints in order to comply to an interface
|
||||
* (e.g. HID), but never want to send any data. This option saves a couple
|
||||
* of bytes in flash memory and the transmit buffers in RAM.
|
||||
*/
|
||||
#define USB_CFG_INTR_POLL_INTERVAL 1
|
||||
/* If you compile a version with endpoint 1 (interrupt-in), this is the poll
|
||||
* interval. The value is in milliseconds and must not be less than 10 ms for
|
||||
* low speed devices.
|
||||
*/
|
||||
#define USB_CFG_IS_SELF_POWERED 0
|
||||
/* Define this to 1 if the device has its own power supply. Set it to 0 if the
|
||||
* device is powered from the USB bus.
|
||||
*/
|
||||
// max power draw with maxed white underglow measured at 120 mA (peaks)
|
||||
#define USB_CFG_MAX_BUS_POWER 100
|
||||
/* Set this variable to the maximum USB bus power consumption of your device.
|
||||
* The value is in milliamperes. [It will be divided by two since USB
|
||||
* communicates power requirements in units of 2 mA.]
|
||||
*/
|
||||
#define USB_CFG_IMPLEMENT_FN_WRITE 1
|
||||
/* Set this to 1 if you want usbFunctionWrite() to be called for control-out
|
||||
* transfers. Set it to 0 if you don't need it and want to save a couple of
|
||||
* bytes.
|
||||
*/
|
||||
#define USB_CFG_IMPLEMENT_FN_READ 0
|
||||
/* Set this to 1 if you need to send control replies which are generated
|
||||
* "on the fly" when usbFunctionRead() is called. If you only want to send
|
||||
* data from a static buffer, set it to 0 and return the data from
|
||||
* usbFunctionSetup(). This saves a couple of bytes.
|
||||
*/
|
||||
#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0
|
||||
/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints.
|
||||
* You must implement the function usbFunctionWriteOut() which receives all
|
||||
* interrupt/bulk data sent to any endpoint other than 0. The endpoint number
|
||||
* can be found in 'usbRxToken'.
|
||||
*/
|
||||
#define USB_CFG_HAVE_FLOWCONTROL 0
|
||||
/* Define this to 1 if you want flowcontrol over USB data. See the definition
|
||||
* of the macros usbDisableAllRequests() and usbEnableAllRequests() in
|
||||
* usbdrv.h.
|
||||
*/
|
||||
#define USB_CFG_DRIVER_FLASH_PAGE 0
|
||||
/* If the device has more than 64 kBytes of flash, define this to the 64 k page
|
||||
* where the driver's constants (descriptors) are located. Or in other words:
|
||||
* Define this to 1 for boot loaders on the ATMega128.
|
||||
*/
|
||||
#define USB_CFG_LONG_TRANSFERS 0
|
||||
/* Define this to 1 if you want to send/receive blocks of more than 254 bytes
|
||||
* in a single control-in or control-out transfer. Note that the capability
|
||||
* for long transfers increases the driver size.
|
||||
*/
|
||||
/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */
|
||||
/* This macro is a hook if you want to do unconventional things. If it is
|
||||
* defined, it's inserted at the beginning of received message processing.
|
||||
* If you eat the received message and don't want default processing to
|
||||
* proceed, do a return after doing your things. One possible application
|
||||
* (besides debugging) is to flash a status LED on each packet.
|
||||
*/
|
||||
/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */
|
||||
/* This macro is a hook if you need to know when an USB RESET occurs. It has
|
||||
* one parameter which distinguishes between the start of RESET state and its
|
||||
* end.
|
||||
*/
|
||||
/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */
|
||||
/* This macro (if defined) is executed when a USB SET_ADDRESS request was
|
||||
* received.
|
||||
*/
|
||||
#define USB_COUNT_SOF 0
|
||||
/* define this macro to 1 if you need the global variable "usbSofCount" which
|
||||
* counts SOF packets. This feature requires that the hardware interrupt is
|
||||
* connected to D- instead of D+.
|
||||
*/
|
||||
/* #ifdef __ASSEMBLER__
|
||||
* macro myAssemblerMacro
|
||||
* in YL, TCNT0
|
||||
* sts timer0Snapshot, YL
|
||||
* endm
|
||||
* #endif
|
||||
* #define USB_SOF_HOOK myAssemblerMacro
|
||||
* This macro (if defined) is executed in the assembler module when a
|
||||
* Start Of Frame condition is detected. It is recommended to define it to
|
||||
* the name of an assembler macro which is defined here as well so that more
|
||||
* than one assembler instruction can be used. The macro may use the register
|
||||
* YL and modify SREG. If it lasts longer than a couple of cycles, USB messages
|
||||
* immediately after an SOF pulse may be lost and must be retried by the host.
|
||||
* What can you do with this hook? Since the SOF signal occurs exactly every
|
||||
* 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in
|
||||
* designs running on the internal RC oscillator.
|
||||
* Please note that Start Of Frame detection works only if D- is wired to the
|
||||
* interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES!
|
||||
*/
|
||||
#define USB_CFG_CHECK_DATA_TOGGLING 0
|
||||
/* define this macro to 1 if you want to filter out duplicate data packets
|
||||
* sent by the host. Duplicates occur only as a consequence of communication
|
||||
* errors, when the host does not receive an ACK. Please note that you need to
|
||||
* implement the filtering yourself in usbFunctionWriteOut() and
|
||||
* usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable
|
||||
* for each control- and out-endpoint to check for duplicate packets.
|
||||
*/
|
||||
#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0
|
||||
/* define this macro to 1 if you want the function usbMeasureFrameLength()
|
||||
* compiled in. This function can be used to calibrate the AVR's RC oscillator.
|
||||
*/
|
||||
#define USB_USE_FAST_CRC 0
|
||||
/* The assembler module has two implementations for the CRC algorithm. One is
|
||||
* faster, the other is smaller. This CRC routine is only used for transmitted
|
||||
* messages where timing is not critical. The faster routine needs 31 cycles
|
||||
* per byte while the smaller one needs 61 to 69 cycles. The faster routine
|
||||
* may be worth the 32 bytes bigger code size if you transmit lots of data and
|
||||
* run the AVR close to its limit.
|
||||
*/
|
||||
|
||||
/* -------------------------- Device Description --------------------------- */
|
||||
|
||||
#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xED), ((VENDOR_ID >> 8) & 0xFE)
|
||||
/* USB vendor ID for the device, low byte first. If you have registered your
|
||||
* own Vendor ID, define it here. Otherwise you may use one of obdev's free
|
||||
* shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules!
|
||||
* *** IMPORTANT NOTE ***
|
||||
* This template uses obdev's shared VID/PID pair for Vendor Class devices
|
||||
* with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand
|
||||
* the implications!
|
||||
*/
|
||||
#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0x00), ((PRODUCT_ID >> 8) & 0x00)
|
||||
/* This is the ID of the product, low byte first. It is interpreted in the
|
||||
* scope of the vendor ID. If you have registered your own VID with usb.org
|
||||
* or if you have licensed a PID from somebody else, define it here. Otherwise
|
||||
* you may use one of obdev's free shared VID/PID pairs. See the file
|
||||
* USB-IDs-for-free.txt for details!
|
||||
* *** IMPORTANT NOTE ***
|
||||
* This template uses obdev's shared VID/PID pair for Vendor Class devices
|
||||
* with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand
|
||||
* the implications!
|
||||
*/
|
||||
#define USB_CFG_DEVICE_VERSION 0x00, 0x01
|
||||
/* Version number of the device: Minor number first, then major number.
|
||||
*/
|
||||
#define USB_CFG_VENDOR_NAME 'k','a','g','i','z','a','r','a','y','a'
|
||||
#define USB_CFG_VENDOR_NAME_LEN 10
|
||||
/* These two values define the vendor name returned by the USB device. The name
|
||||
* must be given as a list of characters under single quotes. The characters
|
||||
* are interpreted as Unicode (UTF-16) entities.
|
||||
* If you don't want a vendor name string, undefine these macros.
|
||||
* ALWAYS define a vendor name containing your Internet domain name if you use
|
||||
* obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for
|
||||
* details.
|
||||
*/
|
||||
#define USB_CFG_DEVICE_NAME 'C', 'h', 'i', 'd', 'o', 'r', 'i'
|
||||
#define USB_CFG_DEVICE_NAME_LEN 7
|
||||
/* Same as above for the device name. If you don't want a device name, undefine
|
||||
* the macros. See the file USB-IDs-for-free.txt before you assign a name if
|
||||
* you use a shared VID/PID.
|
||||
*/
|
||||
//#define USB_CFG_SERIAL_NUMBER 'd','m','9','r','e','c','o','r','d','s','.','c','o','m',':','p','1'
|
||||
//#define USB_CFG_SERIAL_NUMBER_LEN 17
|
||||
/* Same as above for the serial number. If you don't want a serial number,
|
||||
* undefine the macros.
|
||||
* It may be useful to provide the serial number through other means than at
|
||||
* compile time. See the section about descriptor properties below for how
|
||||
* to fine tune control over USB descriptors such as the string descriptor
|
||||
* for the serial number.
|
||||
*/
|
||||
#define USB_CFG_DEVICE_CLASS 0
|
||||
#define USB_CFG_DEVICE_SUBCLASS 0
|
||||
/* See USB specification if you want to conform to an existing device class.
|
||||
* Class 0xff is "vendor specific".
|
||||
*/
|
||||
#define USB_CFG_INTERFACE_CLASS 3 /* HID */
|
||||
#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */
|
||||
#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */
|
||||
/* See USB specification if you want to conform to an existing device class or
|
||||
* protocol. The following classes must be set at interface level:
|
||||
* HID class is 3, no subclass and protocol required (but may be useful!)
|
||||
* CDC class is 2, use subclass 2 and protocol 1 for ACM
|
||||
*/
|
||||
#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0
|
||||
/* Define this to the length of the HID report descriptor, if you implement
|
||||
* an HID device. Otherwise don't define it or define it to 0.
|
||||
* If you use this define, you must add a PROGMEM character array named
|
||||
* "usbHidReportDescriptor" to your code which contains the report descriptor.
|
||||
* Don't forget to keep the array and this define in sync!
|
||||
*/
|
||||
|
||||
/* #define USB_PUBLIC static */
|
||||
/* Use the define above if you #include usbdrv.c instead of linking against it.
|
||||
* This technique saves a couple of bytes in flash memory.
|
||||
*/
|
||||
|
||||
/* ------------------- Fine Control over USB Descriptors ------------------- */
|
||||
/* If you don't want to use the driver's default USB descriptors, you can
|
||||
* provide our own. These can be provided as (1) fixed length static data in
|
||||
* flash memory, (2) fixed length static data in RAM or (3) dynamically at
|
||||
* runtime in the function usbFunctionDescriptor(). See usbdrv.h for more
|
||||
* information about this function.
|
||||
* Descriptor handling is configured through the descriptor's properties. If
|
||||
* no properties are defined or if they are 0, the default descriptor is used.
|
||||
* Possible properties are:
|
||||
* + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched
|
||||
* at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is
|
||||
* used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if
|
||||
* you want RAM pointers.
|
||||
* + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found
|
||||
* in static memory is in RAM, not in flash memory.
|
||||
* + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash),
|
||||
* the driver must know the descriptor's length. The descriptor itself is
|
||||
* found at the address of a well known identifier (see below).
|
||||
* List of static descriptor names (must be declared PROGMEM if in flash):
|
||||
* char usbDescriptorDevice[];
|
||||
* char usbDescriptorConfiguration[];
|
||||
* char usbDescriptorHidReport[];
|
||||
* char usbDescriptorString0[];
|
||||
* int usbDescriptorStringVendor[];
|
||||
* int usbDescriptorStringDevice[];
|
||||
* int usbDescriptorStringSerialNumber[];
|
||||
* Other descriptors can't be provided statically, they must be provided
|
||||
* dynamically at runtime.
|
||||
*
|
||||
* Descriptor properties are or-ed or added together, e.g.:
|
||||
* #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18))
|
||||
*
|
||||
* The following descriptors are defined:
|
||||
* USB_CFG_DESCR_PROPS_DEVICE
|
||||
* USB_CFG_DESCR_PROPS_CONFIGURATION
|
||||
* USB_CFG_DESCR_PROPS_STRINGS
|
||||
* USB_CFG_DESCR_PROPS_STRING_0
|
||||
* USB_CFG_DESCR_PROPS_STRING_VENDOR
|
||||
* USB_CFG_DESCR_PROPS_STRING_PRODUCT
|
||||
* USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER
|
||||
* USB_CFG_DESCR_PROPS_HID
|
||||
* USB_CFG_DESCR_PROPS_HID_REPORT
|
||||
* USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver)
|
||||
*
|
||||
* Note about string descriptors: String descriptors are not just strings, they
|
||||
* are Unicode strings prefixed with a 2 byte header. Example:
|
||||
* int serialNumberDescriptor[] = {
|
||||
* USB_STRING_DESCRIPTOR_HEADER(6),
|
||||
* 'S', 'e', 'r', 'i', 'a', 'l'
|
||||
* };
|
||||
*/
|
||||
|
||||
#define USB_CFG_DESCR_PROPS_DEVICE 0
|
||||
#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC
|
||||
//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0
|
||||
#define USB_CFG_DESCR_PROPS_STRINGS 0
|
||||
#define USB_CFG_DESCR_PROPS_STRING_0 0
|
||||
#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0
|
||||
#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0
|
||||
#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0
|
||||
#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC
|
||||
//#define USB_CFG_DESCR_PROPS_HID 0
|
||||
#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC
|
||||
//#define USB_CFG_DESCR_PROPS_HID_REPORT 0
|
||||
#define USB_CFG_DESCR_PROPS_UNKNOWN 0
|
||||
|
||||
#define usbMsgPtr_t unsigned short
|
||||
/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to
|
||||
* a scalar type here because gcc generates slightly shorter code for scalar
|
||||
* arithmetics than for pointer arithmetics. Remove this define for backward
|
||||
* type compatibility or define it to an 8 bit type if you use data in RAM only
|
||||
* and all RAM is below 256 bytes (tiny memory model in IAR CC).
|
||||
*/
|
||||
|
||||
/* ----------------------- Optional MCU Description ------------------------ */
|
||||
|
||||
/* The following configurations have working defaults in usbdrv.h. You
|
||||
* usually don't need to set them explicitly. Only if you want to run
|
||||
* the driver on a device which is not yet supported or with a compiler
|
||||
* which is not fully supported (such as IAR C) or if you use a differnt
|
||||
* interrupt than INT0, you may have to define some of these.
|
||||
*/
|
||||
/* #define USB_INTR_CFG MCUCR */
|
||||
/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */
|
||||
/* #define USB_INTR_CFG_CLR 0 */
|
||||
/* #define USB_INTR_ENABLE GIMSK */
|
||||
/* #define USB_INTR_ENABLE_BIT INT0 */
|
||||
/* #define USB_INTR_PENDING GIFR */
|
||||
/* #define USB_INTR_PENDING_BIT INTF0 */
|
||||
/* #define USB_INTR_VECTOR INT0_vect */
|
||||
|
||||
/* Set INT1 for D- falling edge to count SOF */
|
||||
/* #define USB_INTR_CFG EICRA */
|
||||
// #define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10))
|
||||
// /* #define USB_INTR_CFG_CLR 0 */
|
||||
// /* #define USB_INTR_ENABLE EIMSK */
|
||||
// #define USB_INTR_ENABLE_BIT INT1
|
||||
// /* #define USB_INTR_PENDING EIFR */
|
||||
// #define USB_INTR_PENDING_BIT INTF1
|
||||
// #define USB_INTR_VECTOR INT1_vect
|
||||
|
||||
#endif /* __usbconfig_h_included__ */
|
@@ -20,18 +20,22 @@
|
||||
#endif
|
||||
|
||||
#ifndef SPLIT_USB_TIMEOUT
|
||||
# define SPLIT_USB_TIMEOUT 2500
|
||||
# define SPLIT_USB_TIMEOUT 2000
|
||||
#endif
|
||||
|
||||
#ifndef SPLIT_USB_TIMEOUT_POLL
|
||||
# define SPLIT_USB_TIMEOUT_POLL 10
|
||||
#endif
|
||||
|
||||
volatile bool isLeftHand = true;
|
||||
|
||||
bool waitForUsb(void) {
|
||||
for (uint8_t i = 0; i < (SPLIT_USB_TIMEOUT / 100); i++) {
|
||||
// This will return true of a USB connection has been established
|
||||
for (uint8_t i = 0; i < (SPLIT_USB_TIMEOUT / SPLIT_USB_TIMEOUT_POLL); i++) {
|
||||
// This will return true if a USB connection has been established
|
||||
if (UDADDR & _BV(ADDEN)) {
|
||||
return true;
|
||||
}
|
||||
wait_ms(100);
|
||||
wait_ms(SPLIT_USB_TIMEOUT_POLL);
|
||||
}
|
||||
|
||||
// Avoid NO_USB_STARTUP_CHECK - Disable USB as the previous checks seem to enable it somehow
|
||||
|
@@ -1,23 +0,0 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
#endif
|
@@ -1,8 +1,7 @@
|
||||
#ifndef DELTASPLIT75_H
|
||||
#define DELTASPLIT75_H
|
||||
|
||||
#include "v2.h"
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#endif
|
||||
#ifdef KEYBOARD_deltasplit75_v2
|
||||
# include "v2.h"
|
||||
#endif
|
||||
|
@@ -1,2 +0,0 @@
|
||||
:0B0000000000000000000000000001F4
|
||||
:00000001FF
|
@@ -1,2 +0,0 @@
|
||||
:0B0000000000000000000000000000F5
|
||||
:00000001FF
|
@@ -1,162 +0,0 @@
|
||||
#include <util/twi.h>
|
||||
#include <avr/io.h>
|
||||
#include <stdlib.h>
|
||||
#include <avr/interrupt.h>
|
||||
#include <util/twi.h>
|
||||
#include <stdbool.h>
|
||||
#include "i2c.h"
|
||||
|
||||
#ifdef USE_I2C
|
||||
|
||||
// Limits the amount of we wait for any one i2c transaction.
|
||||
// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is
|
||||
// 9 bits, a single transaction will take around 90μs to complete.
|
||||
//
|
||||
// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit
|
||||
// poll loop takes at least 8 clock cycles to execute
|
||||
#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8
|
||||
|
||||
#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE)
|
||||
|
||||
volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
|
||||
|
||||
static volatile uint8_t slave_buffer_pos;
|
||||
static volatile bool slave_has_register_set = false;
|
||||
|
||||
// Wait for an i2c operation to finish
|
||||
inline static
|
||||
void i2c_delay(void) {
|
||||
uint16_t lim = 0;
|
||||
while(!(TWCR & (1<<TWINT)) && lim < I2C_LOOP_TIMEOUT)
|
||||
lim++;
|
||||
|
||||
// easier way, but will wait slightly longer
|
||||
// _delay_us(100);
|
||||
}
|
||||
|
||||
// Setup twi to run at 100kHz
|
||||
void i2c_master_init(void) {
|
||||
// no prescaler
|
||||
TWSR = 0;
|
||||
// Set TWI clock frequency to SCL_CLOCK. Need TWBR>10.
|
||||
// Check datasheets for more info.
|
||||
TWBR = ((F_CPU/SCL_CLOCK)-16)/2;
|
||||
}
|
||||
|
||||
// Start a transaction with the given i2c slave address. The direction of the
|
||||
// transfer is set with I2C_READ and I2C_WRITE.
|
||||
// returns: 0 => success
|
||||
// 1 => error
|
||||
uint8_t i2c_master_start(uint8_t address) {
|
||||
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTA);
|
||||
|
||||
i2c_delay();
|
||||
|
||||
// check that we started successfully
|
||||
if ( (TW_STATUS != TW_START) && (TW_STATUS != TW_REP_START))
|
||||
return 1;
|
||||
|
||||
TWDR = address;
|
||||
TWCR = (1<<TWINT) | (1<<TWEN);
|
||||
|
||||
i2c_delay();
|
||||
|
||||
if ( (TW_STATUS != TW_MT_SLA_ACK) && (TW_STATUS != TW_MR_SLA_ACK) )
|
||||
return 1; // slave did not acknowledge
|
||||
else
|
||||
return 0; // success
|
||||
}
|
||||
|
||||
|
||||
// Finish the i2c transaction.
|
||||
void i2c_master_stop(void) {
|
||||
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
|
||||
|
||||
uint16_t lim = 0;
|
||||
while(!(TWCR & (1<<TWSTO)) && lim < I2C_LOOP_TIMEOUT)
|
||||
lim++;
|
||||
}
|
||||
|
||||
// Write one byte to the i2c slave.
|
||||
// returns 0 => slave ACK
|
||||
// 1 => slave NACK
|
||||
uint8_t i2c_master_write(uint8_t data) {
|
||||
TWDR = data;
|
||||
TWCR = (1<<TWINT) | (1<<TWEN);
|
||||
|
||||
i2c_delay();
|
||||
|
||||
// check if the slave acknowledged us
|
||||
return (TW_STATUS == TW_MT_DATA_ACK) ? 0 : 1;
|
||||
}
|
||||
|
||||
// Read one byte from the i2c slave. If ack=1 the slave is acknowledged,
|
||||
// if ack=0 the acknowledge bit is not set.
|
||||
// returns: byte read from i2c device
|
||||
uint8_t i2c_master_read(int ack) {
|
||||
TWCR = (1<<TWINT) | (1<<TWEN) | (ack<<TWEA);
|
||||
|
||||
i2c_delay();
|
||||
return TWDR;
|
||||
}
|
||||
|
||||
void i2c_reset_state(void) {
|
||||
TWCR = 0;
|
||||
}
|
||||
|
||||
void i2c_slave_init(uint8_t address) {
|
||||
TWAR = address << 0; // slave i2c address
|
||||
// TWEN - twi enable
|
||||
// TWEA - enable address acknowledgement
|
||||
// TWINT - twi interrupt flag
|
||||
// TWIE - enable the twi interrupt
|
||||
TWCR = (1<<TWIE) | (1<<TWEA) | (1<<TWINT) | (1<<TWEN);
|
||||
}
|
||||
|
||||
ISR(TWI_vect);
|
||||
|
||||
ISR(TWI_vect) {
|
||||
uint8_t ack = 1;
|
||||
switch(TW_STATUS) {
|
||||
case TW_SR_SLA_ACK:
|
||||
// this device has been addressed as a slave receiver
|
||||
slave_has_register_set = false;
|
||||
break;
|
||||
|
||||
case TW_SR_DATA_ACK:
|
||||
// this device has received data as a slave receiver
|
||||
// The first byte that we receive in this transaction sets the location
|
||||
// of the read/write location of the slaves memory that it exposes over
|
||||
// i2c. After that, bytes will be written at slave_buffer_pos, incrementing
|
||||
// slave_buffer_pos after each write.
|
||||
if(!slave_has_register_set) {
|
||||
slave_buffer_pos = TWDR;
|
||||
// don't acknowledge the master if this memory loctaion is out of bounds
|
||||
if ( slave_buffer_pos >= SLAVE_BUFFER_SIZE ) {
|
||||
ack = 0;
|
||||
slave_buffer_pos = 0;
|
||||
}
|
||||
slave_has_register_set = true;
|
||||
} else {
|
||||
i2c_slave_buffer[slave_buffer_pos] = TWDR;
|
||||
BUFFER_POS_INC();
|
||||
}
|
||||
break;
|
||||
|
||||
case TW_ST_SLA_ACK:
|
||||
case TW_ST_DATA_ACK:
|
||||
// master has addressed this device as a slave transmitter and is
|
||||
// requesting data.
|
||||
TWDR = i2c_slave_buffer[slave_buffer_pos];
|
||||
BUFFER_POS_INC();
|
||||
break;
|
||||
|
||||
case TW_BUS_ERROR: // something went wrong, reset twi state
|
||||
TWCR = 0;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// Reset everything, so we are ready for the next TWI interrupt
|
||||
TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN);
|
||||
}
|
||||
#endif
|
@@ -1,31 +0,0 @@
|
||||
#ifndef I2C_H
|
||||
#define I2C_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifndef F_CPU
|
||||
#define F_CPU 16000000UL
|
||||
#endif
|
||||
|
||||
#define I2C_READ 1
|
||||
#define I2C_WRITE 0
|
||||
|
||||
#define I2C_ACK 1
|
||||
#define I2C_NACK 0
|
||||
|
||||
#define SLAVE_BUFFER_SIZE 0x10
|
||||
|
||||
// i2c SCL clock frequency
|
||||
#define SCL_CLOCK 100000L
|
||||
|
||||
extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
|
||||
|
||||
void i2c_master_init(void);
|
||||
uint8_t i2c_master_start(uint8_t address);
|
||||
void i2c_master_stop(void);
|
||||
uint8_t i2c_master_write(uint8_t data);
|
||||
uint8_t i2c_master_read(int);
|
||||
void i2c_reset_state(void);
|
||||
void i2c_slave_init(uint8_t address);
|
||||
|
||||
#endif
|
@@ -1,454 +0,0 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* scan matrix
|
||||
*/
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <avr/io.h>
|
||||
#include "wait.h"
|
||||
#include "print.h"
|
||||
#include "debug.h"
|
||||
#include "util.h"
|
||||
#include "matrix.h"
|
||||
#include "split_util.h"
|
||||
#include "pro_micro.h"
|
||||
#include "config.h"
|
||||
#include "timer.h"
|
||||
|
||||
#ifdef USE_I2C
|
||||
# include "i2c.h"
|
||||
#else // USE_SERIAL
|
||||
# include "serial.h"
|
||||
#endif
|
||||
|
||||
#ifndef DEBOUNCE
|
||||
# define DEBOUNCE 5
|
||||
#endif
|
||||
|
||||
#if (DEBOUNCE > 0)
|
||||
static uint16_t debouncing_time;
|
||||
static bool debouncing = false;
|
||||
#endif
|
||||
|
||||
#if (MATRIX_COLS <= 8)
|
||||
# define print_matrix_header() print("\nr/c 01234567\n")
|
||||
# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row))
|
||||
# define matrix_bitpop(i) bitpop(matrix[i])
|
||||
# define ROW_SHIFTER ((uint8_t)1)
|
||||
#else
|
||||
# error "Currently only supports 8 COLS"
|
||||
#endif
|
||||
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||
|
||||
#define ERROR_DISCONNECT_COUNT 5
|
||||
|
||||
#define ROWS_PER_HAND (MATRIX_ROWS/2)
|
||||
|
||||
static uint8_t error_count = 0;
|
||||
|
||||
static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
|
||||
static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
|
||||
|
||||
/* matrix state(1:on, 0:off) */
|
||||
static matrix_row_t matrix[MATRIX_ROWS];
|
||||
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||
|
||||
#if (DIODE_DIRECTION == COL2ROW)
|
||||
static void init_cols(void);
|
||||
static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row);
|
||||
static void unselect_rows(void);
|
||||
static void select_row(uint8_t row);
|
||||
static void unselect_row(uint8_t row);
|
||||
#elif (DIODE_DIRECTION == ROW2COL)
|
||||
static void init_rows(void);
|
||||
static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col);
|
||||
static void unselect_cols(void);
|
||||
static void unselect_col(uint8_t col);
|
||||
static void select_col(uint8_t col);
|
||||
#endif
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_kb(void) {
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
inline
|
||||
uint8_t matrix_rows(void)
|
||||
{
|
||||
return MATRIX_ROWS;
|
||||
}
|
||||
|
||||
inline
|
||||
uint8_t matrix_cols(void)
|
||||
{
|
||||
return MATRIX_COLS;
|
||||
}
|
||||
|
||||
void matrix_init(void)
|
||||
{
|
||||
debug_enable = true;
|
||||
debug_matrix = true;
|
||||
debug_mouse = true;
|
||||
// initialize row and col
|
||||
unselect_rows();
|
||||
init_cols();
|
||||
|
||||
TX_RX_LED_INIT;
|
||||
|
||||
// initialize matrix state: all keys off
|
||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||
matrix[i] = 0;
|
||||
matrix_debouncing[i] = 0;
|
||||
}
|
||||
|
||||
matrix_init_quantum();
|
||||
|
||||
}
|
||||
|
||||
uint8_t _matrix_scan(void)
|
||||
{
|
||||
int offset = isLeftHand ? 0 : (ROWS_PER_HAND);
|
||||
#if (DIODE_DIRECTION == COL2ROW)
|
||||
// Set row, read cols
|
||||
for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) {
|
||||
# if (DEBOUNCE > 0)
|
||||
bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row);
|
||||
|
||||
if (matrix_changed) {
|
||||
debouncing = true;
|
||||
debouncing_time = timer_read();
|
||||
}
|
||||
|
||||
# else
|
||||
read_cols_on_row(matrix+offset, current_row);
|
||||
# endif
|
||||
|
||||
}
|
||||
|
||||
#elif (DIODE_DIRECTION == ROW2COL)
|
||||
// Set col, read rows
|
||||
for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
|
||||
# if (DEBOUNCE > 0)
|
||||
bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col);
|
||||
if (matrix_changed) {
|
||||
debouncing = true;
|
||||
debouncing_time = timer_read();
|
||||
}
|
||||
# else
|
||||
read_rows_on_col(matrix+offset, current_col);
|
||||
# endif
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
# if (DEBOUNCE > 0)
|
||||
if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) {
|
||||
for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
|
||||
matrix[i+offset] = matrix_debouncing[i+offset];
|
||||
}
|
||||
debouncing = false;
|
||||
}
|
||||
# endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef USE_I2C
|
||||
|
||||
// Get rows from other half over i2c
|
||||
int i2c_transaction(void) {
|
||||
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
|
||||
|
||||
int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE);
|
||||
if (err) goto i2c_error;
|
||||
|
||||
// start of matrix stored at 0x00
|
||||
err = i2c_master_write(0x00);
|
||||
if (err) goto i2c_error;
|
||||
|
||||
// Start read
|
||||
err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ);
|
||||
if (err) goto i2c_error;
|
||||
|
||||
if (!err) {
|
||||
int i;
|
||||
for (i = 0; i < ROWS_PER_HAND-1; ++i) {
|
||||
matrix[slaveOffset+i] = i2c_master_read(I2C_ACK);
|
||||
}
|
||||
matrix[slaveOffset+i] = i2c_master_read(I2C_NACK);
|
||||
i2c_master_stop();
|
||||
} else {
|
||||
i2c_error: // the cable is disconnceted, or something else went wrong
|
||||
i2c_reset_state();
|
||||
return err;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else // USE_SERIAL
|
||||
|
||||
int serial_transaction(void) {
|
||||
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
|
||||
|
||||
if (serial_update_buffers()) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||
matrix[slaveOffset+i] = serial_slave_buffer[i];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
uint8_t matrix_scan(void)
|
||||
{
|
||||
uint8_t ret = _matrix_scan();
|
||||
|
||||
#ifdef USE_I2C
|
||||
if( i2c_transaction() ) {
|
||||
#else // USE_SERIAL
|
||||
if( serial_transaction() ) {
|
||||
#endif
|
||||
// turn on the indicator led when halves are disconnected
|
||||
TXLED1;
|
||||
|
||||
error_count++;
|
||||
|
||||
if (error_count > ERROR_DISCONNECT_COUNT) {
|
||||
// reset other half if disconnected
|
||||
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
|
||||
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||
matrix[slaveOffset+i] = 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// turn off the indicator led on no error
|
||||
TXLED0;
|
||||
error_count = 0;
|
||||
}
|
||||
matrix_scan_quantum();
|
||||
return ret;
|
||||
}
|
||||
|
||||
void matrix_slave_scan(void) {
|
||||
_matrix_scan();
|
||||
|
||||
int offset = (isLeftHand) ? 0 : ROWS_PER_HAND;
|
||||
|
||||
#ifdef USE_I2C
|
||||
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||
i2c_slave_buffer[i] = matrix[offset+i];
|
||||
}
|
||||
#else // USE_SERIAL
|
||||
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||
serial_slave_buffer[i] = matrix[offset+i];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool matrix_is_modified(void)
|
||||
{
|
||||
if (debouncing) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
inline
|
||||
bool matrix_is_on(uint8_t row, uint8_t col)
|
||||
{
|
||||
return (matrix[row] & ((matrix_row_t)1<<col));
|
||||
}
|
||||
|
||||
inline
|
||||
matrix_row_t matrix_get_row(uint8_t row)
|
||||
{
|
||||
return matrix[row];
|
||||
}
|
||||
|
||||
void matrix_print(void)
|
||||
{
|
||||
print("\nr/c 0123456789ABCDEF\n");
|
||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||
phex(row); print(": ");
|
||||
pbin_reverse16(matrix_get_row(row));
|
||||
print("\n");
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t matrix_key_count(void)
|
||||
{
|
||||
uint8_t count = 0;
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
count += bitpop16(matrix[i]);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
#if (DIODE_DIRECTION == COL2ROW)
|
||||
|
||||
static void init_cols(void)
|
||||
{
|
||||
for(uint8_t x = 0; x < MATRIX_COLS; x++) {
|
||||
uint8_t pin = col_pins[x];
|
||||
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||
}
|
||||
}
|
||||
|
||||
static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
|
||||
{
|
||||
// Store last value of row prior to reading
|
||||
matrix_row_t last_row_value = current_matrix[current_row];
|
||||
|
||||
// Clear data in matrix row
|
||||
current_matrix[current_row] = 0;
|
||||
|
||||
// Select row and wait for row selecton to stabilize
|
||||
select_row(current_row);
|
||||
wait_us(30);
|
||||
|
||||
// For each col...
|
||||
for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
|
||||
|
||||
// Select the col pin to read (active low)
|
||||
uint8_t pin = col_pins[col_index];
|
||||
uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF));
|
||||
|
||||
// Populate the matrix row with the state of the col pin
|
||||
current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index);
|
||||
}
|
||||
|
||||
// Unselect row
|
||||
unselect_row(current_row);
|
||||
|
||||
return (last_row_value != current_matrix[current_row]);
|
||||
}
|
||||
|
||||
static void select_row(uint8_t row)
|
||||
{
|
||||
uint8_t pin = row_pins[row];
|
||||
_SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT
|
||||
_SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW
|
||||
}
|
||||
|
||||
static void unselect_row(uint8_t row)
|
||||
{
|
||||
uint8_t pin = row_pins[row];
|
||||
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||
}
|
||||
|
||||
static void unselect_rows(void)
|
||||
{
|
||||
for(uint8_t x = 0; x < ROWS_PER_HAND; x++) {
|
||||
uint8_t pin = row_pins[x];
|
||||
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||
}
|
||||
}
|
||||
|
||||
#elif (DIODE_DIRECTION == ROW2COL)
|
||||
|
||||
static void init_rows(void)
|
||||
{
|
||||
for(uint8_t x = 0; x < ROWS_PER_HAND; x++) {
|
||||
uint8_t pin = row_pins[x];
|
||||
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||
}
|
||||
}
|
||||
|
||||
static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
|
||||
{
|
||||
bool matrix_changed = false;
|
||||
|
||||
// Select col and wait for col selecton to stabilize
|
||||
select_col(current_col);
|
||||
wait_us(30);
|
||||
|
||||
// For each row...
|
||||
for(uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++)
|
||||
{
|
||||
|
||||
// Store last value of row prior to reading
|
||||
matrix_row_t last_row_value = current_matrix[row_index];
|
||||
|
||||
// Check row pin state
|
||||
if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)) == 0)
|
||||
{
|
||||
// Pin LO, set col bit
|
||||
current_matrix[row_index] |= (ROW_SHIFTER << current_col);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Pin HI, clear col bit
|
||||
current_matrix[row_index] &= ~(ROW_SHIFTER << current_col);
|
||||
}
|
||||
|
||||
// Determine if the matrix changed state
|
||||
if ((last_row_value != current_matrix[row_index]) && !(matrix_changed))
|
||||
{
|
||||
matrix_changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Unselect col
|
||||
unselect_col(current_col);
|
||||
|
||||
return matrix_changed;
|
||||
}
|
||||
|
||||
static void select_col(uint8_t col)
|
||||
{
|
||||
uint8_t pin = col_pins[col];
|
||||
_SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT
|
||||
_SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW
|
||||
}
|
||||
|
||||
static void unselect_col(uint8_t col)
|
||||
{
|
||||
uint8_t pin = col_pins[col];
|
||||
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||
}
|
||||
|
||||
static void unselect_cols(void)
|
||||
{
|
||||
for(uint8_t x = 0; x < MATRIX_COLS; x++) {
|
||||
uint8_t pin = col_pins[x];
|
||||
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@@ -1,17 +1,16 @@
|
||||
DeltaSplit75
|
||||
======
|
||||
# DeltaSplit75
|
||||
|
||||
A split 75% keyboard made by xyxjj. [More info on qmk.fm](http://qmk.fm/deltasplit75/)
|
||||
|
||||
Keyboard Maintainer: [xyxjj](https://github.com/xyxjj) & [itsaferbie](https://github.com/itsaferbie)
|
||||
Hardware Supported: Pro Micro
|
||||
Hardware Availability: Group Buy
|
||||
* Keyboard Maintainer: [xyxjj](https://github.com/xyxjj) & [itsaferbie](https://github.com/itsaferbie)
|
||||
* Hardware Supported: Pro Micro
|
||||
* Hardware Availability: Group Buy
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make deltasplit75/v2: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.
|
||||
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).
|
||||
|
||||
Files are available here: [DeltaSplit75 Case Files](https://github.com/xyxjj/DeltaSplit75-Case-files)
|
||||
|
||||
|
@@ -12,30 +12,25 @@ MCU = atmega32u4
|
||||
BOOTLOADER = caterina
|
||||
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # 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
|
||||
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||
SUBPROJECT_rev1 = yes
|
||||
USE_I2C = yes
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
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
|
||||
MIDI_ENABLE = no # MIDI support
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||
|
||||
CUSTOM_MATRIX = yes
|
||||
SRC += matrix.c \
|
||||
i2c.c \
|
||||
split_util.c \
|
||||
serial.c
|
||||
SPLIT_KEYBOARD = yes
|
||||
|
||||
DEFAULT_FOLDER = deltasplit75/v2
|
||||
|
@@ -1,228 +0,0 @@
|
||||
/*
|
||||
* WARNING: be careful changing this code, it is very timing dependent
|
||||
*/
|
||||
|
||||
#ifndef F_CPU
|
||||
#define F_CPU 16000000
|
||||
#endif
|
||||
|
||||
#include <avr/io.h>
|
||||
#include <avr/interrupt.h>
|
||||
#include <util/delay.h>
|
||||
#include <stdbool.h>
|
||||
#include "serial.h"
|
||||
|
||||
#ifndef USE_I2C
|
||||
|
||||
// Serial pulse period in microseconds. Its probably a bad idea to lower this
|
||||
// value.
|
||||
#define SERIAL_DELAY 24
|
||||
|
||||
uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0};
|
||||
uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0};
|
||||
|
||||
#define SLAVE_DATA_CORRUPT (1<<0)
|
||||
volatile uint8_t status = 0;
|
||||
|
||||
inline static
|
||||
void serial_delay(void) {
|
||||
_delay_us(SERIAL_DELAY);
|
||||
}
|
||||
|
||||
inline static
|
||||
void serial_output(void) {
|
||||
SERIAL_PIN_DDR |= SERIAL_PIN_MASK;
|
||||
}
|
||||
|
||||
// make the serial pin an input with pull-up resistor
|
||||
inline static
|
||||
void serial_input(void) {
|
||||
SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK;
|
||||
SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
|
||||
}
|
||||
|
||||
inline static
|
||||
uint8_t serial_read_pin(void) {
|
||||
return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK);
|
||||
}
|
||||
|
||||
inline static
|
||||
void serial_low(void) {
|
||||
SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK;
|
||||
}
|
||||
|
||||
inline static
|
||||
void serial_high(void) {
|
||||
SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
|
||||
}
|
||||
|
||||
void serial_master_init(void) {
|
||||
serial_output();
|
||||
serial_high();
|
||||
}
|
||||
|
||||
void serial_slave_init(void) {
|
||||
serial_input();
|
||||
|
||||
// Enable INT0
|
||||
EIMSK |= _BV(INT0);
|
||||
// Trigger on falling edge of INT0
|
||||
EICRA &= ~(_BV(ISC00) | _BV(ISC01));
|
||||
}
|
||||
|
||||
// Used by the master to synchronize timing with the slave.
|
||||
static
|
||||
void sync_recv(void) {
|
||||
serial_input();
|
||||
// This shouldn't hang if the slave disconnects because the
|
||||
// serial line will float to high if the slave does disconnect.
|
||||
while (!serial_read_pin());
|
||||
serial_delay();
|
||||
}
|
||||
|
||||
// Used by the slave to send a synchronization signal to the master.
|
||||
static
|
||||
void sync_send(void) {
|
||||
serial_output();
|
||||
|
||||
serial_low();
|
||||
serial_delay();
|
||||
|
||||
serial_high();
|
||||
}
|
||||
|
||||
// Reads a byte from the serial line
|
||||
static
|
||||
uint8_t serial_read_byte(void) {
|
||||
uint8_t byte = 0;
|
||||
serial_input();
|
||||
for ( uint8_t i = 0; i < 8; ++i) {
|
||||
byte = (byte << 1) | serial_read_pin();
|
||||
serial_delay();
|
||||
_delay_us(1);
|
||||
}
|
||||
|
||||
return byte;
|
||||
}
|
||||
|
||||
// Sends a byte with MSB ordering
|
||||
static
|
||||
void serial_write_byte(uint8_t data) {
|
||||
uint8_t b = 8;
|
||||
serial_output();
|
||||
while( b-- ) {
|
||||
if(data & (1 << b)) {
|
||||
serial_high();
|
||||
} else {
|
||||
serial_low();
|
||||
}
|
||||
serial_delay();
|
||||
}
|
||||
}
|
||||
|
||||
// interrupt handle to be used by the slave device
|
||||
ISR(SERIAL_PIN_INTERRUPT) {
|
||||
sync_send();
|
||||
|
||||
uint8_t checksum = 0;
|
||||
for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
|
||||
serial_write_byte(serial_slave_buffer[i]);
|
||||
sync_send();
|
||||
checksum += serial_slave_buffer[i];
|
||||
}
|
||||
serial_write_byte(checksum);
|
||||
sync_send();
|
||||
|
||||
// wait for the sync to finish sending
|
||||
serial_delay();
|
||||
|
||||
// read the middle of pulses
|
||||
_delay_us(SERIAL_DELAY/2);
|
||||
|
||||
uint8_t checksum_computed = 0;
|
||||
for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
|
||||
serial_master_buffer[i] = serial_read_byte();
|
||||
sync_send();
|
||||
checksum_computed += serial_master_buffer[i];
|
||||
}
|
||||
uint8_t checksum_received = serial_read_byte();
|
||||
sync_send();
|
||||
|
||||
serial_input(); // end transaction
|
||||
|
||||
if ( checksum_computed != checksum_received ) {
|
||||
status |= SLAVE_DATA_CORRUPT;
|
||||
} else {
|
||||
status &= ~SLAVE_DATA_CORRUPT;
|
||||
}
|
||||
}
|
||||
|
||||
inline
|
||||
bool serial_slave_DATA_CORRUPT(void) {
|
||||
return status & SLAVE_DATA_CORRUPT;
|
||||
}
|
||||
|
||||
// Copies the serial_slave_buffer to the master and sends the
|
||||
// serial_master_buffer to the slave.
|
||||
//
|
||||
// Returns:
|
||||
// 0 => no error
|
||||
// 1 => slave did not respond
|
||||
int serial_update_buffers(void) {
|
||||
// this code is very time dependent, so we need to disable interrupts
|
||||
cli();
|
||||
|
||||
// signal to the slave that we want to start a transaction
|
||||
serial_output();
|
||||
serial_low();
|
||||
_delay_us(1);
|
||||
|
||||
// wait for the slaves response
|
||||
serial_input();
|
||||
serial_high();
|
||||
_delay_us(SERIAL_DELAY);
|
||||
|
||||
// check if the slave is present
|
||||
if (serial_read_pin()) {
|
||||
// slave failed to pull the line low, assume not present
|
||||
sei();
|
||||
return 1;
|
||||
}
|
||||
|
||||
// if the slave is present syncronize with it
|
||||
sync_recv();
|
||||
|
||||
uint8_t checksum_computed = 0;
|
||||
// receive data from the slave
|
||||
for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
|
||||
serial_slave_buffer[i] = serial_read_byte();
|
||||
sync_recv();
|
||||
checksum_computed += serial_slave_buffer[i];
|
||||
}
|
||||
uint8_t checksum_received = serial_read_byte();
|
||||
sync_recv();
|
||||
|
||||
if (checksum_computed != checksum_received) {
|
||||
sei();
|
||||
return 1;
|
||||
}
|
||||
|
||||
uint8_t checksum = 0;
|
||||
// send data to the slave
|
||||
for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
|
||||
serial_write_byte(serial_master_buffer[i]);
|
||||
sync_recv();
|
||||
checksum += serial_master_buffer[i];
|
||||
}
|
||||
serial_write_byte(checksum);
|
||||
sync_recv();
|
||||
|
||||
// always, release the line when not in use
|
||||
serial_output();
|
||||
serial_high();
|
||||
|
||||
sei();
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
@@ -1,26 +0,0 @@
|
||||
#ifndef MY_SERIAL_H
|
||||
#define MY_SERIAL_H
|
||||
|
||||
#include "config.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
/* TODO: some defines for interrupt setup */
|
||||
#define SERIAL_PIN_DDR DDRD
|
||||
#define SERIAL_PIN_PORT PORTD
|
||||
#define SERIAL_PIN_INPUT PIND
|
||||
#define SERIAL_PIN_MASK _BV(PD0)
|
||||
#define SERIAL_PIN_INTERRUPT INT0_vect
|
||||
|
||||
#define SERIAL_SLAVE_BUFFER_LENGTH ((MATRIX_COLS+7)/8 *MATRIX_ROWS/2)
|
||||
#define SERIAL_MASTER_BUFFER_LENGTH 1
|
||||
|
||||
// Buffers for master - slave communication
|
||||
extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
|
||||
extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
|
||||
|
||||
void serial_master_init(void);
|
||||
void serial_slave_init(void);
|
||||
int serial_update_buffers(void);
|
||||
bool serial_slave_data_corrupt(void);
|
||||
|
||||
#endif
|
@@ -1,86 +0,0 @@
|
||||
#include <avr/io.h>
|
||||
#include <avr/wdt.h>
|
||||
#include <avr/power.h>
|
||||
#include <avr/interrupt.h>
|
||||
#include <util/delay.h>
|
||||
#include <avr/eeprom.h>
|
||||
#include "split_util.h"
|
||||
#include "matrix.h"
|
||||
#include "keyboard.h"
|
||||
#include "config.h"
|
||||
#include "timer.h"
|
||||
|
||||
#ifdef USE_I2C
|
||||
# include "i2c.h"
|
||||
#else
|
||||
# include "serial.h"
|
||||
#endif
|
||||
|
||||
volatile bool isLeftHand = true;
|
||||
|
||||
static void setup_handedness(void) {
|
||||
#ifdef EE_HANDS
|
||||
isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS);
|
||||
#else
|
||||
// I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c
|
||||
#if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT)
|
||||
isLeftHand = !has_usb();
|
||||
#else
|
||||
isLeftHand = has_usb();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
static void keyboard_master_setup(void) {
|
||||
#ifdef USE_I2C
|
||||
i2c_master_init();
|
||||
#ifdef SSD1306OLED
|
||||
matrix_master_OLED_init ();
|
||||
#endif
|
||||
#else
|
||||
serial_master_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
static void keyboard_slave_setup(void) {
|
||||
timer_init();
|
||||
#ifdef USE_I2C
|
||||
i2c_slave_init(SLAVE_I2C_ADDRESS);
|
||||
#else
|
||||
serial_slave_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
bool has_usb(void) {
|
||||
USBCON |= (1 << OTGPADE); //enables VBUS pad
|
||||
_delay_us(5);
|
||||
return (USBSTA & (1<<VBUS)); //checks state of VBUS
|
||||
}
|
||||
|
||||
void split_keyboard_setup(void) {
|
||||
setup_handedness();
|
||||
|
||||
if (has_usb()) {
|
||||
keyboard_master_setup();
|
||||
} else {
|
||||
keyboard_slave_setup();
|
||||
}
|
||||
sei();
|
||||
}
|
||||
|
||||
void keyboard_slave_loop(void) {
|
||||
matrix_init();
|
||||
|
||||
while (1) {
|
||||
matrix_slave_scan();
|
||||
}
|
||||
}
|
||||
|
||||
// this code runs before the usb and keyboard is initialized
|
||||
void matrix_setup(void) {
|
||||
split_keyboard_setup();
|
||||
|
||||
if (!has_usb()) {
|
||||
keyboard_slave_loop();
|
||||
}
|
||||
}
|
@@ -1,19 +0,0 @@
|
||||
#ifndef SPLIT_KEYBOARD_UTIL_H
|
||||
#define SPLIT_KEYBOARD_UTIL_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "eeconfig.h"
|
||||
|
||||
|
||||
#define SLAVE_I2C_ADDRESS 0x32
|
||||
|
||||
extern volatile bool isLeftHand;
|
||||
|
||||
// slave version of matix scan, defined in matrix.c
|
||||
void matrix_slave_scan(void);
|
||||
|
||||
void split_keyboard_setup(void);
|
||||
bool has_usb(void);
|
||||
void keyboard_slave_loop(void);
|
||||
|
||||
#endif
|
@@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_V2_H
|
||||
#define CONFIG_V2_H
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
@@ -40,6 +39,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/*
|
||||
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
||||
*/
|
||||
#define SOFT_SERIAL_PIN D0
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
@@ -76,5 +80,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
#endif
|
||||
|
@@ -1,14 +1 @@
|
||||
#include "deltasplit75.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// // green led on
|
||||
// DDRD |= (1<<5);
|
||||
// PORTD &= ~(1<<5);
|
||||
|
||||
// // orange led on
|
||||
// DDRB |= (1<<0);
|
||||
// PORTB &= ~(1<<0);
|
||||
|
||||
matrix_init_user();
|
||||
};
|
||||
|
||||
#include "v2.h"
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#ifndef V2_H
|
||||
#define V2_H
|
||||
#pragma once
|
||||
|
||||
#include "deltasplit75.h"
|
||||
|
||||
@@ -56,5 +55,3 @@
|
||||
{ K120, K121, K122, K123, KC_NO, KC_NO, K126, K127}, \
|
||||
{ KC_NO, KC_NO, K132, K133, K134, K135, K136, K137} \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -4,7 +4,7 @@
|
||||
"width": 19.75,
|
||||
"height": 5.25,
|
||||
"layouts": {
|
||||
"LAYOUT_default": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"label":"`", "x":0.5, "y":0},
|
||||
{"label":"Esc", "x":1.75, "y":0.25},
|
||||
|
@@ -20,18 +20,22 @@
|
||||
#endif
|
||||
|
||||
#ifndef SPLIT_USB_TIMEOUT
|
||||
#define SPLIT_USB_TIMEOUT 2500
|
||||
# define SPLIT_USB_TIMEOUT 2000
|
||||
#endif
|
||||
|
||||
#ifndef SPLIT_USB_TIMEOUT_POLL
|
||||
# define SPLIT_USB_TIMEOUT_POLL 10
|
||||
#endif
|
||||
|
||||
volatile bool isLeftHand = true;
|
||||
|
||||
bool waitForUsb(void) {
|
||||
for (uint8_t i = 0; i < (SPLIT_USB_TIMEOUT / 100); i++) {
|
||||
// This will return true of a USB connection has been established
|
||||
for (uint8_t i = 0; i < (SPLIT_USB_TIMEOUT / SPLIT_USB_TIMEOUT_POLL); i++) {
|
||||
// This will return true if a USB connection has been established
|
||||
if (UDADDR & _BV(ADDEN)) {
|
||||
return true;
|
||||
}
|
||||
wait_ms(100);
|
||||
wait_ms(SPLIT_USB_TIMEOUT_POLL);
|
||||
}
|
||||
|
||||
// Avoid NO_USB_STARTUP_CHECK - Disable USB as the previous checks seem to enable it somehow
|
||||
|
29
keyboards/kbdfans/kbd67/mkiirgb/keymaps/via/keymap.c
Normal file
29
keyboards/kbdfans/kbd67/mkiirgb/keymaps/via/keymap.c
Normal file
@@ -0,0 +1,29 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_65_ansi_blocker(
|
||||
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_HOME,\
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH, KC_PGUP,\
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,\
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,\
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT),
|
||||
[1] = LAYOUT_65_ansi_blocker(
|
||||
KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_HOME,\
|
||||
KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI,RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET, KC_PGUP,\
|
||||
KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, KC_PGDN,\
|
||||
KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_MUTE,\
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT),
|
||||
[2] = LAYOUT_65_ansi_blocker(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_65_ansi_blocker(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
};
|
||||
|
2
keyboards/kbdfans/kbd67/mkiirgb/keymaps/via/rules.mk
Normal file
2
keyboards/kbdfans/kbd67/mkiirgb/keymaps/via/rules.mk
Normal file
@@ -0,0 +1,2 @@
|
||||
VIA_ENABLE = yes
|
||||
LTO_ENABLE = yes
|
@@ -1,10 +1,10 @@
|
||||
#pragma once
|
||||
#include "config_common.h"
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define VENDOR_ID 0x4B42 // KB
|
||||
#define PRODUCT_ID 0x1224
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER KBDfans
|
||||
#define PRODUCT kbd67mkiirgb
|
||||
#define PRODUCT kbd67mkiirgb v1
|
||||
#define DESCRIPTION kbd67mkii rgb keyboard
|
||||
|
||||
#define MATRIX_ROWS 5
|
||||
@@ -42,4 +42,4 @@
|
||||
#define DRIVER_COUNT 2
|
||||
#define DRIVER_1_LED_TOTAL 35
|
||||
#define DRIVER_2_LED_TOTAL 32
|
||||
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
|
||||
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
|
||||
|
@@ -1,10 +1,10 @@
|
||||
#pragma once
|
||||
#include "config_common.h"
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x1224
|
||||
#define VENDOR_ID 0x4B42 // KB
|
||||
#define PRODUCT_ID 0x1225
|
||||
#define DEVICE_VER 0x0002
|
||||
#define MANUFACTURER KBDfans
|
||||
#define PRODUCT kbd67mkiirgb
|
||||
#define PRODUCT kbd67mkiirgb v2
|
||||
#define DESCRIPTION kbd67mkii rgb keyboard
|
||||
|
||||
#define MATRIX_ROWS 5
|
||||
|
@@ -15,31 +15,56 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER LFKeyboards
|
||||
#define PRODUCT LFKPad 21
|
||||
#define DESCRIPTION QMK keyboard firmware for LFKPad LFK_REV_STRING
|
||||
#define DESCRIPTION QMK keyboard firmware for LFKPad
|
||||
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 6
|
||||
#define MATRIX_COLS 4
|
||||
#define MATRIX_ROW_PINS { D5, F4, F6, F7, C7, C6}
|
||||
#define MATRIX_COL_PINS { F1, F0, D4, D6}
|
||||
#define UNUSED_PINS { }
|
||||
#define RGBLED_NUM 28 // Number of LEDs
|
||||
|
||||
/*
|
||||
* 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 { D5, F4, F6, F7, C7, C6 }
|
||||
#define MATRIX_COL_PINS { F1, F0, D4, D6 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL*/
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/*
|
||||
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
||||
*/
|
||||
//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
|
||||
|
||||
// #define BACKLIGHT_PIN B7
|
||||
// #define BACKLIGHT_BREATHING
|
||||
// #define BACKLIGHT_LEVELS 3
|
||||
|
||||
#define RGB_DI_PIN C7 // Have to set it to something to get the ws2812 code to compile
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
#ifdef RGB_DI_PIN
|
||||
# define RGBLED_NUM 28
|
||||
# define RGBLIGHT_HUE_STEP 10
|
||||
# define RGBLIGHT_SAT_STEP 17
|
||||
# define RGBLIGHT_VAL_STEP 17
|
||||
# define RGBLIGHT_ANIMATIONS
|
||||
#endif
|
||||
|
||||
#define TAPPING_TERM 200
|
||||
|
||||
@@ -49,13 +74,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
|
||||
/* 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
|
||||
*
|
||||
@@ -89,6 +117,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/* key combination for magic key command */
|
||||
/* defined by default; to change, uncomment and set to the combination you want */
|
||||
// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
|
||||
|
||||
/* control how magic key switches layers */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||
@@ -98,8 +130,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#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_HELP H
|
||||
//#define MAGIC_KEY_HELP_ALT SLASH
|
||||
//#define MAGIC_KEY_DEBUG D
|
||||
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||
//#define MAGIC_KEY_DEBUG_KBD K
|
||||
@@ -107,9 +139,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#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_LAYER0_ALT GRAVE
|
||||
//#define MAGIC_KEY_LAYER1 1
|
||||
//#define MAGIC_KEY_LAYER2 2
|
||||
//#define MAGIC_KEY_LAYER3 3
|
||||
@@ -119,9 +150,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define MAGIC_KEY_LAYER7 7
|
||||
//#define MAGIC_KEY_LAYER8 8
|
||||
//#define MAGIC_KEY_LAYER9 9
|
||||
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||
//#define MAGIC_KEY_BOOTLOADER B
|
||||
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
|
||||
//#define MAGIC_KEY_LOCK CAPS
|
||||
//#define MAGIC_KEY_EEPROM E
|
||||
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
|
||||
//#define MAGIC_KEY_NKRO N
|
||||
//#define MAGIC_KEY_SLEEP_LED Z
|
||||
|
||||
@@ -140,7 +173,63 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* Prevent use of disabled MIDI features in the keymap */
|
||||
//#define MIDI_ENABLE_STRICT 1
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
//#define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||
|
||||
/*
|
||||
* HD44780 LCD Display Configuration
|
||||
*/
|
||||
/*
|
||||
#define LCD_LINES 2 //< number of visible lines of the display
|
||||
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
|
||||
|
||||
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
|
||||
|
||||
#if LCD_IO_MODE
|
||||
#define LCD_PORT PORTB //< port for the LCD lines
|
||||
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
|
||||
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
|
||||
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
|
||||
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
|
||||
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
|
||||
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
|
||||
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
|
||||
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
|
||||
#define LCD_RS_PORT LCD_PORT //< port for RS line
|
||||
#define LCD_RS_PIN 3 //< pin for RS line
|
||||
#define LCD_RW_PORT LCD_PORT //< port for RW line
|
||||
#define LCD_RW_PIN 2 //< pin for RW line
|
||||
#define LCD_E_PORT LCD_PORT //< port for Enable line
|
||||
#define LCD_E_PIN 1 //< pin for Enable line
|
||||
#endif
|
||||
*/
|
||||
|
||||
/* Bootmagic Lite key configuration */
|
||||
// #define BOOTMAGIC_LITE_ROW 0
|
||||
// #define BOOTMAGIC_LITE_COLUMN 0
|
||||
|
@@ -1,12 +1,34 @@
|
||||
{
|
||||
"keyboard_name": "LFKPad",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 4,
|
||||
"height": 6,
|
||||
"layouts": {
|
||||
"LAYOUT_numpad_6x4": {
|
||||
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"Tab", "x":1, "y":0}, {"label":"=", "x":2, "y":0}, {"label":"Fn", "x":3, "y":0}, {"label":"Num Lock", "x":0, "y":1}, {"label":"/", "x":1, "y":1}, {"label":"*", "x":2, "y":1}, {"label":"-", "x":3, "y":1}, {"label":"7", "x":0, "y":2}, {"label":"8", "x":1, "y":2}, {"label":"9", "x":2, "y":2}, {"label":"4", "x":0, "y":3}, {"label":"5", "x":1, "y":3}, {"label":"6", "x":2, "y":3}, {"label":"+", "x":3, "y":2, "h":2}, {"label":"1", "x":0, "y":4}, {"label":"2", "x":1, "y":4}, {"label":"3", "x":2, "y":4}, {"label":"0", "x":0, "y":5, "w":2}, {"label":".", "x":2, "y":5}, {"label":"Enter", "x":3, "y":4, "h":2}]
|
||||
"keyboard_name": "LFKPad",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 4,
|
||||
"height": 6,
|
||||
"layouts": {
|
||||
"LAYOUT_numpad_6x4": {
|
||||
"layout": [
|
||||
{"x":0, "y":0},
|
||||
{"x":1, "y":0},
|
||||
{"x":2, "y":0},
|
||||
{"x":3, "y":0},
|
||||
{"x":0, "y":1},
|
||||
{"x":1, "y":1},
|
||||
{"x":2, "y":1},
|
||||
{"x":3, "y":1},
|
||||
{"x":0, "y":2},
|
||||
{"x":1, "y":2},
|
||||
{"x":2, "y":2},
|
||||
{"x":0, "y":3},
|
||||
{"x":1, "y":3},
|
||||
{"x":2, "y":3},
|
||||
{"x":3, "y":2, "h":2},
|
||||
{"x":0, "y":4},
|
||||
{"x":1, "y":4},
|
||||
{"x":2, "y":4},
|
||||
{"x":0, "y":5, "w":2},
|
||||
{"x":2, "y":5},
|
||||
{"x":3, "y":4, "h":2}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// place overrides here
|
@@ -1,41 +1,31 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_numpad_6x4( /* Base */
|
||||
KC_ESC, KC_TAB, KC_PEQL, MO(1), \
|
||||
KC_LNUM, KC_PSLS, KC_PAST, KC_PMNS, \
|
||||
KC_P7, KC_P8, KC_P9, \
|
||||
KC_P4, KC_P5, KC_P6, KC_PPLS, \
|
||||
KC_P1, KC_P2, KC_P3, \
|
||||
KC_P0, KC_PDOT, KC_PENT \
|
||||
),
|
||||
/* Base */
|
||||
[0] = LAYOUT_numpad_6x4(
|
||||
KC_ESC, KC_TAB, KC_PEQL, MO(1),
|
||||
KC_LNUM, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
KC_P7, KC_P8, KC_P9,
|
||||
KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||
KC_P1, KC_P2, KC_P3,
|
||||
KC_P0, KC_PDOT, KC_PENT
|
||||
),
|
||||
|
||||
[1] = LAYOUT_numpad_6x4( /* RGB */
|
||||
RGB_SAI, RGB_VAI, RGB_HUI, _______, \
|
||||
RGB_SAD, RGB_VAD, RGB_HUD, _______, \
|
||||
RGB_M_X, RGB_M_G, RGB_MOD, \
|
||||
RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_RMOD, \
|
||||
RGB_M_P, RGB_M_B, RGB_M_R, \
|
||||
XXXXXXX, XXXXXXX, RGB_TOG \
|
||||
),
|
||||
/* RGB */
|
||||
[1] = LAYOUT_numpad_6x4(
|
||||
RGB_SAI, RGB_VAI, RGB_HUI, _______,
|
||||
RGB_SAD, RGB_VAD, RGB_HUD, _______,
|
||||
RGB_M_X, RGB_M_G, RGB_MOD,
|
||||
RGB_M_SW,RGB_M_SN,RGB_M_K, RGB_RMOD,
|
||||
RGB_M_P, RGB_M_B, RGB_M_R,
|
||||
XXXXXXX, XXXXXXX, RGB_TOG
|
||||
)
|
||||
};
|
||||
|
||||
void matrix_init_user(void) {
|
||||
// This keymap only has a single base layer, so reset the default if needed
|
||||
if(eeconfig_read_default_layer() > 1){
|
||||
if (eeconfig_read_default_layer() > 1) {
|
||||
eeconfig_update_default_layer(1);
|
||||
default_layer_set(1);
|
||||
}
|
||||
}
|
||||
|
||||
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 +1 @@
|
||||
# The default keymap LFKPad 21
|
||||
# The default keymap for the LFKPad 21
|
||||
|
@@ -1,112 +1,117 @@
|
||||
#include <avr/sfr_defs.h>
|
||||
#include "lfkpad.h"
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#include <avr/timer_avr.h>
|
||||
#include <avr/wdt.h>
|
||||
#include "lfkpad.h"
|
||||
#include "keymap.h"
|
||||
#include "issi.h"
|
||||
#include "TWIlib.h"
|
||||
#include "lighting.h"
|
||||
#include "debug.h"
|
||||
#include "quantum.h"
|
||||
|
||||
uint16_t click_hz = CLICK_HZ;
|
||||
uint16_t click_time = CLICK_MS;
|
||||
uint8_t click_toggle = CLICK_ENABLED;
|
||||
|
||||
|
||||
void matrix_init_kb(void)
|
||||
{
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
|
||||
#ifndef AUDIO_ENABLE
|
||||
// If we're not using the audio pin, drive it low
|
||||
sbi(DDRC, 6);
|
||||
cbi(PORTC, 6);
|
||||
setPinOutput(C6);
|
||||
writePinLow(C6);
|
||||
#endif
|
||||
|
||||
#ifdef ISSI_ENABLE
|
||||
issi_init();
|
||||
#endif
|
||||
|
||||
#ifdef WATCHDOG_ENABLE
|
||||
// This is done after turning the layer LED red, if we're caught in a loop
|
||||
// we should get a flashing red light
|
||||
wdt_enable(WDTO_500MS);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void)
|
||||
{
|
||||
void matrix_scan_kb(void) {
|
||||
#ifdef WATCHDOG_ENABLE
|
||||
wdt_reset();
|
||||
#endif
|
||||
|
||||
#ifdef ISSI_ENABLE
|
||||
// switch/underglow lighting update
|
||||
static uint32_t issi_device = 0;
|
||||
static uint32_t twi_last_ready = 0;
|
||||
if(twi_last_ready > 1000){
|
||||
// Its been way too long since the last ISSI update, reset the I2C bus and start again
|
||||
|
||||
if (twi_last_ready > 1000) {
|
||||
// It's been way too long since the last ISSI update, reset the I2C bus and start again
|
||||
dprintf("TWI failed to recover, TWI re-init\n");
|
||||
twi_last_ready = 0;
|
||||
TWIInit();
|
||||
force_issi_refresh();
|
||||
}
|
||||
if(isTWIReady()){
|
||||
|
||||
if (isTWIReady()) {
|
||||
twi_last_ready = 0;
|
||||
// If the i2c bus is available, kick off the issi update, alternate between devices
|
||||
update_issi(issi_device, issi_device);
|
||||
if(issi_device){
|
||||
|
||||
if (issi_device) {
|
||||
issi_device = 0;
|
||||
}else{
|
||||
} else {
|
||||
issi_device = 3;
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
twi_last_ready++;
|
||||
}
|
||||
#endif
|
||||
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
void click(uint16_t freq, uint16_t duration){
|
||||
void click(uint16_t freq, uint16_t duration) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
if(freq >= 100 && freq <= 20000 && duration < 100){
|
||||
if (freq >= 100 && freq <= 20000 && duration < 100) {
|
||||
play_note(freq, 10);
|
||||
for (uint16_t i = 0; i < duration; i++){
|
||||
|
||||
for (uint16_t i = 0; i < duration; i++) {
|
||||
_delay_ms(1);
|
||||
}
|
||||
|
||||
stop_all_notes();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t* record)
|
||||
{
|
||||
if (click_toggle && record->event.pressed){
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t* record) {
|
||||
if (click_toggle && record->event.pressed) {
|
||||
click(click_hz, click_time);
|
||||
}
|
||||
|
||||
if (keycode == RESET) {
|
||||
reset_keyboard_kb();
|
||||
} else {
|
||||
}
|
||||
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void action_function(keyrecord_t *event, uint8_t id, uint8_t opt)
|
||||
{
|
||||
void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
int8_t sign = 1;
|
||||
#endif
|
||||
if(id == LFK_ESC_TILDE){
|
||||
|
||||
if (id == LFK_ESC_TILDE) {
|
||||
// Send ~ on shift-esc
|
||||
void (*method)(uint8_t) = (event->event.pressed) ? &add_key : &del_key;
|
||||
uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT));
|
||||
if(layer_state == 0){
|
||||
uint8_t shifted = get_mods() & MOD_MASK_SHIFT;
|
||||
|
||||
if (layer_state == 0) {
|
||||
method(shifted ? KC_GRAVE : KC_ESCAPE);
|
||||
}else{
|
||||
} else {
|
||||
method(shifted ? KC_ESCAPE : KC_GRAVE);
|
||||
}
|
||||
send_keyboard_report();
|
||||
}else if(event->event.pressed){
|
||||
switch(id){
|
||||
} else if (event->event.pressed) {
|
||||
switch (id) {
|
||||
case LFK_SET_DEFAULT_LAYER:
|
||||
// set/save the current base layer to eeprom, falls through to LFK_CLEAR
|
||||
eeconfig_update_default_layer(1UL << opt);
|
||||
@@ -117,24 +122,24 @@ void action_function(keyrecord_t *event, uint8_t id, uint8_t opt)
|
||||
break;
|
||||
#ifdef AUDIO_ENABLE
|
||||
case LFK_CLICK_FREQ_LOWER:
|
||||
sign = -1; // continue to next statement
|
||||
sign = -1; // continue to next statement
|
||||
case LFK_CLICK_FREQ_HIGHER:
|
||||
click_hz += sign * 100;
|
||||
click(click_hz, click_time);
|
||||
break;
|
||||
case LFK_CLICK_TOGGLE:
|
||||
if(click_toggle){
|
||||
if (click_toggle) {
|
||||
click_toggle = 0;
|
||||
click(4000, 100);
|
||||
click(1000, 100);
|
||||
}else{
|
||||
} else {
|
||||
click_toggle = 1;
|
||||
click(1000, 100);
|
||||
click(4000, 100);
|
||||
}
|
||||
break;
|
||||
case LFK_CLICK_TIME_SHORTER:
|
||||
sign = -1; // continue to next statement
|
||||
sign = -1; // continue to next statement
|
||||
case LFK_CLICK_TIME_LONGER:
|
||||
click_time += sign;
|
||||
click(click_hz, click_time);
|
||||
@@ -144,22 +149,18 @@ void action_function(keyrecord_t *event, uint8_t id, uint8_t opt)
|
||||
}
|
||||
}
|
||||
|
||||
void reset_keyboard_kb(){
|
||||
void reset_keyboard_kb() {
|
||||
#ifdef WATCHDOG_ENABLE
|
||||
MCUSR = 0;
|
||||
wdt_disable();
|
||||
wdt_reset();
|
||||
#endif
|
||||
|
||||
reset_keyboard();
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led)
|
||||
{
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
|
||||
// LFK lighting info
|
||||
const uint8_t rgb_matrices[] = {0, 1};
|
||||
const uint8_t rgb_matrices[] = { 0, 1 };
|
||||
const uint8_t rgb_sequence[] = {
|
||||
32, 1, 2, 3,
|
||||
31, 30, 5, 6,
|
||||
@@ -172,5 +173,4 @@ const uint8_t rgb_sequence[] = {
|
||||
4, 25,
|
||||
13, 24,
|
||||
20
|
||||
|
||||
};
|
||||
|
@@ -1,23 +1,6 @@
|
||||
#ifndef LFKPAD_H
|
||||
#define LFKPAD_H
|
||||
|
||||
/* if the kb.h file exists (because we're running from qmkbuilder) include it */
|
||||
#if __has_include("kb.h")
|
||||
#include "kb.h"
|
||||
#endif
|
||||
#pragma once
|
||||
|
||||
#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;
|
||||
@@ -57,7 +40,6 @@ void click(uint16_t freq, uint16_t duration);
|
||||
// readability
|
||||
#define ___ KC_NO
|
||||
|
||||
|
||||
#define LAYOUT_numpad_6x4( \
|
||||
k00, k01, k02, k03, \
|
||||
k10, k11, k12, k13, \
|
||||
@@ -73,5 +55,3 @@ void click(uint16_t freq, uint16_t duration);
|
||||
{ k40, k41, k42, k43 }, \
|
||||
{ k50, ___, k52, ___ } \
|
||||
}
|
||||
|
||||
#endif //LFKPAD_H
|
||||
|
@@ -1,28 +1,15 @@
|
||||
bluepad keyboard firmware
|
||||
======================
|
||||
# LFKPad
|
||||
|
||||
## Quantum MK Firmware
|
||||

|
||||
|
||||
For the full Quantum feature list, see [the parent readme.md](/docs/README.md).
|
||||
Hotswap 21-key numpad PCB with USB-C, per-key RGB and underglow.
|
||||
|
||||
## Building
|
||||
* Keyboard Maintainer: QMK community
|
||||
* Hardware Supported: LFKPad HS21 PCB
|
||||
* Hardware Availability: [LFKeyboards](https://www.lfkeyboards.com/lfkpad/)
|
||||
|
||||
Download or clone the whole firmware and navigate to the keyboards/bluepad folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file.
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
Depending on which keymap you would like to use, you will have to compile slightly differently.
|
||||
make lfkeyboards/lfkpad:default
|
||||
|
||||
### Default
|
||||
|
||||
To build with the default keymap, simply run `make`.
|
||||
|
||||
### Other Keymaps
|
||||
|
||||
Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files.
|
||||
|
||||
To build the firmware binary hex file with a keymap just do `make` with `keymap` option like:
|
||||
|
||||
```
|
||||
$ make keymap=[default|jack|<name>]
|
||||
```
|
||||
|
||||
Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/`
|
||||
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).
|
||||
|
@@ -11,26 +11,29 @@ MCU = atmega32u4
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
LAYOUTS = numpad_6x4
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # 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 = no # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = yes # 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 = yes # Enable keyboard RGB underglow
|
||||
RGBLIGHT_CUSTOM_DRIVER = yes # RGB code is implemented in lefkeyboards, not qmk base
|
||||
MIDI_ENABLE = no # MIDI support
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||
|
||||
BOOTMAGIC_ENABLE = no # 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 = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||
RGBLIGHT_CUSTOM_DRIVER = yes # RGB code is implemented in lefkeyboards, not qmk base
|
||||
SLEEP_LED_ENABLE = yes # 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
|
||||
ISSI_ENABLE = yes # If the I2C pullup resistors aren't installed this must be disabled
|
||||
WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan() isn't run every 250ms
|
||||
|
||||
SRC = TWIlib.c issi.c lighting.c
|
||||
|
||||
@@ -41,3 +44,5 @@ endif
|
||||
ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
|
||||
TMK_COMMON_DEFS += -DWATCHDOG_ENABLE
|
||||
endif
|
||||
|
||||
LAYOUTS = numpad_6x4
|
||||
|
130
keyboards/manta60/config.h
Normal file
130
keyboards/manta60/config.h
Normal file
@@ -0,0 +1,130 @@
|
||||
/*
|
||||
Copyright 2020 kamonanban
|
||||
|
||||
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 0x991D
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER kamonanban
|
||||
#define PRODUCT manta60
|
||||
#define DESCRIPTION A split keyboard with 27 ortholinear keys and 5-7 thumb/little finger keys
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 10
|
||||
#define MATRIX_COLS 7
|
||||
|
||||
/*
|
||||
* 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 { D4, C6, D7, E6 ,B4}
|
||||
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL*/
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/*
|
||||
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
||||
*/
|
||||
#define SOFT_SERIAL_PIN D2
|
||||
#define SELECT_SOFT_SERIAL_SPEED 1
|
||||
|
||||
#define RGBLIGHT_SPLIT
|
||||
#define RGB_DI_PIN D3
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#define RGBLED_NUM 68 // Number of LEDs
|
||||
#define RGBLED_SPLIT { 34, 34 }
|
||||
#endif
|
||||
|
||||
#ifdef RGB_DI_PIN
|
||||
#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
|
||||
|
||||
#ifndef IOS_DEVICE_ENABLE
|
||||
/* The maximum brightness level */
|
||||
#define RGBLIGHT_LIMIT_VAL 128
|
||||
#define RGBLIGHT_VAL_STEP 16
|
||||
#else
|
||||
#define RGBLIGHT_LIMIT_VAL 32
|
||||
#define RGBLIGHT_VAL_STEP 4
|
||||
#endif
|
||||
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
|
||||
#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
|
||||
#define USB_MAX_POWER_CONSUMPTION 400
|
||||
#else
|
||||
#define USB_MAX_POWER_CONSUMPTION 100
|
||||
#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
|
||||
|
||||
/*
|
||||
* 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
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
81
keyboards/manta60/info.json
Normal file
81
keyboards/manta60/info.json
Normal file
@@ -0,0 +1,81 @@
|
||||
{
|
||||
"keyboard_name": "manta60",
|
||||
"url": "https://github.com/KamoNanban",
|
||||
"maintainer": "kamonanban",
|
||||
"width": 17,
|
||||
"height": 4.5,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"label":"Esc", "x":0, "y":0},
|
||||
{"label":"!", "x":1, "y":0},
|
||||
{"label":"@", "x":2, "y":0},
|
||||
{"label":"#", "x":3, "y":0},
|
||||
{"label":"$", "x":4, "y":0},
|
||||
{"label":"%", "x":5, "y":0},
|
||||
{"label":"=", "x":6, "y":0},
|
||||
{"label":"-", "x":11, "y":0},
|
||||
{"label":"^", "x":12, "y":0},
|
||||
{"label":"&", "x":13, "y":0},
|
||||
{"label":"*", "x":14, "y":0},
|
||||
{"label":"(", "x":15, "y":0},
|
||||
{"label":")", "x":16, "y":0},
|
||||
{"label":"\\", "x":17, "y":0},
|
||||
{"label":"-", "x":0, "y":1},
|
||||
{"label":"Q", "x":1, "y":1},
|
||||
{"label":"W", "x":2, "y":1},
|
||||
{"label":"E", "x":3, "y":1},
|
||||
{"label":"R", "x":4, "y":1},
|
||||
{"label":"T", "x":5, "y":1},
|
||||
{"label":"[", "x":6, "y":1},
|
||||
{"label":"]", "x":11, "y":1},
|
||||
{"label":"Y", "x":12, "y":1},
|
||||
{"label":"U", "x":13, "y":1},
|
||||
{"label":"I", "x":14, "y":1},
|
||||
{"label":"O", "x":15, "y":1},
|
||||
{"label":"P", "x":16, "y":1},
|
||||
{"label":"@", "x":17, "y":1},
|
||||
{"label":"Tab", "x":0, "y":2},
|
||||
{"label":"A", "x":1, "y":2},
|
||||
{"label":"S", "x":2, "y":2},
|
||||
{"label":"D", "x":3, "y":2},
|
||||
{"label":"F", "x":4, "y":2},
|
||||
{"label":"G", "x":5, "y":2},
|
||||
{"label":",", "x":6, "y":2},
|
||||
{"label":".", "x":11, "y":2},
|
||||
{"label":"H", "x":12, "y":2},
|
||||
{"label":"J", "x":13, "y":2},
|
||||
{"label":"K", "x":14, "y":2},
|
||||
{"label":"L", "x":15, "y":2},
|
||||
{"label":"UP", "x":16, "y":2},
|
||||
{"label":";", "x":17, "y":2},
|
||||
{"label":"Shft", "x":0, "y":3},
|
||||
{"label":"Z", "x":1, "y":3},
|
||||
{"label":"X", "x":2, "y":3},
|
||||
{"label":"C", "x":3, "y":3},
|
||||
{"label":"V", "x":4, "y":3},
|
||||
{"label":"Alt", "x":5, "y":3},
|
||||
{"label":"B", "x":12, "y":3},
|
||||
{"label":"N", "x":13, "y":3},
|
||||
{"label":"M", "x":14, "y":3},
|
||||
{"label":"LEFT", "x":15, "y":3},
|
||||
{"label":"DOWN", "x":16, "y":3},
|
||||
{"label":"RIGHT", "x":17, "y":3},
|
||||
{"label":"LOWER", "x":0, "y":4.5},
|
||||
{"x":1, "y":4.5},
|
||||
{"label":"Alt", "x":4, "y":4.5},
|
||||
{"label":"Ctrl", "x":5, "y":4.5},
|
||||
{"label":"SPC", "x":6, "y":4.5},
|
||||
{"label":"cmd", "x":7, "y":4.5},
|
||||
{"label":"Enter", "x":8, "y":4.5},
|
||||
{"label":"BS", "x":11, "y":4.5},
|
||||
{"label":"DEL", "x":12, "y":4.5},
|
||||
{"label":"SPC", "x":13, "y":4.5},
|
||||
{"label":"Ctrl", "x":14, "y":4.5},
|
||||
{"label":"Alt", "x":15, "y":4.5},
|
||||
{"x":16, "y":4.5},
|
||||
{"label":"RAISE", "x":17, "y":4.5}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
21
keyboards/manta60/keymaps/default/config.h
Normal file
21
keyboards/manta60/keymaps/default/config.h
Normal file
@@ -0,0 +1,21 @@
|
||||
/* Copyright 2020 kamonanban
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define RGBLIGHT_SLEEP
|
||||
|
||||
// place overrides here
|
131
keyboards/manta60/keymaps/default/keymap.c
Normal file
131
keyboards/manta60/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,131 @@
|
||||
/* Copyright 2020 kamonanban
|
||||
*
|
||||
* 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_number {
|
||||
_BASE = 0,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST,
|
||||
};
|
||||
|
||||
// Defines the keycodes used by our macros in process_record_user
|
||||
enum custom_keycodes {
|
||||
LOWER = SAFE_RANGE,
|
||||
RAISE,
|
||||
ADJUST
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_BASE] = LAYOUT(
|
||||
//,---------------------------------------------------------------------.,---------------------------------------------------------------------.
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, KC_MINS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
|
||||
//|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------|
|
||||
KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_AT,
|
||||
//|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------|
|
||||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_COMM, KC_DOT, KC_H, KC_J, KC_K, KC_L, KC_UP, KC_SCLN,
|
||||
//|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------|
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_SLSH, KC_B, KC_N, KC_M, KC_LEFT, KC_DOWN, KC_RGHT,
|
||||
//|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------|
|
||||
LOWER, XXXXXXX, KC_LALT, KC_LCTRL, KC_SPC, KC_LGUI, KC_ENT, KC_BSPC, KC_DEL, KC_SPC, KC_RCTRL, KC_RALT, XXXXXXX, RAISE
|
||||
//`---------+----------/\-------+---------+---------+---------+---------/\---------+---------+---------+---------+---------/\--------+----------'
|
||||
),
|
||||
|
||||
[_LOWER] = LAYOUT(
|
||||
//,---------------------------------------------------------------------.,---------------------------------------------------------------------.
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC,
|
||||
//|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------|
|
||||
_______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, KC_BSLS,
|
||||
//|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------|
|
||||
_______, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX,
|
||||
//|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------|
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------|
|
||||
LOWER, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, RAISE
|
||||
//`---------+----------/\-------+---------+---------+---------+---------/\---------+---------+---------+---------+---------/\--------+----------'
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT(
|
||||
//,---------------------------------------------------------------------.,---------------------------------------------------------------------.
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------|
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------|
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------|
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------|
|
||||
LOWER, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, RAISE
|
||||
//`---------+----------/\-------+---------+---------+---------+---------/\---------+---------+---------+---------+---------/\--------+----------'
|
||||
),
|
||||
|
||||
[_ADJUST] = LAYOUT(
|
||||
//,---------------------------------------------------------------------.,---------------------------------------------------------------------.
|
||||
_______, RGB_TOG, XXXXXXX, XXXXXXX, XXXXXXX, RGB_M_R, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET,
|
||||
//|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------|
|
||||
_______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_M_SN, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------|
|
||||
_______, RGB_M_T, RGB_HUD, RGB_SAD, RGB_VAD, RGB_M_K, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------|
|
||||
_______, RGB_M_P, XXXXXXX, XXXXXXX, XXXXXXX, RGB_M_SW, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------|
|
||||
LOWER, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, RAISE
|
||||
//`---------+----------/\-------+---------+---------+---------+---------/\---------+---------+---------+---------+---------/\--------+----------'
|
||||
)
|
||||
};
|
||||
|
||||
static inline void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
|
||||
if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
|
||||
layer_on(layer3);
|
||||
} else {
|
||||
layer_off(layer3);
|
||||
}
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case ADJUST:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_ADJUST);
|
||||
} else {
|
||||
layer_off(_ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
1
keyboards/manta60/keymaps/default/readme.md
Normal file
1
keyboards/manta60/keymaps/default/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
# The default keymap for manta60
|
1
keyboards/manta60/manta60.c
Normal file
1
keyboards/manta60/manta60.c
Normal file
@@ -0,0 +1 @@
|
||||
#include "manta60.h"
|
45
keyboards/manta60/manta60.h
Normal file
45
keyboards/manta60/manta60.h
Normal file
@@ -0,0 +1,45 @@
|
||||
/* Copyright 2020 kamonanban
|
||||
*
|
||||
* 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( \
|
||||
L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \
|
||||
L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \
|
||||
L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \
|
||||
L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \
|
||||
L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \
|
||||
) \
|
||||
{ \
|
||||
{ L00, L01, L02, L03, L04, L05, L06 }, \
|
||||
{ L10, L11, L12, L13, L14, L15, L16 }, \
|
||||
{ L20, L21, L22, L23, L24, L25, L26 }, \
|
||||
{ L30, L31, L32, L33, L34, L35, KC_NO}, \
|
||||
{ L40, L41, L42, L43, L44, L45, L46 }, \
|
||||
{ R06, R05, R04, R03, R02, R01, R00 }, \
|
||||
{ R16, R15, R14, R13, R12, R11, R10 }, \
|
||||
{ R26, R25, R24, R23, R22, R21, R20 }, \
|
||||
{ R35, R34, R33, R32, R31, R30, KC_NO } , \
|
||||
{ R46, R45, R44, R43, R42, R41, R40 } \
|
||||
}
|
15
keyboards/manta60/readme.md
Normal file
15
keyboards/manta60/readme.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# manta60
|
||||
|
||||

|
||||
|
||||
A split keyboard with 27 ortholinear keys and 5-7 thumb/little finger keys
|
||||
|
||||
* Keyboard Maintainer: [kamonanban](https://github.com/KamoNanban)
|
||||
* Hardware Supported: MANTA60 PCBs, Pro Micro (ATmega32U4)
|
||||
* Hardware Availability: https://github.com/KamoNanban/Manta60
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make manta60: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).
|
40
keyboards/manta60/rules.mk
Normal file
40
keyboards/manta60/rules.mk
Normal file
@@ -0,0 +1,40 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = caterina
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = no # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||
MIDI_ENABLE = no # MIDI support
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||
|
||||
SPLIT_KEYBOARD = yes
|
||||
|
||||
IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
|
||||
|
||||
ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
|
||||
OPT_DEFS += -DIOS_DEVICE_ENABLE
|
||||
endif
|
49
keyboards/mechlovin/infinityce/config.h
Normal file
49
keyboards/mechlovin/infinityce/config.h
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
Copyright 2020 mechlovin
|
||||
|
||||
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 0x4D4C // ML-Mechlovin
|
||||
#define PRODUCT_ID 0x8801
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Team.Mechlovin
|
||||
#define PRODUCT Infinity CE
|
||||
#define DESCRIPTION Team.Mechlovin Infinity CE
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 6
|
||||
#define MATRIX_COLS 17
|
||||
|
||||
#define MATRIX_ROW_PINS { D7, D6, B6, B1, C6, C7 }
|
||||
#define MATRIX_COL_PINS { B5, B4, B0, D5, D4, D1, D0, E6, F7, F6, F5, F4, F1, F0, B2, D3, D2}
|
||||
|
||||
/* COL2ROW, ROW2COL*/
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
#define BACKLIGHT_PIN B7
|
||||
#define BACKLIGHT_BREATHING
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
|
||||
#define RGB_DI_PIN E2
|
||||
#define RGBLED_NUM 31
|
||||
#define RGBLIGHT_LIMIT_VAL 255
|
||||
#define RGBLIGHT_ANIMATIONS
|
42
keyboards/mechlovin/infinityce/infinityce.c
Normal file
42
keyboards/mechlovin/infinityce/infinityce.c
Normal file
@@ -0,0 +1,42 @@
|
||||
/* Copyright 2020 mechlovin
|
||||
*
|
||||
* 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 "infinityce.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
matrix_init_user();
|
||||
led_init_ports();
|
||||
};
|
||||
|
||||
void led_init_ports(void) {
|
||||
// * Set our LED pins as output
|
||||
setPinOutput(B3);
|
||||
}
|
||||
bool led_update_kb(led_t led_state) {
|
||||
bool res = led_update_user(led_state);
|
||||
if(res) {
|
||||
writePin(B3, led_state.caps_lock);
|
||||
rgblight_set_effect_range(1, 30);
|
||||
if (led_state.scroll_lock) {
|
||||
rgblight_setrgb_at(255, 255, 255, 0);
|
||||
} else {
|
||||
rgblight_setrgb_at(0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
67
keyboards/mechlovin/infinityce/infinityce.h
Normal file
67
keyboards/mechlovin/infinityce/infinityce.h
Normal file
@@ -0,0 +1,67 @@
|
||||
/* Copyright 2020 mechlovin
|
||||
*
|
||||
* 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"
|
||||
|
||||
#define LAYOUT_all( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
|
||||
K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4G, \
|
||||
K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K5G \
|
||||
) { \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, KC_NO, KC_NO }, \
|
||||
{ K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, KC_NO, K4G, KC_NO }, \
|
||||
{ K50, K51, K52, KC_NO, KC_NO, KC_NO, K56, KC_NO, KC_NO, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F, K5G }, \
|
||||
}
|
||||
|
||||
#define LAYOUT_ansi( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \
|
||||
K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4G, \
|
||||
K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K5G \
|
||||
) { \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, KC_NO, KC_NO, KC_NO }, \
|
||||
{ K40, KC_NO, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, KC_NO, K4D, KC_NO, K4G, KC_NO }, \
|
||||
{ K50, K51, K52, KC_NO, KC_NO, KC_NO, K56, KC_NO, KC_NO, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F, K5G }, \
|
||||
}
|
||||
|
||||
#define LAYOUT_iso( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2E, K2F, K2G, \
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
|
||||
K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4G, \
|
||||
K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K5G \
|
||||
) { \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO, K2E, K2F, K2G }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, KC_NO, KC_NO }, \
|
||||
{ K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, KC_NO, K4D, KC_NO, K4G, KC_NO }, \
|
||||
{ K50, K51, K52, KC_NO, KC_NO, KC_NO, K56, KC_NO, KC_NO, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F, K5G }, \
|
||||
}
|
293
keyboards/mechlovin/infinityce/info.json
Normal file
293
keyboards/mechlovin/infinityce/info.json
Normal file
@@ -0,0 +1,293 @@
|
||||
{
|
||||
"keyboard_name": "Infinity CE",
|
||||
"url": "",
|
||||
"maintainer": "Team Mechlovin'",
|
||||
"width": 18.25,
|
||||
"height": 6.25,
|
||||
"layouts": {
|
||||
"LAYOUT_all": {
|
||||
"key_count": 91,
|
||||
"layout": [
|
||||
{"label":"K00 (B0,B6)", "x":0, "y":0},
|
||||
{"label":"K01 (B0,B7)", "x":1.25, "y":0},
|
||||
{"label":"K02 (B0,C0)", "x":2.25, "y":0},
|
||||
{"label":"K03 (B0,C1)", "x":3.25, "y":0},
|
||||
{"label":"K04 (B0,C2)", "x":4.25, "y":0},
|
||||
{"label":"K05 (B0,C3)", "x":5.5, "y":0},
|
||||
{"label":"K06 (B0,C4)", "x":6.5, "y":0},
|
||||
{"label":"K07 (B0,C5)", "x":7.5, "y":0},
|
||||
{"label":"K08 (B0,C6)", "x":8.5, "y":0},
|
||||
{"label":"K09 (B0,C7)", "x":9.75, "y":0},
|
||||
{"label":"K0A (B0,D0)", "x":10.75, "y":0},
|
||||
{"label":"K0B (B0,D1)", "x":11.75, "y":0},
|
||||
{"label":"K0C (B0,D2)", "x":12.75, "y":0},
|
||||
{"label":"K0D (B0,D3)", "x":14, "y":0},
|
||||
{"label":"K0E (B0,D4)", "x":15.25, "y":0},
|
||||
{"label":"K0F (B0,D5)", "x":16.25, "y":0},
|
||||
{"label":"K0G (B0,D6)", "x":17.25, "y":0},
|
||||
{"label":"K10 (B1,B6)", "x":0, "y":1.25},
|
||||
{"label":"K11 (B1,B7)", "x":1, "y":1.25},
|
||||
{"label":"K12 (B1,C0)", "x":2, "y":1.25},
|
||||
{"label":"K13 (B1,C1)", "x":3, "y":1.25},
|
||||
{"label":"K14 (B1,C2)", "x":4, "y":1.25},
|
||||
{"label":"K15 (B1,C3)", "x":5, "y":1.25},
|
||||
{"label":"K16 (B1,C4)", "x":6, "y":1.25},
|
||||
{"label":"K17 (B1,C5)", "x":7, "y":1.25},
|
||||
{"label":"K18 (B1,C6)", "x":8, "y":1.25},
|
||||
{"label":"K19 (B1,C7)", "x":9, "y":1.25},
|
||||
{"label":"K1A (B1,D0)", "x":10, "y":1.25},
|
||||
{"label":"K1B (B1,D1)", "x":11, "y":1.25},
|
||||
{"label":"K1C (B1,D2)", "x":12, "y":1.25},
|
||||
{"label":"K1D (B1,D3)", "x":13, "y":1.25, "w":2},
|
||||
{"label":"K1E (B1,D4)", "x":15.25, "y":1.25},
|
||||
{"label":"K1F (B1,D5)", "x":16.25, "y":1.25},
|
||||
{"label":"K1G (B1,D6)", "x":17.25, "y":1.25},
|
||||
{"label":"K20 (B2,B6)", "x":0, "y":2.25, "w":1.5},
|
||||
{"label":"K21 (B2,B7)", "x":1.5, "y":2.25},
|
||||
{"label":"K22 (B2,C0)", "x":2.5, "y":2.25},
|
||||
{"label":"K23 (B2,C1)", "x":3.5, "y":2.25},
|
||||
{"label":"K24 (B2,C2)", "x":4.5, "y":2.25},
|
||||
{"label":"K25 (B2,C3)", "x":5.5, "y":2.25},
|
||||
{"label":"K26 (B2,C4)", "x":6.5, "y":2.25},
|
||||
{"label":"K27 (B2,C5)", "x":7.5, "y":2.25},
|
||||
{"label":"K28 (B2,C6)", "x":8.5, "y":2.25},
|
||||
{"label":"K29 (B2,C7)", "x":9.5, "y":2.25},
|
||||
{"label":"K2A (B2,D0)", "x":10.5, "y":2.25},
|
||||
{"label":"K2B (B2,D1)", "x":11.5, "y":2.25},
|
||||
{"label":"K2C (B2,D2)", "x":12.5, "y":2.25},
|
||||
{"label":"K2D (B2,D3)", "x":13.5, "y":2.25, "w":1.5},
|
||||
{"label":"K2E (B2,D4)", "x":15.25, "y":2.25},
|
||||
{"label":"K2F (B2,D5)", "x":16.25, "y":2.25},
|
||||
{"label":"K2G (B2,D6)", "x":17.25, "y":2.25},
|
||||
{"label":"K30 (B3,B6)", "x":0, "y":3.25, "w":1.75},
|
||||
{"label":"K31 (B3,B7)", "x":1.75, "y":3.25},
|
||||
{"label":"K32 (B3,C0)", "x":2.75, "y":3.25},
|
||||
{"label":"K33 (B3,C1)", "x":3.75, "y":3.25},
|
||||
{"label":"K34 (B3,C2)", "x":4.75, "y":3.25},
|
||||
{"label":"K35 (B3,C3)", "x":5.75, "y":3.25},
|
||||
{"label":"K36 (B3,C4)", "x":6.75, "y":3.25},
|
||||
{"label":"K37 (B3,C5)", "x":7.75, "y":3.25},
|
||||
{"label":"K38 (B3,C6)", "x":8.75, "y":3.25},
|
||||
{"label":"K39 (B3,C7)", "x":9.75, "y":3.25},
|
||||
{"label":"K3A (B3,D0)", "x":10.75, "y":3.25},
|
||||
{"label":"K3B (B3,D1)", "x":11.75, "y":3.25},
|
||||
{"label":"K3C (B3,D2)", "x":12.75, "y":3.25},
|
||||
{"label":"K3D (B3,D3)", "x":13.75, "y":3.25, "w":1.25},
|
||||
{"label":"K40 (B4,B6)", "x":0, "y":4.25, "w":1.25},
|
||||
{"label":"K41 (B4,B7)", "x":1.25, "y":4.25},
|
||||
{"label":"K42 (B4,C0)", "x":2.25, "y":4.25},
|
||||
{"label":"K43 (B4,C1)", "x":3.25, "y":4.25},
|
||||
{"label":"K44 (B4,C2)", "x":4.25, "y":4.25},
|
||||
{"label":"K45 (B4,C3)", "x":5.25, "y":4.25},
|
||||
{"label":"K46 (B4,C4)", "x":6.25, "y":4.25},
|
||||
{"label":"K47 (B4,C5)", "x":7.25, "y":4.25},
|
||||
{"label":"K48 (B4,C6)", "x":8.25, "y":4.25},
|
||||
{"label":"K49 (B4,C7)", "x":9.25, "y":4.25},
|
||||
{"label":"K4A (B4,D0)", "x":10.25, "y":4.25},
|
||||
{"label":"K4B (B4,D1)", "x":11.25, "y":4.25},
|
||||
{"label":"K4C (B4,D2)", "x":12.25, "y":4.25, "w":1.75},
|
||||
{"label":"K4D (B4,D3)", "x":14, "y":4.25},
|
||||
{"label":"K4F (B4,D5)", "x":16.25, "y":4.25},
|
||||
{"label":"K50 (B5,B6)", "x":0, "y":5.25, "w":1.25},
|
||||
{"label":"K51 (B5,B7)", "x":1.25, "y":5.25, "w":1.25},
|
||||
{"label":"K52 (B5,C0)", "x":2.5, "y":5.25, "w":1.25},
|
||||
{"label":"K56 (B5,C4)", "x":3.75, "y":5.25, "w":6.25},
|
||||
{"label":"K5A (B5,D0)", "x":10, "y":5.25, "w":1.25},
|
||||
{"label":"K5B (B5,D1)", "x":11.25, "y":5.25, "w":1.25},
|
||||
{"label":"K5C (B5,D2)", "x":12.5, "y":5.25, "w":1.25},
|
||||
{"label":"K5D (B5,D3)", "x":13.75, "y":5.25, "w":1.25},
|
||||
{"label":"K5E (B5,D4)", "x":15.25, "y":5.25},
|
||||
{"label":"K5F (B5,D5)", "x":16.25, "y":5.25},
|
||||
{"label":"K5G (B5,D6)", "x":17.25, "y":5.25}
|
||||
]
|
||||
},
|
||||
"LAYOUT_ansi": {
|
||||
"key_count": 88,
|
||||
"layout": [
|
||||
{"label":"K00 (B0,B6)", "x":0, "y":0},
|
||||
{"label":"K01 (B0,B7)", "x":1.25, "y":0},
|
||||
{"label":"K02 (B0,C0)", "x":2.25, "y":0},
|
||||
{"label":"K03 (B0,C1)", "x":3.25, "y":0},
|
||||
{"label":"K04 (B0,C2)", "x":4.25, "y":0},
|
||||
{"label":"K05 (B0,C3)", "x":5.5, "y":0},
|
||||
{"label":"K06 (B0,C4)", "x":6.5, "y":0},
|
||||
{"label":"K07 (B0,C5)", "x":7.5, "y":0},
|
||||
{"label":"K08 (B0,C6)", "x":8.5, "y":0},
|
||||
{"label":"K09 (B0,C7)", "x":9.75, "y":0},
|
||||
{"label":"K0A (B0,D0)", "x":10.75, "y":0},
|
||||
{"label":"K0B (B0,D1)", "x":11.75, "y":0},
|
||||
{"label":"K0C (B0,D2)", "x":12.75, "y":0},
|
||||
{"label":"K0D (B0,D3)", "x":14, "y":0},
|
||||
{"label":"K0E (B0,D4)", "x":15.25, "y":0},
|
||||
{"label":"K0F (B0,D5)", "x":16.25, "y":0},
|
||||
{"label":"K0G (B0,D6)", "x":17.25, "y":0},
|
||||
{"label":"K10 (B1,B6)", "x":0, "y":1.25},
|
||||
{"label":"K11 (B1,B7)", "x":1, "y":1.25},
|
||||
{"label":"K12 (B1,C0)", "x":2, "y":1.25},
|
||||
{"label":"K13 (B1,C1)", "x":3, "y":1.25},
|
||||
{"label":"K14 (B1,C2)", "x":4, "y":1.25},
|
||||
{"label":"K15 (B1,C3)", "x":5, "y":1.25},
|
||||
{"label":"K16 (B1,C4)", "x":6, "y":1.25},
|
||||
{"label":"K17 (B1,C5)", "x":7, "y":1.25},
|
||||
{"label":"K18 (B1,C6)", "x":8, "y":1.25},
|
||||
{"label":"K19 (B1,C7)", "x":9, "y":1.25},
|
||||
{"label":"K1A (B1,D0)", "x":10, "y":1.25},
|
||||
{"label":"K1B (B1,D1)", "x":11, "y":1.25},
|
||||
{"label":"K1C (B1,D2)", "x":12, "y":1.25},
|
||||
{"label":"K1D (B1,D3)", "x":13, "y":1.25, "w":2},
|
||||
{"label":"K1E (B1,D4)", "x":15.25, "y":1.25},
|
||||
{"label":"K1F (B1,D5)", "x":16.25, "y":1.25},
|
||||
{"label":"K1G (B1,D6)", "x":17.25, "y":1.25},
|
||||
{"label":"K20 (B2,B6)", "x":0, "y":2.25, "w":1.5},
|
||||
{"label":"K21 (B2,B7)", "x":1.5, "y":2.25},
|
||||
{"label":"K22 (B2,C0)", "x":2.5, "y":2.25},
|
||||
{"label":"K23 (B2,C1)", "x":3.5, "y":2.25},
|
||||
{"label":"K24 (B2,C2)", "x":4.5, "y":2.25},
|
||||
{"label":"K25 (B2,C3)", "x":5.5, "y":2.25},
|
||||
{"label":"K26 (B2,C4)", "x":6.5, "y":2.25},
|
||||
{"label":"K27 (B2,C5)", "x":7.5, "y":2.25},
|
||||
{"label":"K28 (B2,C6)", "x":8.5, "y":2.25},
|
||||
{"label":"K29 (B2,C7)", "x":9.5, "y":2.25},
|
||||
{"label":"K2A (B2,D0)", "x":10.5, "y":2.25},
|
||||
{"label":"K2B (B2,D1)", "x":11.5, "y":2.25},
|
||||
{"label":"K2C (B2,D2)", "x":12.5, "y":2.25},
|
||||
{"label":"K2D (B2,D3)", "x":13.5, "y":2.25, "w":1.5},
|
||||
{"label":"K2E (B2,D4)", "x":15.25, "y":2.25},
|
||||
{"label":"K2F (B2,D5)", "x":16.25, "y":2.25},
|
||||
{"label":"K2G (B2,D6)", "x":17.25, "y":2.25},
|
||||
{"label":"K30 (B3,B6)", "x":0, "y":3.25, "w":1.75},
|
||||
{"label":"K31 (B3,B7)", "x":1.75, "y":3.25},
|
||||
{"label":"K32 (B3,C0)", "x":2.75, "y":3.25},
|
||||
{"label":"K33 (B3,C1)", "x":3.75, "y":3.25},
|
||||
{"label":"K34 (B3,C2)", "x":4.75, "y":3.25},
|
||||
{"label":"K35 (B3,C3)", "x":5.75, "y":3.25},
|
||||
{"label":"K36 (B3,C4)", "x":6.75, "y":3.25},
|
||||
{"label":"K37 (B3,C5)", "x":7.75, "y":3.25},
|
||||
{"label":"K38 (B3,C6)", "x":8.75, "y":3.25},
|
||||
{"label":"K39 (B3,C7)", "x":9.75, "y":3.25},
|
||||
{"label":"K3A (B3,D0)", "x":10.75, "y":3.25},
|
||||
{"label":"K3B (B3,D1)", "x":11.75, "y":3.25},
|
||||
{"label":"K3D (B3,D3)", "x":12.75, "y":3.25, "w":2.25},
|
||||
{"label":"K40 (B4,B6)", "x":0, "y":4.25, "w":2.25},
|
||||
{"label":"K42 (B4,C0)", "x":2.25, "y":4.25},
|
||||
{"label":"K43 (B4,C1)", "x":3.25, "y":4.25},
|
||||
{"label":"K44 (B4,C2)", "x":4.25, "y":4.25},
|
||||
{"label":"K45 (B4,C3)", "x":5.25, "y":4.25},
|
||||
{"label":"K46 (B4,C4)", "x":6.25, "y":4.25},
|
||||
{"label":"K47 (B4,C5)", "x":7.25, "y":4.25},
|
||||
{"label":"K48 (B4,C6)", "x":8.25, "y":4.25},
|
||||
{"label":"K49 (B4,C7)", "x":9.25, "y":4.25},
|
||||
{"label":"K4A (B4,D0)", "x":10.25, "y":4.25},
|
||||
{"label":"K4B (B4,D1)", "x":11.25, "y":4.25},
|
||||
{"label":"K4D (B4,D3)", "x":12.25, "y":4.25, "w":2.75},
|
||||
{"label":"K4F (B4,D5)", "x":16.25, "y":4.25},
|
||||
{"label":"K50 (B5,B6)", "x":0, "y":5.25, "w":1.25},
|
||||
{"label":"K51 (B5,B7)", "x":1.25, "y":5.25, "w":1.25},
|
||||
{"label":"K52 (B5,C0)", "x":2.5, "y":5.25, "w":1.25},
|
||||
{"label":"K56 (B5,C4)", "x":3.75, "y":5.25, "w":6.25},
|
||||
{"label":"K5A (B5,D0)", "x":10, "y":5.25, "w":1.25},
|
||||
{"label":"K5B (B5,D1)", "x":11.25, "y":5.25, "w":1.25},
|
||||
{"label":"K5C (B5,D2)", "x":12.5, "y":5.25, "w":1.25},
|
||||
{"label":"K5D (B5,D3)", "x":13.75, "y":5.25, "w":1.25},
|
||||
{"label":"K5E (B5,D4)", "x":15.25, "y":5.25},
|
||||
{"label":"K5F (B5,D5)", "x":16.25, "y":5.25},
|
||||
{"label":"K5G (B5,D6)", "x":17.25, "y":5.25}
|
||||
]
|
||||
},
|
||||
"LAYOUT_iso": {
|
||||
"key_count": 89,
|
||||
"layout": [
|
||||
{"label":"K00 (B0,B6)", "x":0, "y":0},
|
||||
{"label":"K01 (B0,B7)", "x":1.25, "y":0},
|
||||
{"label":"K02 (B0,C0)", "x":2.25, "y":0},
|
||||
{"label":"K03 (B0,C1)", "x":3.25, "y":0},
|
||||
{"label":"K04 (B0,C2)", "x":4.25, "y":0},
|
||||
{"label":"K05 (B0,C3)", "x":5.5, "y":0},
|
||||
{"label":"K06 (B0,C4)", "x":6.5, "y":0},
|
||||
{"label":"K07 (B0,C5)", "x":7.5, "y":0},
|
||||
{"label":"K08 (B0,C6)", "x":8.5, "y":0},
|
||||
{"label":"K09 (B0,C7)", "x":9.75, "y":0},
|
||||
{"label":"K0A (B0,D0)", "x":10.75, "y":0},
|
||||
{"label":"K0B (B0,D1)", "x":11.75, "y":0},
|
||||
{"label":"K0C (B0,D2)", "x":12.75, "y":0},
|
||||
{"label":"K0D (B0,D3)", "x":14, "y":0},
|
||||
{"label":"K0E (B0,D4)", "x":15.25, "y":0},
|
||||
{"label":"K0F (B0,D5)", "x":16.25, "y":0},
|
||||
{"label":"K0G (B0,D6)", "x":17.25, "y":0},
|
||||
{"label":"K10 (B1,B6)", "x":0, "y":1.25},
|
||||
{"label":"K11 (B1,B7)", "x":1, "y":1.25},
|
||||
{"label":"K12 (B1,C0)", "x":2, "y":1.25},
|
||||
{"label":"K13 (B1,C1)", "x":3, "y":1.25},
|
||||
{"label":"K14 (B1,C2)", "x":4, "y":1.25},
|
||||
{"label":"K15 (B1,C3)", "x":5, "y":1.25},
|
||||
{"label":"K16 (B1,C4)", "x":6, "y":1.25},
|
||||
{"label":"K17 (B1,C5)", "x":7, "y":1.25},
|
||||
{"label":"K18 (B1,C6)", "x":8, "y":1.25},
|
||||
{"label":"K19 (B1,C7)", "x":9, "y":1.25},
|
||||
{"label":"K1A (B1,D0)", "x":10, "y":1.25},
|
||||
{"label":"K1B (B1,D1)", "x":11, "y":1.25},
|
||||
{"label":"K1C (B1,D2)", "x":12, "y":1.25},
|
||||
{"label":"K1D (B1,D3)", "x":13, "y":1.25, "w":2},
|
||||
{"label":"K1E (B1,D4)", "x":15.25, "y":1.25},
|
||||
{"label":"K1F (B1,D5)", "x":16.25, "y":1.25},
|
||||
{"label":"K1G (B1,D6)", "x":17.25, "y":1.25},
|
||||
{"label":"K20 (B2,B6)", "x":0, "y":2.25, "w":1.5},
|
||||
{"label":"K21 (B2,B7)", "x":1.5, "y":2.25},
|
||||
{"label":"K22 (B2,C0)", "x":2.5, "y":2.25},
|
||||
{"label":"K23 (B2,C1)", "x":3.5, "y":2.25},
|
||||
{"label":"K24 (B2,C2)", "x":4.5, "y":2.25},
|
||||
{"label":"K25 (B2,C3)", "x":5.5, "y":2.25},
|
||||
{"label":"K26 (B2,C4)", "x":6.5, "y":2.25},
|
||||
{"label":"K27 (B2,C5)", "x":7.5, "y":2.25},
|
||||
{"label":"K28 (B2,C6)", "x":8.5, "y":2.25},
|
||||
{"label":"K29 (B2,C7)", "x":9.5, "y":2.25},
|
||||
{"label":"K2A (B2,D0)", "x":10.5, "y":2.25},
|
||||
{"label":"K2B (B2,D1)", "x":11.5, "y":2.25},
|
||||
{"label":"K2C (B2,D2)", "x":12.5, "y":2.25},
|
||||
{"label":"K2E (B2,D4)", "x":15.25, "y":2.25},
|
||||
{"label":"K2F (B2,D5)", "x":16.25, "y":2.25},
|
||||
{"label":"K2G (B2,D6)", "x":17.25, "y":2.25},
|
||||
{"label":"K30 (B3,B6)", "x":0, "y":3.25, "w":1.75},
|
||||
{"label":"K31 (B3,B7)", "x":1.75, "y":3.25},
|
||||
{"label":"K32 (B3,C0)", "x":2.75, "y":3.25},
|
||||
{"label":"K33 (B3,C1)", "x":3.75, "y":3.25},
|
||||
{"label":"K34 (B3,C2)", "x":4.75, "y":3.25},
|
||||
{"label":"K35 (B3,C3)", "x":5.75, "y":3.25},
|
||||
{"label":"K36 (B3,C4)", "x":6.75, "y":3.25},
|
||||
{"label":"K37 (B3,C5)", "x":7.75, "y":3.25},
|
||||
{"label":"K38 (B3,C6)", "x":8.75, "y":3.25},
|
||||
{"label":"K39 (B3,C7)", "x":9.75, "y":3.25},
|
||||
{"label":"K3A (B3,D0)", "x":10.75, "y":3.25},
|
||||
{"label":"K3B (B3,D1)", "x":11.75, "y":3.25},
|
||||
{"label":"K3C (B3,D2)", "x":12.75, "y":3.25},
|
||||
{"label":"K3D (B3,D3)", "x":13.75, "y":2.25, "w":1.25, "h":2},
|
||||
{"label":"K40 (B4,B6)", "x":0, "y":4.25, "w":1.25},
|
||||
{"label":"K41 (B4,B7)", "x":1.25, "y":4.25},
|
||||
{"label":"K42 (B4,C0)", "x":2.25, "y":4.25},
|
||||
{"label":"K43 (B4,C1)", "x":3.25, "y":4.25},
|
||||
{"label":"K44 (B4,C2)", "x":4.25, "y":4.25},
|
||||
{"label":"K45 (B4,C3)", "x":5.25, "y":4.25},
|
||||
{"label":"K46 (B4,C4)", "x":6.25, "y":4.25},
|
||||
{"label":"K47 (B4,C5)", "x":7.25, "y":4.25},
|
||||
{"label":"K48 (B4,C6)", "x":8.25, "y":4.25},
|
||||
{"label":"K49 (B4,C7)", "x":9.25, "y":4.25},
|
||||
{"label":"K4A (B4,D0)", "x":10.25, "y":4.25},
|
||||
{"label":"K4B (B4,D1)", "x":11.25, "y":4.25},
|
||||
{"label":"K4D (B4,D3)", "x":12.25, "y":4.25, "w":2.75},
|
||||
{"label":"K4F (B4,D5)", "x":16.25, "y":4.25},
|
||||
{"label":"K50 (B5,B6)", "x":0, "y":5.25, "w":1.25},
|
||||
{"label":"K51 (B5,B7)", "x":1.25, "y":5.25, "w":1.25},
|
||||
{"label":"K52 (B5,C0)", "x":2.5, "y":5.25, "w":1.25},
|
||||
{"label":"K56 (B5,C4)", "x":3.75, "y":5.25, "w":6.25},
|
||||
{"label":"K5A (B5,D0)", "x":10, "y":5.25, "w":1.25},
|
||||
{"label":"K5B (B5,D1)", "x":11.25, "y":5.25, "w":1.25},
|
||||
{"label":"K5C (B5,D2)", "x":12.5, "y":5.25, "w":1.25},
|
||||
{"label":"K5D (B5,D3)", "x":13.75, "y":5.25, "w":1.25},
|
||||
{"label":"K5E (B5,D4)", "x":15.25, "y":5.25},
|
||||
{"label":"K5F (B5,D5)", "x":16.25, "y":5.25},
|
||||
{"label":"K5G (B5,D6)", "x":17.25, "y":5.25}
|
||||
]
|
||||
}
|
||||
}
|
||||
,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/"
|
||||
}
|
29
keyboards/mechlovin/infinityce/keymaps/default/keymap.c
Normal file
29
keyboards/mechlovin/infinityce/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,29 @@
|
||||
/* Copyright 2020 mechlovin
|
||||
*
|
||||
* 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_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RGB_MOD, KC_PSCR, KC_SLCK, KC_PAUS,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_SLSH, KC_DEL, KC_END, 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_NUHS, KC_ENT,
|
||||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_BSLS, MO(1), KC_LSFT, KC_UP,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
};
|
1
keyboards/mechlovin/infinityce/keymaps/default/readme.md
Normal file
1
keyboards/mechlovin/infinityce/keymaps/default/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
# The default keymap for infinityce
|
53
keyboards/mechlovin/infinityce/keymaps/via/keymap.c
Normal file
53
keyboards/mechlovin/infinityce/keymaps/via/keymap.c
Normal file
@@ -0,0 +1,53 @@
|
||||
/* Copyright 2020 mechlovin
|
||||
*
|
||||
* 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_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RGB_MOD, KC_PSCR, KC_SLCK, KC_PAUS,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_SLSH, KC_DEL, KC_END, 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_NUHS, KC_ENT,
|
||||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_BSLS, MO(1), KC_LSFT, KC_UP,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
[1] = 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
[2] = 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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
keyboards/mechlovin/infinityce/keymaps/via/readme.md
Normal file
3
keyboards/mechlovin/infinityce/keymaps/via/readme.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# The VIA keymap for infinityce
|
||||
|
||||

|
1
keyboards/mechlovin/infinityce/keymaps/via/rules.mk
Normal file
1
keyboards/mechlovin/infinityce/keymaps/via/rules.mk
Normal file
@@ -0,0 +1 @@
|
||||
VIA_ENABLE = yes
|
19
keyboards/mechlovin/infinityce/readme.md
Normal file
19
keyboards/mechlovin/infinityce/readme.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# infinityce
|
||||
|
||||

|
||||
|
||||
Replacement PCB for TGR Jane CE V2 keyboard
|
||||
|
||||
* Keyboard Maintainer: [mechlovin](https://github.com/mechlovin)
|
||||
* Hardware Supported: Infinity CE PCB
|
||||
* Hardware Availability: [GeekhackGB](https://geekhack.org/index.php?topic=104345.0)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make mechlovin/infinityce:default
|
||||
|
||||
Build firmware for VIA:
|
||||
|
||||
make mechlovin/infinityce:via
|
||||
|
||||
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).
|
32
keyboards/mechlovin/infinityce/rules.mk
Normal file
32
keyboards/mechlovin/infinityce/rules.mk
Normal file
@@ -0,0 +1,32 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
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 = yes # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||
MIDI_ENABLE = no # MIDI support
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
78
keyboards/sirius/uni660/config.h
Normal file
78
keyboards/sirius/uni660/config.h
Normal file
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
|
||||
#define VENDOR_ID 0x5352 // "SR"
|
||||
#define PRODUCT_ID 0x0201 // Second Product First Version
|
||||
#define DEVICE_VER 0x1912 // 2019.12
|
||||
#define MANUFACTURER SiRius
|
||||
#define PRODUCT SiRius Uni660
|
||||
#define DESCRIPTION SiRius Uni660
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 16
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
//#define BACKLIGHT_LEVELS 3
|
||||
|
||||
#define ONESHOT_TIMEOUT 500
|
||||
|
||||
/*
|
||||
* 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
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
//UART settings for communication with the RF microcontroller
|
||||
#define SERIAL_UART_BAUD 1000000
|
||||
#define SERIAL_UART_DATA UDR1
|
||||
#define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1)
|
||||
#define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1))
|
||||
#define SERIAL_UART_RXD_PRESENT (UCSR1A & _BV(RXC1))
|
||||
#define SERIAL_UART_INIT() do { \
|
||||
/* baud rate */ \
|
||||
UBRR1L = SERIAL_UART_UBRR; \
|
||||
/* baud rate */ \
|
||||
UBRR1H = SERIAL_UART_UBRR >> 8; \
|
||||
/* enable TX and RX */ \
|
||||
UCSR1B = _BV(TXEN1) | _BV(RXEN1); \
|
||||
/* 8-bit data */ \
|
||||
UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \
|
||||
} while(0)
|
||||
|
||||
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
|
12
keyboards/sirius/uni660/info.json
Normal file
12
keyboards/sirius/uni660/info.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"keyboard_name": "Uni660",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 12,
|
||||
"height": 5.75,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [{"x":0, "y":0.75}, {"x":1, "y":0.25}, {"x":2, "y":0}, {"x":3, "y":0.25}, {"x":4, "y":0.125}, {"x":7, "y":0.125}, {"x":8, "y":0.25}, {"x":9, "y":0}, {"x":10, "y":0.25}, {"x":11, "y":0.75}, {"x":0, "y":1.75}, {"x":1, "y":1.25}, {"x":2, "y":1}, {"x":3, "y":1.25}, {"x":4, "y":1.125}, {"x":7, "y":1.125}, {"x":8, "y":1.25}, {"x":9, "y":1}, {"x":10, "y":1.25}, {"x":11, "y":1.75}, {"x":0, "y":2.75}, {"x":1, "y":2.25}, {"x":2, "y":2}, {"x":3, "y":2.25}, {"x":4, "y":2.125}, {"x":7, "y":2.125}, {"x":8, "y":2.25}, {"x":9, "y":2}, {"x":10, "y":2.25}, {"x":11, "y":2.75}, {"x":1.5, "y":3.75}, {"x":2.5, "y":3.75}, {"x":3.5, "y":3.75}, {"x":4.5, "y":3.75}, {"x":6.5, "y":3.75}, {"x":7.5, "y":3.75}, {"x":8.5, "y":3.75}, {"x":9.5, "y":3.75}, {"x":1.5, "y":4.75}, {"x":2.5, "y":4.75}, {"x":3.5, "y":4.75}, {"x":4.5, "y":4.75}, {"x":6.5, "y":4.75}, {"x":7.5, "y":4.75}, {"x":8.5, "y":4.75}, {"x":9.5, "y":4.75}]
|
||||
}
|
||||
}
|
||||
}
|
11
keyboards/sirius/uni660/keymaps/default/keymap.c
Normal file
11
keyboards/sirius/uni660/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,11 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT( /* Base */
|
||||
KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_INS,
|
||||
KC_F1, 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_F2, 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_F3, 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_F4, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_DEL, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
|
||||
),
|
||||
};
|
35
keyboards/sirius/uni660/keymaps/via/keymap.c
Normal file
35
keyboards/sirius/uni660/keymaps/via/keymap.c
Normal file
@@ -0,0 +1,35 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT( /* Base */
|
||||
KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_INS,
|
||||
KC_F1, 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_F2, 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_F3, 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_F4, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_DEL, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
|
||||
),
|
||||
|
||||
[1] = LAYOUT( /* Layer 1 */
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RGUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
[2] = LAYOUT( /* Layer 2 */
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RGUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
[3] = LAYOUT( /* Layer 3 */
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RGUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
};
|
1
keyboards/sirius/uni660/keymaps/via/rules.mk
Normal file
1
keyboards/sirius/uni660/keymaps/via/rules.mk
Normal file
@@ -0,0 +1 @@
|
||||
VIA_ENABLE = yes
|
160
keyboards/sirius/uni660/matrix.c
Normal file
160
keyboards/sirius/uni660/matrix.c
Normal file
@@ -0,0 +1,160 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako
|
||||
Copyright 2014 Jack Humbert
|
||||
|
||||
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 <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#if defined(__AVR__)
|
||||
#include <avr/io.h>
|
||||
#endif
|
||||
#include "wait.h"
|
||||
#include "print.h"
|
||||
#include "debug.h"
|
||||
#include "util.h"
|
||||
#include "matrix.h"
|
||||
#include "timer.h"
|
||||
#include "debounce.h"
|
||||
|
||||
#if (MATRIX_COLS <= 8)
|
||||
# define print_matrix_header() print("\nr/c 01234567\n")
|
||||
# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row))
|
||||
# define matrix_bitpop(i) bitpop(matrix[i])
|
||||
# define ROW_SHIFTER ((uint8_t)1)
|
||||
#elif (MATRIX_COLS <= 16)
|
||||
# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n")
|
||||
# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row))
|
||||
# define matrix_bitpop(i) bitpop16(matrix[i])
|
||||
# define ROW_SHIFTER ((uint16_t)1)
|
||||
#elif (MATRIX_COLS <= 32)
|
||||
# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n")
|
||||
# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row))
|
||||
# define matrix_bitpop(i) bitpop32(matrix[i])
|
||||
# define ROW_SHIFTER ((uint32_t)1)
|
||||
#endif
|
||||
|
||||
/* matrix state(1:on, 0:off) */
|
||||
static matrix_row_t matrix[MATRIX_ROWS];
|
||||
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_kb(void) {
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
inline
|
||||
uint8_t matrix_rows(void) {
|
||||
return MATRIX_ROWS;
|
||||
}
|
||||
|
||||
inline
|
||||
uint8_t matrix_cols(void) {
|
||||
return MATRIX_COLS;
|
||||
}
|
||||
|
||||
void matrix_init(void) {
|
||||
debounce_init(MATRIX_ROWS);
|
||||
matrix_init_quantum();
|
||||
}
|
||||
|
||||
uint8_t matrix_scan(void)
|
||||
{
|
||||
bool matrix_has_changed = false;
|
||||
|
||||
SERIAL_UART_INIT();
|
||||
|
||||
uint32_t timeout = 0;
|
||||
|
||||
//the s character requests the RF slave to send the matrix
|
||||
SERIAL_UART_DATA = 's';
|
||||
|
||||
//trust the external keystates entirely, erase the last data
|
||||
uint8_t uart_data[17] = {0};
|
||||
|
||||
//there are 16 bytes corresponding to 16 columns, and an end byte
|
||||
for (uint8_t i = 0; i < 17; i++) {
|
||||
//wait for the serial data, timeout if it's been too long
|
||||
//this only happened in testing with a loose wire, but does no
|
||||
//harm to leave it in here
|
||||
while(!SERIAL_UART_RXD_PRESENT){
|
||||
timeout++;
|
||||
if (timeout > 10000){
|
||||
break;
|
||||
}
|
||||
}
|
||||
uart_data[i] = SERIAL_UART_DATA;
|
||||
}
|
||||
|
||||
//check for the end packet, the key state bytes use the LSBs, so 0xE0
|
||||
//will only show up here if the correct bytes were recieved
|
||||
if (uart_data[10] == 0xE0)
|
||||
{
|
||||
//shifting and transferring the keystates to the QMK matrix variable
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
matrix[i] = (uint16_t) uart_data[i*2] | (uint16_t) uart_data[i*2+1] << 8;
|
||||
}
|
||||
}
|
||||
|
||||
debounce(matrix, matrix, MATRIX_ROWS, matrix_has_changed);
|
||||
|
||||
matrix_scan_quantum();
|
||||
|
||||
return matrix_has_changed;
|
||||
}
|
||||
|
||||
inline
|
||||
bool matrix_is_on(uint8_t row, uint8_t col)
|
||||
{
|
||||
return (matrix[row] & ((matrix_row_t)1<<col));
|
||||
}
|
||||
|
||||
inline
|
||||
matrix_row_t matrix_get_row(uint8_t row)
|
||||
{
|
||||
return matrix[row];
|
||||
}
|
||||
|
||||
void matrix_print(void)
|
||||
{
|
||||
print_matrix_header();
|
||||
|
||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||
phex(row); print(": ");
|
||||
print_matrix_row(row);
|
||||
print("\n");
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t matrix_key_count(void)
|
||||
{
|
||||
uint8_t count = 0;
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
count += matrix_bitpop(i);
|
||||
}
|
||||
return count;
|
||||
}
|
13
keyboards/sirius/uni660/readme.md
Normal file
13
keyboards/sirius/uni660/readme.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Uni660
|
||||
|
||||
The Uni660 is an ergonomic wireless keyboard designed by Sirius.
|
||||
|
||||
Join the KeyCommerce [Discord](https://discord.gg/GJ8bdM)
|
||||
|
||||
Make example:
|
||||
|
||||
make sirius/uni660: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).
|
||||
|
||||
To get the U2U into DFU flashing mode, insert the U2U into the computer and connect the 
|
32
keyboards/sirius/uni660/rules.mk
Normal file
32
keyboards/sirius/uni660/rules.mk
Normal file
@@ -0,0 +1,32 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = caterina
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||
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
|
||||
CUSTOM_MATRIX = yes # Remote matrix from the wireless bridge
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
|
||||
# BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
# MIDI_ENABLE = yes # MIDI controls
|
||||
UNICODE_ENABLE = yes # Unicode
|
||||
# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
|
||||
# project specific files
|
||||
SRC += matrix.c
|
35
keyboards/sirius/uni660/uni660.c
Normal file
35
keyboards/sirius/uni660/uni660.c
Normal file
@@ -0,0 +1,35 @@
|
||||
#include "uni660.h"
|
||||
|
||||
void uart_init(void) {
|
||||
SERIAL_UART_INIT();
|
||||
}
|
||||
|
||||
void led_init(void) {
|
||||
setPinOutput(D1); // Pin to green, set as output
|
||||
writePinHigh(D1); // Turn it off
|
||||
setPinOutput(F4); // Pins to red and blue, set as output
|
||||
setPinOutput(F5);
|
||||
writePinHigh(F4); // Turn them off
|
||||
writePinHigh(F5);
|
||||
}
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
matrix_init_user();
|
||||
uart_init();
|
||||
led_init();
|
||||
}
|
||||
|
||||
/*
|
||||
#ifdef SWAP_HANDS_ENABLE
|
||||
__attribute__ ((weak))
|
||||
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||
{{9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
|
||||
{{9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
|
||||
{{9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
|
||||
{{9, 3}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}},
|
||||
{{9, 4}, {8, 4}, {7, 4}, {6, 4}, {5, 4}, {4, 4}, {3, 4}, {2, 4}, {1, 4}, {0, 4}},
|
||||
};
|
||||
#endif
|
||||
*/
|
61
keyboards/sirius/uni660/uni660.h
Normal file
61
keyboards/sirius/uni660/uni660.h
Normal file
@@ -0,0 +1,61 @@
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define red_led_off writePinHigh(F5)
|
||||
#define red_led_on writePinLow(F5)
|
||||
#define blu_led_off writePinHigh(F4)
|
||||
#define blu_led_on writePinLow(F4)
|
||||
#define grn_led_off writePinHigh(D1)
|
||||
#define grn_led_on writePinLow(D1)
|
||||
|
||||
#define set_led_off red_led_off; grn_led_off; blu_led_off
|
||||
#define set_led_red red_led_on; grn_led_off; blu_led_off
|
||||
#define set_led_blue red_led_off; grn_led_off; blu_led_on
|
||||
#define set_led_green red_led_off; grn_led_on; blu_led_off
|
||||
#define set_led_yellow red_led_on; grn_led_on; blu_led_off
|
||||
#define set_led_magenta red_led_on; grn_led_off; blu_led_on
|
||||
#define set_led_cyan red_led_off; grn_led_on; blu_led_on
|
||||
#define set_led_white red_led_on; grn_led_on; blu_led_on
|
||||
|
||||
/*
|
||||
#define LED_B 5
|
||||
#define LED_R 6
|
||||
#define LED_G 7
|
||||
|
||||
#define all_leds_off PORTF &= ~(1<<LED_B) & ~(1<<LED_R) & ~(1<<LED_G)
|
||||
|
||||
#define red_led_on PORTF |= (1<<LED_R)
|
||||
#define red_led_off PORTF &= ~(1<<LED_R)
|
||||
#define grn_led_on PORTF |= (1<<LED_G)
|
||||
#define grn_led_off PORTF &= ~(1<<LED_G)
|
||||
#define blu_led_on PORTF |= (1<<LED_B)
|
||||
#define blu_led_off PORTF &= ~(1<<LED_B)
|
||||
|
||||
#define set_led_off PORTF &= ~(1<<LED_B) & ~(1<<LED_R) & ~(1<<LED_G)
|
||||
#define set_led_red PORTF = PORTF & ~(1<<LED_B) & ~(1<<LED_G) | (1<<LED_R)
|
||||
#define set_led_blue PORTF = PORTF & ~(1<<LED_G) & ~(1<<LED_R) | (1<<LED_B)
|
||||
#define set_led_green PORTF = PORTF & ~(1<<LED_B) & ~(1<<LED_R) | (1<<LED_G)
|
||||
#define set_led_yellow PORTF = PORTF & ~(1<<LED_B) | (1<<LED_R) | (1<<LED_G)
|
||||
#define set_led_magenta PORTF = PORTF & ~(1<<LED_G) | (1<<LED_R) | (1<<LED_B)
|
||||
#define set_led_cyan PORTF = PORTF & ~(1<<LED_R) | (1<<LED_B) | (1<<LED_G)
|
||||
#define set_led_white PORTF |= (1<<LED_B) | (1<<LED_R) | (1<<LED_G)
|
||||
*/
|
||||
|
||||
// This a shortcut to help you visually see your layout.
|
||||
// The first section contains all of the arguments
|
||||
// The second converts the arguments into a two-dimensional array
|
||||
#define LAYOUT( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k46, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k3f,\
|
||||
k10, k11, k12, k13, k14, k15, k16, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k2f,\
|
||||
k20, k21, k22, k23, k24, k25, k26, k28, k29, k2a, k2b, k2c, k2d, k2e,\
|
||||
k30, k31, k32, k33, k34, k35, k36, k38, k39, k3a, k3b, k3c, k3d, k3e, \
|
||||
k40, k41, k42, k43, k44, k45, k48, k49, k4a, k4c, k4d, k4e, k4f \
|
||||
) \
|
||||
{ \
|
||||
{ k00, k01, k02, k03, k04, k05, k06, KC_NO, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f }, \
|
||||
{ k10, k11, k12, k13, k14, k15, k16, KC_NO, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f }, \
|
||||
{ k20, k21, k22, k23, k24, k25, k26, KC_NO, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f }, \
|
||||
{ k30, k31, k32, k33, k34, k35, k36, KC_NO, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f }, \
|
||||
{ k40, k41, k42, k43, k44, k45, k46, KC_NO, k48, k49, k4a, KC_NO, k4c, k4d, k4e, k4f } \
|
||||
}
|
46
keyboards/wsk/jerkin/config.h
Normal file
46
keyboards/wsk/jerkin/config.h
Normal file
@@ -0,0 +1,46 @@
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x79AE
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Worldspawn00
|
||||
#define PRODUCT Jerkin
|
||||
#define DESCRIPTION Alice style 30% board
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 3
|
||||
#define MATRIX_COLS 13
|
||||
|
||||
/* key matrix pins */
|
||||
#define MATRIX_ROW_PINS { B3, B4, B5 }
|
||||
#define MATRIX_COL_PINS { D3, D2, D1, D0, D4, C6, B1, F7, F6, F5, F4, E6, D7 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* number of backlight levels */
|
||||
|
||||
#ifdef BACKLIGHT_PIN
|
||||
#define BACKLIGHT_LEVELS 0
|
||||
#endif
|
||||
|
||||
/* 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
|
12
keyboards/wsk/jerkin/info.json
Normal file
12
keyboards/wsk/jerkin/info.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"keyboard_name": "Jerkin",
|
||||
"url": "https://qmk.fm/keyboards",
|
||||
"maintainer": "worldspawn00",
|
||||
"width": 15.5,
|
||||
"height": 6.25,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [{"x":1, "y":0.75}, {"x":2, "y":0.75}, {"x":12, "y":0.75}, {"x":13, "y":0.75}, {"x":14, "y":0.75}, {"x":0.83, "y":1.75, "w":1.25}, {"x":2.08, "y":1.75}, {"x":12.5, "y":1.75}, {"x":13.5, "y":1.75, "w":1.75}, {"x":0.58, "y":2.75, "w":1.75}, {"x":2.33, "y":2.75}, {"x":12.25, "y":2.75}, {"x":13.25, "y":2.75}, {"x":14.25, "y":2.75, "w":1.25}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":3.75, "y":1}, {"x":4.75, "y":1}, {"x":5.75, "y":1}, {"x":6.75, "y":1}, {"x":4.25, "y":2}, {"x":5.25, "y":2}, {"x":6.25, "y":2}, {"x":7.25, "y":2}, {"x":-7.0, "y":3.25}, {"x":-6, "y":3.25}, {"x":-5.0, "y":3.25}, {"x":-4, "y":3.25}, {"x":-6.75, "y":4.25}, {"x":-5.75, "y":4.25}, {"x":-4.75, "y":4.25}, {"x":-3.75, "y":4.25}, {"x":-7.25, "y":5.25}, {"x":-6.25, "y":5.25}, {"x":-5.25, "y":5.25}, {"x":-4.25, "y":5.25}]
|
||||
}
|
||||
}
|
||||
}
|
1
keyboards/wsk/jerkin/jerkin.c
Normal file
1
keyboards/wsk/jerkin/jerkin.c
Normal file
@@ -0,0 +1 @@
|
||||
#include "jerkin.h"
|
13
keyboards/wsk/jerkin/jerkin.h
Normal file
13
keyboards/wsk/jerkin/jerkin.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define LAYOUT( \
|
||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, \
|
||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \
|
||||
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212 \
|
||||
) { \
|
||||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012 }, \
|
||||
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, KC_NO }, \
|
||||
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212 } \
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user