Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe89aef774 | ||
|
|
e88a75904b | ||
|
|
863d54d2fc | ||
|
|
2a2f41c6de | ||
|
|
bf1e51ec22 | ||
|
|
d2311afb66 | ||
|
|
5e093ad224 | ||
|
|
0f67232035 | ||
|
|
61accb8794 | ||
|
|
eb48e5ebdb | ||
|
|
9bea41c9b2 | ||
|
|
ad12acd3c0 | ||
|
|
c8ad13d0f9 | ||
|
|
2b1b5fed2a | ||
|
|
ff95c60e46 | ||
|
|
9d915ed051 | ||
|
|
cd9e15036e | ||
|
|
fef206f661 | ||
|
|
7b768be784 | ||
|
|
3d446c6050 | ||
|
|
fc87d9b0d5 | ||
|
|
98b68bec53 | ||
|
|
4a597e031f | ||
|
|
81fae5c306 | ||
|
|
234c117613 | ||
|
|
6d4f6f3f49 | ||
|
|
ba11a1c807 | ||
|
|
33e9f1c75a | ||
|
|
be8257f0a7 | ||
|
|
da2eedc0c2 | ||
|
|
3aa4d55bee | ||
|
|
edef1f9396 | ||
|
|
2e8e465423 | ||
|
|
73d8593352 | ||
|
|
dbfbe0d7f0 | ||
|
|
8c2a23dee1 | ||
|
|
69d6298f6b | ||
|
|
4c62c7bd6e | ||
|
|
a8a9a2066e | ||
|
|
a903893883 | ||
|
|
3e8ee96b2c | ||
|
|
c7c4937eef | ||
|
|
cdfcbfc92d | ||
|
|
7bfe0879bf | ||
|
|
043ef40b92 | ||
|
|
3305df8e79 | ||
|
|
a2a2ba0eec | ||
|
|
9b0a548687 | ||
|
|
be497126e8 | ||
|
|
3380694740 | ||
|
|
f9f04ff2a4 | ||
|
|
98b87e6357 | ||
|
|
b5d85ddc90 | ||
|
|
6aba3ce9d2 | ||
|
|
79e0964d21 | ||
|
|
be1d5c6609 | ||
|
|
51182a4f03 | ||
|
|
f9c070e1a4 | ||
|
|
9baee84b36 | ||
|
|
6a088f7ff6 | ||
|
|
14908f86fb | ||
|
|
b05a4b1a4b | ||
|
|
1b3b9414b7 | ||
|
|
45dddfa6c2 | ||
|
|
fbe2eba472 | ||
|
|
de2e03650b | ||
|
|
8e0dfdfb53 | ||
|
|
f09a237a07 | ||
|
|
784e2af062 | ||
|
|
be65a0cc79 | ||
|
|
bd43df53bd | ||
|
|
5a41c06cd7 | ||
|
|
7b11d740ea | ||
|
|
ddb0f39ebf | ||
|
|
2f07627a5d | ||
|
|
d163b22dfb | ||
|
|
ea23035c53 | ||
|
|
ef189da243 | ||
|
|
db1ace5426 | ||
|
|
012c5ef9bd | ||
|
|
f2543c3b9b | ||
|
|
6695c874fb | ||
|
|
6f386ca6ae | ||
|
|
6e48ea082d | ||
|
|
681db534f3 | ||
|
|
d8ccabeeef | ||
|
|
d5f01ad2f9 | ||
|
|
f4a2e58182 | ||
|
|
7abf507cb6 | ||
|
|
5c491da0e7 | ||
|
|
41d8be7e75 | ||
|
|
a1de199aa9 | ||
|
|
f6a0ee85fd | ||
|
|
beb292e7f0 | ||
|
|
8dd1dab7cb | ||
|
|
7470317d95 | ||
|
|
9b82a9295f | ||
|
|
220551ed5f | ||
|
|
32b63d676f | ||
|
|
a872faa53e | ||
|
|
3ac3bb9b5e | ||
|
|
95d2a11c44 | ||
|
|
a120a000d4 | ||
|
|
a0c36ed253 | ||
|
|
dcf4877fac | ||
|
|
659e5d6316 | ||
|
|
168b0cf64d | ||
|
|
bcaf66bd32 | ||
|
|
11bdf28001 | ||
|
|
0d936b2fe6 | ||
|
|
7ba2bc765b | ||
|
|
80ddb34415 | ||
|
|
7a89b39aad | ||
|
|
5838c458d7 | ||
|
|
f019cd12a5 | ||
|
|
36fce12d08 | ||
|
|
303859ea28 | ||
|
|
65db404260 | ||
|
|
d7e3d718d0 | ||
|
|
da5e904306 | ||
|
|
7276cc24d0 | ||
|
|
2c1963d583 | ||
|
|
c4451f4505 | ||
|
|
79acf1e660 | ||
|
|
d5dcf54e23 | ||
|
|
c8de0f78bf | ||
|
|
6f30a6b407 | ||
|
|
a69e4406d4 | ||
|
|
0f62383be5 | ||
|
|
539a6fc825 | ||
|
|
58d035dccc | ||
|
|
791cdd6e31 | ||
|
|
db26d0fbd8 | ||
|
|
24a8bc3fd0 | ||
|
|
50139d9c59 |
No files matched your search
@@ -536,9 +536,9 @@ endef
|
|||||||
cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi;
|
cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi;
|
||||||
# Check if the submodules are dirty, and display a warning if they are
|
# Check if the submodules are dirty, and display a warning if they are
|
||||||
ifndef SKIP_GIT
|
ifndef SKIP_GIT
|
||||||
if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --init lib/chibios; fi
|
if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 1 --init lib/chibios; fi
|
||||||
if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --init lib/chibios-contrib; fi
|
if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --depth 1 --init lib/chibios-contrib; fi
|
||||||
if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --init lib/ugfx; fi
|
if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --depth 1 --init lib/ugfx; fi
|
||||||
git submodule status --recursive 2>/dev/null | \
|
git submodule status --recursive 2>/dev/null | \
|
||||||
while IFS= read -r x; do \
|
while IFS= read -r x; do \
|
||||||
case "$$x" in \
|
case "$$x" in \
|
||||||
|
|||||||
+3
-11
@@ -298,19 +298,11 @@ ifneq ($(strip $(CUSTOM_MATRIX)), yes)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce
|
DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce
|
||||||
# Debounce Modules. If implemented in matrix.c, don't use these.
|
# Debounce Modules. Set DEBOUNCE_TYPE=custom if including one manually.
|
||||||
DEBOUNCE_TYPE?= sym_g
|
DEBOUNCE_TYPE?= sym_g
|
||||||
VALID_DEBOUNCE_TYPES := sym_g eager_pk custom
|
ifneq ($(strip $(DEBOUNCE_TYPE)), custom)
|
||||||
ifeq ($(filter $(DEBOUNCE_TYPE),$(VALID_DEBOUNCE_TYPES)),)
|
QUANTUM_SRC += $(DEBOUNCE_DIR)/$(strip $(DEBOUNCE_TYPE)).c
|
||||||
$(error DEBOUNCE_TYPE="$(DEBOUNCE_TYPE)" is not a valid debounce algorithm)
|
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(DEBOUNCE_TYPE)), sym_g)
|
|
||||||
QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_sym_g.c
|
|
||||||
else ifeq ($(strip $(DEBOUNCE_TYPE)), eager_pk)
|
|
||||||
QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_eager_pk.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
|
ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
|
||||||
OPT_DEFS += -DSPLIT_KEYBOARD
|
OPT_DEFS += -DSPLIT_KEYBOARD
|
||||||
|
|||||||
@@ -60,6 +60,7 @@
|
|||||||
* [Key Lock](feature_key_lock.md)
|
* [Key Lock](feature_key_lock.md)
|
||||||
* [Layouts](feature_layouts.md)
|
* [Layouts](feature_layouts.md)
|
||||||
* [Leader Key](feature_leader_key.md)
|
* [Leader Key](feature_leader_key.md)
|
||||||
|
* [LED Matrix](feature_led_matrix.md)
|
||||||
* [Macros](feature_macros.md)
|
* [Macros](feature_macros.md)
|
||||||
* [Mouse Keys](feature_mouse_keys.md)
|
* [Mouse Keys](feature_mouse_keys.md)
|
||||||
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys)
|
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys)
|
||||||
|
|||||||
@@ -307,8 +307,8 @@ Use these to enable or disable building certain features. The more you have enab
|
|||||||
* Enables split keyboard support (dual MCU like the let's split and bakingpy's boards) and includes all necessary files located at quantum/split_common
|
* Enables split keyboard support (dual MCU like the let's split and bakingpy's boards) and includes all necessary files located at quantum/split_common
|
||||||
* `CUSTOM_MATRIX`
|
* `CUSTOM_MATRIX`
|
||||||
* Allows replacing the standard matrix scanning routine with a custom one.
|
* Allows replacing the standard matrix scanning routine with a custom one.
|
||||||
* `CUSTOM_DEBOUNCE`
|
* `DEBOUNCE_TYPE`
|
||||||
* Allows replacing the standard key debouncing routine with a custom one.
|
* Allows replacing the standard key debouncing routine with an alternative or custom one.
|
||||||
* `WAIT_FOR_USB`
|
* `WAIT_FOR_USB`
|
||||||
* Forces the keyboard to wait for a USB connection to be established before it starts up
|
* Forces the keyboard to wait for a USB connection to be established before it starts up
|
||||||
* `NO_USB_STARTUP_CHECK`
|
* `NO_USB_STARTUP_CHECK`
|
||||||
|
|||||||
+16
-2
@@ -129,6 +129,20 @@ Documentation is one of the easiest ways to get started contributing to QMK. Fin
|
|||||||
|
|
||||||
You'll find all our documentation in the `qmk_firmware/docs` directory, or if you'd rather use a web based workflow you can click "Suggest An Edit" at the top of each page on http://docs.qmk.fm/.
|
You'll find all our documentation in the `qmk_firmware/docs` directory, or if you'd rather use a web based workflow you can click "Suggest An Edit" at the top of each page on http://docs.qmk.fm/.
|
||||||
|
|
||||||
|
When providing code examples in your documentation, try to observe naming conventions used elsewhere in the docs. For example, standardizing enums as `my_layers` or `my_keycodes` for consistency:
|
||||||
|
|
||||||
|
```c
|
||||||
|
enum my_layers {
|
||||||
|
_FIRST_LAYER,
|
||||||
|
_SECOND_LAYER
|
||||||
|
};
|
||||||
|
|
||||||
|
enum my_keycodes {
|
||||||
|
FIRST_LAYER = SAFE_RANGE,
|
||||||
|
SECOND_LAYER
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
## Keymaps
|
## Keymaps
|
||||||
|
|
||||||
Most first-time QMK contributors start with their personal keymaps. We try to keep keymap standards pretty casual (keymaps, after all, reflect the personality of their creators) but we do ask that you follow these guidelines to make it easier for others to discover and learn from your keymap.
|
Most first-time QMK contributors start with their personal keymaps. We try to keep keymap standards pretty casual (keymaps, after all, reflect the personality of their creators) but we do ask that you follow these guidelines to make it easier for others to discover and learn from your keymap.
|
||||||
@@ -137,7 +151,7 @@ Most first-time QMK contributors start with their personal keymaps. We try to ke
|
|||||||
* All Keymap PR's are squashed, so if you care about how your commits are squashed you should do it yourself
|
* All Keymap PR's are squashed, so if you care about how your commits are squashed you should do it yourself
|
||||||
* Do not lump features in with keymap PR's. Submit the feature first and then a second PR for the keymap.
|
* Do not lump features in with keymap PR's. Submit the feature first and then a second PR for the keymap.
|
||||||
* Do not include `Makefile`s in your keymap folder (they're no longer used)
|
* Do not include `Makefile`s in your keymap folder (they're no longer used)
|
||||||
* Update copyrights in file headers (look for `REPLACE_WITH_YOUR_NAME `)
|
* Update copyrights in file headers (look for `%YOUR_NAME%`)
|
||||||
|
|
||||||
## Keyboards
|
## Keyboards
|
||||||
|
|
||||||
@@ -150,7 +164,7 @@ We also ask that you follow these guidelines:
|
|||||||
* Do not lump core features in with new keyboards. Submit the feature first and then submit a separate PR for the keyboard.
|
* Do not lump core features in with new keyboards. Submit the feature first and then submit a separate PR for the keyboard.
|
||||||
* Name `.c`/`.h` file after the immediate parent folder, eg `/keyboards/<kb1>/<kb2>/<kb2>.[ch]`
|
* Name `.c`/`.h` file after the immediate parent folder, eg `/keyboards/<kb1>/<kb2>/<kb2>.[ch]`
|
||||||
* Do not include `Makefile`s in your keyboard folder (they're no longer used)
|
* Do not include `Makefile`s in your keyboard folder (they're no longer used)
|
||||||
* Update copyrights in file headers (look for `REPLACE_WITH_YOUR_NAME `)
|
* Update copyrights in file headers (look for `%YOUR_NAME%`)
|
||||||
|
|
||||||
## Quantum/TMK Core
|
## Quantum/TMK Core
|
||||||
|
|
||||||
|
|||||||
@@ -321,7 +321,7 @@ uint32_t layer_state_set_user(uint32_t state) {
|
|||||||
```
|
```
|
||||||
### `layer_state_set_*` Function Documentation
|
### `layer_state_set_*` Function Documentation
|
||||||
|
|
||||||
* Keyboard/Revision: `void uint32_t layer_state_set_kb(uint32_t state)`
|
* Keyboard/Revision: `uint32_t layer_state_set_kb(uint32_t state)`
|
||||||
* Keymap: `uint32_t layer_state_set_user(uint32_t state)`
|
* Keymap: `uint32_t layer_state_set_user(uint32_t state)`
|
||||||
|
|
||||||
The `state` is the bitmask of the active layers, as explained in the [Keymap Overview](keymap.md#keymap-layer-status)
|
The `state` is the bitmask of the active layers, as explained in the [Keymap Overview](keymap.md#keymap-layer-status)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ This will allow you to use `FN_CAPS` and `ALT_TAB` in your keymap, keeping it mo
|
|||||||
|
|
||||||
## Caveats
|
## Caveats
|
||||||
|
|
||||||
Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Modifiers specified as part of a Layer Tap or Mod Tap's keycode will be ignored.
|
Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Modifiers specified as part of a Layer Tap or Mod Tap's keycode will be ignored. If you need to apply modifiers to your tapped keycode, [Tap Dance](https://github.com/qmk/qmk_firmware/blob/master/docs/feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this.
|
||||||
|
|
||||||
Additionally, if at least one right-handed modifier is specified in a Mod Tap or Layer Tap, it will cause all modifiers specified to become right-handed, so it is not possible to mix and match the two.
|
Additionally, if at least one right-handed modifier is specified in a Mod Tap or Layer Tap, it will cause all modifiers specified to become right-handed, so it is not possible to mix and match the two.
|
||||||
|
|
||||||
|
|||||||
@@ -2,45 +2,38 @@
|
|||||||
|
|
||||||
QMK supports multiple debounce algorithms through its debounce API.
|
QMK supports multiple debounce algorithms through its debounce API.
|
||||||
|
|
||||||
The underlying debounce algorithm is determined by which matrix.c file you are using.
|
|
||||||
|
|
||||||
The logic for which debounce method called is below. It checks various defines that you have set in rules.mk
|
The logic for which debounce method called is below. It checks various defines that you have set in rules.mk
|
||||||
|
|
||||||
```
|
```
|
||||||
|
DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce
|
||||||
DEBOUNCE_TYPE?= sym_g
|
DEBOUNCE_TYPE?= sym_g
|
||||||
VALID_DEBOUNCE_TYPES := sym_g eager_pk custom
|
ifneq ($(strip $(DEBOUNCE_TYPE)), custom)
|
||||||
ifeq ($(filter $(DEBOUNCE_TYPE),$(VALID_DEBOUNCE_TYPES)),)
|
QUANTUM_SRC += $(DEBOUNCE_DIR)/$(strip $(DEBOUNCE_TYPE)).c
|
||||||
$(error DEBOUNCE_TYPE="$(DEBOUNCE_TYPE)" is not a valid debounce algorithm)
|
|
||||||
endif
|
|
||||||
ifeq ($(strip $(DEBOUNCE_TYPE)), sym_g)
|
|
||||||
QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_sym_g.c
|
|
||||||
else ifeq ($(strip $(DEBOUNCE_TYPE)), eager_pk)
|
|
||||||
QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_eager_pk.c
|
|
||||||
endif
|
endif
|
||||||
```
|
```
|
||||||
|
|
||||||
# Debounce selection
|
# Debounce selection
|
||||||
|
|
||||||
| DEBOUNCE_ALGO | Description | What to do |
|
| DEBOUNCE_TYPE | Description | What else is needed |
|
||||||
| ------------- | --------------------------------------------------- | ----------------------------- |
|
| ------------- | --------------------------------------------------- | ----------------------------- |
|
||||||
| Not defined | You are using the included matrix.c and debounce.c | Nothing. Debounce_sym_g will be compiled, and used if necessary |
|
| Not defined | Use the default algorithm, currently sym_g | Nothing |
|
||||||
| custom | Use your own debounce.c | ```SRC += debounce.c``` add your own debounce.c and implement necessary functions |
|
| custom | Use your own debounce.c | ```SRC += debounce.c``` add your own debounce.c and implement necessary functions |
|
||||||
| sym_g / eager_pk | You are using the included matrix.c and debounce.c | Use an alternative debounce algorithm |
|
| anything_else | Use another algorithm from quantum/debounce/* | Nothing |
|
||||||
|
|
||||||
**Regarding split keyboards**:
|
**Regarding split keyboards**:
|
||||||
The debounce code is compatible with split keyboards.
|
The debounce code is compatible with split keyboards.
|
||||||
|
|
||||||
# Use your own debouncing code
|
# Use your own debouncing code
|
||||||
* Set ```DEBOUNCE_TYPE = custom ```.
|
* Set ```DEBOUNCE_TYPE = custom ```.
|
||||||
* Add ```SRC += debounce.c```
|
* Add ```SRC += debounce.c```
|
||||||
* Add your own ```debounce.c```. Look at included ```debounce_sym_g.c```s for sample implementations.
|
* Add your own ```debounce.c```. Look at current implementations in ```quantum/debounce``` for examples.
|
||||||
* Debouncing occurs after every raw matrix scan.
|
* Debouncing occurs after every raw matrix scan.
|
||||||
* Use num_rows rather than MATRIX_ROWS, so that split keyboards are supported correctly.
|
* Use num_rows rather than MATRIX_ROWS, so that split keyboards are supported correctly.
|
||||||
|
|
||||||
# Changing between included debouncing methods
|
# Changing between included debouncing methods
|
||||||
You can either use your own code, by including your own debounce.c, or switch to another included one.
|
You can either use your own code, by including your own debounce.c, or switch to another included one.
|
||||||
Included debounce methods are:
|
Included debounce methods are:
|
||||||
* debounce_eager_pk - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE_DELAY``` millseconds of no further input for that key
|
* eager_pk - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE_DELAY``` millseconds of no further input for that key
|
||||||
* debounce_sym_g - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE_DELAY``` milliseconds of no changes has occured, all input changes are pushed.
|
* sym_g - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE_DELAY``` milliseconds of no changes has occured, all input changes are pushed.
|
||||||
|
|
||||||
|
|
||||||
@@ -314,3 +314,86 @@ qk_tap_dance_action_t tap_dance_actions[] = {
|
|||||||
And then simply use `TD(X_CTL)` anywhere in your keymap.
|
And then simply use `TD(X_CTL)` anywhere in your keymap.
|
||||||
|
|
||||||
If you want to implement this in your userspace, then you may want to check out how [DanielGGordon](https://github.com/qmk/qmk_firmware/tree/master/users/gordon) has implemented this in their userspace.
|
If you want to implement this in your userspace, then you may want to check out how [DanielGGordon](https://github.com/qmk/qmk_firmware/tree/master/users/gordon) has implemented this in their userspace.
|
||||||
|
|
||||||
|
### Example 5: Using tap dance for advanced mod-tap and layer-tap keys
|
||||||
|
|
||||||
|
Tap dance can be used to emulate `MT()` and `LT()` behavior when the tapped code is not a basic keycode. This is useful to send tapped keycodes that normally require `Shift`, such as parentheses or curly braces—or other modified keycodes, such as `Control + X`.
|
||||||
|
|
||||||
|
Below your layers and custom keycodes, add the following:
|
||||||
|
|
||||||
|
```c
|
||||||
|
// tapdance keycodes
|
||||||
|
enum td_keycodes {
|
||||||
|
ALT_LP // Our example key: `LALT` when held, `(` when tapped. Add additional keycodes for each tapdance.
|
||||||
|
};
|
||||||
|
|
||||||
|
// define a type containing as many tapdance states as you need
|
||||||
|
typedef enum {
|
||||||
|
SINGLE_TAP,
|
||||||
|
SINGLE_HOLD,
|
||||||
|
DOUBLE_SINGLE_TAP
|
||||||
|
} td_state_t;
|
||||||
|
|
||||||
|
// create a global instance of the tapdance state type
|
||||||
|
static td_state_t td_state;
|
||||||
|
|
||||||
|
// declare your tapdance functions:
|
||||||
|
|
||||||
|
// function to determine the current tapdance state
|
||||||
|
int cur_dance (qk_tap_dance_state_t *state);
|
||||||
|
|
||||||
|
// `finished` and `reset` functions for each tapdance keycode
|
||||||
|
void altlp_finished (qk_tap_dance_state_t *state, void *user_data);
|
||||||
|
void altlp_reset (qk_tap_dance_state_t *state, void *user_data);
|
||||||
|
```
|
||||||
|
|
||||||
|
Below your `LAYOUT`, define each of the tapdance functions:
|
||||||
|
|
||||||
|
```c
|
||||||
|
// determine the tapdance state to return
|
||||||
|
int cur_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_SINGLE_TAP; }
|
||||||
|
else { return 3; } // any number higher than the maximum state value you return above
|
||||||
|
}
|
||||||
|
|
||||||
|
// handle the possible states for each tapdance keycode you define:
|
||||||
|
|
||||||
|
void altlp_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
td_state = cur_dance(state);
|
||||||
|
switch (td_state) {
|
||||||
|
case SINGLE_TAP:
|
||||||
|
register_code16(KC_LPRN);
|
||||||
|
break;
|
||||||
|
case SINGLE_HOLD:
|
||||||
|
register_mods(MOD_BIT(KC_LALT)); // for a layer-tap key, use `layer_on(_MY_LAYER)` here
|
||||||
|
break;
|
||||||
|
case DOUBLE_SINGLE_TAP: // allow nesting of 2 parens `((` within tapping term
|
||||||
|
tap_code16(KC_LPRN);
|
||||||
|
register_code16(KC_LPRN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void altlp_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
switch (td_state) {
|
||||||
|
case SINGLE_TAP:
|
||||||
|
unregister_code16(KC_LPRN);
|
||||||
|
break;
|
||||||
|
case SINGLE_HOLD:
|
||||||
|
unregister_mods(MOD_BIT(KC_LALT)); // for a layer-tap key, use `layer_off(_MY_LAYER)` here
|
||||||
|
break;
|
||||||
|
case DOUBLE_SINGLE_TAP:
|
||||||
|
unregister_code16(KC_LPRN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// define `ACTION_TAP_DANCE_FN_ADVANCED()` for each tapdance keycode, passing in `finished` and `reset` functions
|
||||||
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
[ALT_LP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altlp_finished, altlp_reset)
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
Wrap each tapdance keycode in `TD()` when including it in your keymap, e.g. `TD(ALT_LP)`.
|
||||||
@@ -65,6 +65,8 @@ The following input modes are available:
|
|||||||
To enable, go to _System Preferences > Keyboard > Input Sources_, add _Unicode Hex Input_ to the list (it's under _Other_), then activate it from the input dropdown in the Menu Bar.
|
To enable, go to _System Preferences > Keyboard > Input Sources_, add _Unicode Hex Input_ to the list (it's under _Other_), then activate it from the input dropdown in the Menu Bar.
|
||||||
By default, this mode uses the left Option key (`KC_LALT`), but this can be changed by defining [`UNICODE_OSX_KEY`](#input-key-configuration) with another keycode.
|
By default, this mode uses the left Option key (`KC_LALT`), but this can be changed by defining [`UNICODE_OSX_KEY`](#input-key-configuration) with another keycode.
|
||||||
|
|
||||||
|
**Note:** Using the _Unicode Hex Input_ input source may disable some Option based shortcuts, such as: Option + Left Arrow (`moveWordLeftAndModifySelection`) and Option + Right Arrow (`moveWordRightAndModifySelection`).
|
||||||
|
|
||||||
* **`UC_LNX`**: Linux built-in IBus Unicode input. Supports code points up to `0x10FFFF` (all possible code points).
|
* **`UC_LNX`**: Linux built-in IBus Unicode input. Supports code points up to `0x10FFFF` (all possible code points).
|
||||||
|
|
||||||
Enabled by default and works almost anywhere on IBus-enabled distros. Without IBus, this mode works under GTK apps, but rarely anywhere else.
|
Enabled by default and works almost anywhere on IBus-enabled distros. Without IBus, this mode works under GTK apps, but rarely anywhere else.
|
||||||
@@ -121,7 +123,7 @@ For instance, you can add these definitions to your `config.h` file:
|
|||||||
|
|
||||||
### Additional Customization
|
### Additional Customization
|
||||||
|
|
||||||
Because Unicode is such a large and variable feature, there are a number of options that you can customize to work better on your system.
|
Because Unicode is such a large and variable feature, there are a number of options that you can customize to work better on your system.
|
||||||
|
|
||||||
#### Start and Finish input functions
|
#### Start and Finish input functions
|
||||||
|
|
||||||
@@ -183,7 +185,7 @@ AutoHotkey inserts the Text right of `Send, ` when this combination is pressed.
|
|||||||
|
|
||||||
### US International
|
### US International
|
||||||
|
|
||||||
If you enable the US International layout on the system, it will use punctuation to accent the characters.
|
If you enable the US International layout on the system, it will use punctuation to accent the characters.
|
||||||
|
|
||||||
For instance, typing "`a" will result in à.
|
For instance, typing "`a" will result in à.
|
||||||
|
|
||||||
|
|||||||
+39
-15
@@ -201,27 +201,51 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
|||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
switch (keycode) {
|
switch (keycode) {
|
||||||
case KC_MAKE:
|
case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader
|
||||||
if (!record->event.pressed) {
|
if (!record->event.pressed) {
|
||||||
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP
|
uint8_t temp_mod = get_mods();
|
||||||
#if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU))
|
uint8_t temp_osm = get_oneshot_mods();
|
||||||
":dfu "
|
clear_mods(); clear_oneshot_mods();
|
||||||
#elif defined(BOOTLOADER_HALFKAY)
|
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP);
|
||||||
":teensy "
|
#ifndef FLASH_BOOTLOADER
|
||||||
#elif defined(BOOTLOADER_CATERINA)
|
if ( (temp_mod | temp_osm) & MOD_MASK_SHIFT )
|
||||||
":avrdude "
|
#endif
|
||||||
#endif
|
{ //
|
||||||
SS_TAP(X_ENTER));
|
#if defined(__arm__) // only run for ARM boards
|
||||||
}
|
SEND_STRING(":dfu-util");
|
||||||
return false;
|
#elif defined(BOOTLOADER_DFU) // only run for DFU boards
|
||||||
break;
|
SEND_STRING(":dfu");
|
||||||
|
#elif defined(BOOTLOADER_HALFKAY) // only run for teensy boards
|
||||||
|
SEND_STRING(":teensy");
|
||||||
|
#elif defined(BOOTLOADER_CATERINA) // only run for Pro Micros
|
||||||
|
SEND_STRING(":avrdude");
|
||||||
|
#endif // bootloader options
|
||||||
|
}
|
||||||
|
if ( (temp_mod | temp_osm) & MOD_MASK_CTRL) {
|
||||||
|
SEND_STRING(" -j8 --output-sync");
|
||||||
|
}
|
||||||
|
SEND_STRING(SS_TAP(X_ENTER));
|
||||||
|
set_mods(temp_mod);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
return process_record_keymap(keycode, record);
|
return process_record_keymap(keycode, record);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
For boards that may not have a shift button (such as on a macro pad), we need a way to always include the bootloader option. To do that, add the following to the `rules.mk` in your userspace folder:
|
||||||
|
|
||||||
|
```make
|
||||||
|
ifeq ($(strip $(FLASH_BOOTLOADER)), yes)
|
||||||
|
OPT_DEFS += -DFLASH_BOOTLOADER
|
||||||
|
endif
|
||||||
|
```
|
||||||
|
|
||||||
This will add a new `KC_MAKE` keycode that can be used in any of your keymaps. And this keycode will output `make <keyboard>:<keymap>`, making frequent compiling easier. And this will work with any keyboard and any keymap as it will output the current boards info, so that you don't have to type this out every time.
|
This will add a new `KC_MAKE` keycode that can be used in any of your keymaps. And this keycode will output `make <keyboard>:<keymap>`, making frequent compiling easier. And this will work with any keyboard and any keymap as it will output the current boards info, so that you don't have to type this out every time.
|
||||||
|
|
||||||
Additionally, this should flash the newly compiled firmware automatically, using the correct utility, based on the bootloader settings (or default to just generating the HEX file). However, it should be noted that this may not work on all systems. AVRDUDE doesn't work on WSL, namely (and will dump the HEX in the ".build" folder instead).
|
Also, holding `shift` will add the appropriate flashing command (`:dfu`, `:teensy`, `:avrdude`, `:dfu-util`) for a majority of keyboards. Holding `control` will add some commands that will speed up compiling time by processing multiple files at once.
|
||||||
|
|
||||||
|
And for the boards that lack a shift key, or that you want to always attempt the flashing part, you can add `FLASH_BOOTLOADER = yes` to the `rules.mk` of that keymap.
|
||||||
|
|
||||||
|
?> This should flash the newly compiled firmware automatically, using the correct utility, based on the bootloader settings (or default to just generating the HEX file). However, it should be noted that this may not work on all systems. AVRDUDE doesn't work on WSL, namely. And this doesn't support BootloadHID or mdloader.
|
||||||
@@ -17,6 +17,7 @@ QMK has a staggering number of features for building your keyboard. It can take
|
|||||||
* [Key Lock](feature_key_lock.md) - Lock a key in the "down" state.
|
* [Key Lock](feature_key_lock.md) - Lock a key in the "down" state.
|
||||||
* [Layouts](feature_layouts.md) - Use one keymap with any keyboard that supports your layout.
|
* [Layouts](feature_layouts.md) - Use one keymap with any keyboard that supports your layout.
|
||||||
* [Leader Key](feature_leader_key.md) - Tap the leader key followed by a sequence to trigger custom behavior.
|
* [Leader Key](feature_leader_key.md) - Tap the leader key followed by a sequence to trigger custom behavior.
|
||||||
|
* [LED Matrix](feature_led_matrix.md) - LED Matrix single color lights for per key lighting (Single Color, not RGB).
|
||||||
* [Macros](feature_macros.md) - Send multiple key presses when pressing only one physical key.
|
* [Macros](feature_macros.md) - Send multiple key presses when pressing only one physical key.
|
||||||
* [Mouse keys](feature_mouse_keys.md) - Control your mouse pointer from your keyboard.
|
* [Mouse keys](feature_mouse_keys.md) - Control your mouse pointer from your keyboard.
|
||||||
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) - Sticky Keys, lets hit a key rather than holding it.
|
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) - Sticky Keys, lets hit a key rather than holding it.
|
||||||
|
|||||||
@@ -44,9 +44,7 @@ Fedora / Red Hat example:
|
|||||||
|
|
||||||
Arch / Manjaro example:
|
Arch / Manjaro example:
|
||||||
|
|
||||||
pacman -S base-devel gcc unzip wget zip avr-gcc avr-binutils avr-libc dfu-util arm-none-eabi-gcc arm-none-eabi-binutils arm-none-eabi-newlib git
|
pacman -S base-devel gcc unzip wget zip avr-gcc avr-binutils avr-libc dfu-util arm-none-eabi-gcc arm-none-eabi-binutils arm-none-eabi-newlib git dfu-programmer dfu-util
|
||||||
|
|
||||||
(the `dfu-programmer` package is availble on AUR only so you should download from there or use an AUR helper)
|
|
||||||
|
|
||||||
## Nix
|
## Nix
|
||||||
|
|
||||||
|
|||||||
@@ -143,9 +143,9 @@ As there is no standard split communication driver for ARM-based split keyboards
|
|||||||
|
|
||||||
Lets you replace the default matrix scanning routine with your own code. You will need to provide your own implementations of matrix_init() and matrix_scan().
|
Lets you replace the default matrix scanning routine with your own code. You will need to provide your own implementations of matrix_init() and matrix_scan().
|
||||||
|
|
||||||
`CUSTOM_DEBOUNCE`
|
`DEBOUNCE_TYPE`
|
||||||
|
|
||||||
Lets you replace the default key debouncing routine with your own code. You will need to provide your own implementation of debounce().
|
Lets you replace the default key debouncing routine with an alternative one. If `custom` you will need to provide your own implementation.
|
||||||
|
|
||||||
## Customizing Makefile Options on a Per-Keymap Basis
|
## Customizing Makefile Options on a Per-Keymap Basis
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -196,7 +196,7 @@ If you're more of a visual learner, or want some additional tips and something m
|
|||||||
|
|
||||||
From here, you should have a working keyboard once you program a firmware. Before we attach the Teensy permanently to the keyboard, let's quickly get some firmware loaded onto the Teensy so we can test each keyswitch.
|
From here, you should have a working keyboard once you program a firmware. Before we attach the Teensy permanently to the keyboard, let's quickly get some firmware loaded onto the Teensy so we can test each keyswitch.
|
||||||
|
|
||||||
To start out, download [the firmware](https://github.com/qmk/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/).
|
To start out, download [the firmware](https://github.com/qmk/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/) (paid) or [Visual Studio Code](https://code.visualstudio.com) (free).
|
||||||
|
|
||||||
The first thing we're going to do is create a new project using the script in the root directory of the firmware. In your terminal, run this command with `<project_name>` replaced by the name of your project - it'll need to be different from any other project in the `keyboards/` folder:
|
The first thing we're going to do is create a new project using the script in the root directory of the firmware. In your terminal, run this command with `<project_name>` replaced by the name of your project - it'll need to be different from any other project in the `keyboards/` folder:
|
||||||
|
|
||||||
|
|||||||
@@ -13,8 +13,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#ifndef KB_H
|
#pragma once
|
||||||
#define KB_H
|
|
||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
@@ -36,4 +35,3 @@
|
|||||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_NO, KC_NO, K3D }, \
|
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_NO, KC_NO, K3D }, \
|
||||||
{ K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, KC_NO, K4D } \
|
{ K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, KC_NO, K4D } \
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
@@ -68,5 +68,6 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
||||||
|
EXTRAFLAGS += -flto
|
||||||
|
|
||||||
LAYOUTS = 60_ansi
|
LAYOUTS = 60_ansi
|
||||||
@@ -46,35 +46,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void led_set_user(uint8_t usb_led) {
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
|
||||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
|
||||||
writePinLow(B6);
|
writePinLow(B6);
|
||||||
} else {
|
} else {
|
||||||
writePinHigh(B6);
|
writePinHigh(B6);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (usb_led & (1 << USB_LED_COMPOSE)) {
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (usb_led & (1 << USB_LED_KANA)) {
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -54,5 +54,6 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https:/
|
|||||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
AUDIO_ENABLE = no
|
AUDIO_ENABLE = no
|
||||||
RGBLIGHT_ENABLE = yes
|
RGBLIGHT_ENABLE = yes
|
||||||
|
EXTRAFLAGS += -flto
|
||||||
|
|
||||||
LAYOUTS = 60_hhkb
|
LAYOUTS = 60_hhkb
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
#ifndef KB_H
|
#pragma once
|
||||||
#define KB_H
|
|
||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
@@ -77,5 +76,3 @@
|
|||||||
K300, KC_NO,K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \
|
K300, KC_NO,K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \
|
||||||
KC_NO,K401, K403, K406, KC_NO,K411, K413, KC_NO \
|
KC_NO,K401, K403, K406, KC_NO,K411, K413, KC_NO \
|
||||||
)
|
)
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
#ifndef CONFIG_H
|
#pragma once
|
||||||
#define CONFIG_H
|
|
||||||
|
|
||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
@@ -46,5 +45,3 @@
|
|||||||
#define RGBLIGHT_SAT_STEP 8
|
#define RGBLIGHT_SAT_STEP 8
|
||||||
#define RGBLIGHT_VAL_STEP 8
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# 1upkeyboards 60% RGB
|
# 1up60rgb 60% RGB
|
||||||
|
|
||||||
Firmware for custom keyboard PCB with 60% key layout.
|
Firmware for custom keyboard PCB with 60% key layout.
|
||||||
|
|
||||||
|
|||||||
@@ -44,15 +44,15 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|||||||
# Build Options
|
# Build Options
|
||||||
# comment out to disable the options.
|
# comment out to disable the options.
|
||||||
#
|
#
|
||||||
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
|
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
||||||
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
CONSOLE_ENABLE ?= no # Console for debug(+400)
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
COMMAND_ENABLE ?= no # Commands for debug and configuration
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
AUDIO_ENABLE ?= no
|
AUDIO_ENABLE = no
|
||||||
RGBLIGHT_ENABLE ?= yes
|
RGBLIGHT_ENABLE = yes
|
||||||
|
|
||||||
LAYOUTS = 60_ansi 60_iso 60_ansi_split_bs_rshift 60_hhkb
|
LAYOUTS = 60_ansi 60_iso 60_ansi_split_bs_rshift 60_hhkb
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
# 1UP Keyboards
|
# 1UP Keyboards
|
||||||
|
|
||||||
|
1UP Keyboards is an online mechanical keyboard retailer located in New York, USA.
|
||||||
|
|
||||||
Website: [1UP Keyboards](https://www.1upkeyboards.com/)
|
Website: [1UP Keyboards](https://www.1upkeyboards.com/)
|
||||||
Discord: [Server Invite](https://discordapp.com/invite/c6SYn8)
|
Discord: [Server Invite](https://discordapp.com/invite/c6SYn8)
|
||||||
YouTube: [skiwithpete](https://www.youtube.com/user/skiwithpete)
|
YouTube: [skiwithpete](https://www.youtube.com/user/skiwithpete)
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright 2019 'mechmerlin'
|
/* Copyright 2019 MechMerlin
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -80,4 +80,4 @@ AUDIO_ENABLE = no # Audio output on port C6
|
|||||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
||||||
|
|
||||||
LAYOUTS = ortho_4x4
|
LAYOUTS = ortho_4x4
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
#ifndef CONFIG_H
|
#pragma once
|
||||||
#define CONFIG_H
|
|
||||||
|
|
||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
@@ -47,4 +46,3 @@
|
|||||||
#define RGBLIGHT_VAL_STEP 8
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
Sweet16
|
# Sweet 16 Macropad
|
||||||
===
|
|
||||||
|
|
||||||
A 4x4 numpad/macro pad sold by 1up Keyboards - designed by Bishop Keyboards
|
A 4x4 numpad/macro pad sold by 1up Keyboards - designed by Bishop Keyboards
|
||||||
|
|
||||||
|
|||||||
@@ -53,4 +53,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
|||||||
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
NKRO_ENABLE = yes # USB 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
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
AUDIO_ENABLE = no
|
AUDIO_ENABLE = no
|
||||||
RGBLIGHT_ENABLE = yes
|
RGBLIGHT_ENABLE = yes
|
||||||
|
EXTRAFLAGS += -flto
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
#ifndef KB_H
|
#pragma once
|
||||||
#define KB_H
|
|
||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
@@ -29,4 +28,3 @@
|
|||||||
{ KC_NO, K31, K32, KC_NO } \
|
{ KC_NO, K31, K32, KC_NO } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -2,10 +2,12 @@
|
|||||||
"keyboard_name": "foobar",
|
"keyboard_name": "foobar",
|
||||||
"url": "",
|
"url": "",
|
||||||
"maintainer": "qmk",
|
"maintainer": "qmk",
|
||||||
"width": 6,
|
"width": 10,
|
||||||
"height": 2,
|
"height": 3,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT_macro": {
|
"LAYOUT_macro": {
|
||||||
|
"width": 5,
|
||||||
|
"height": 3,
|
||||||
"key_count": 15,
|
"key_count": 15,
|
||||||
"layout": [
|
"layout": [
|
||||||
{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0},
|
{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0},
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
#define ___ KC_NO
|
||||||
|
|
||||||
/* This a shortcut to help you visually see your layout.
|
/* This a shortcut to help you visually see your layout.
|
||||||
*
|
*
|
||||||
@@ -26,18 +27,18 @@
|
|||||||
* represents the switch matrix.
|
* represents the switch matrix.
|
||||||
*/
|
*/
|
||||||
#define LAYOUT( \
|
#define LAYOUT( \
|
||||||
K00, K01, K02, K03, K04, K05, K06, K50, K51, K52, K53, K54, K55, K56, \
|
L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \
|
||||||
K10, K11, K12, K13, K14, K15, K16, K60, K61, K62, K63, K64, K65, K66, \
|
L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \
|
||||||
K20, K21, K22, K23, K24, K25, K26, K70, K71, K72, K73, K74, K75, K76, \
|
L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \
|
||||||
K34, K82 \
|
L34, R32 \
|
||||||
) { \
|
) { \
|
||||||
{ K00, K01, K02, K03, K04, K05, K06 }, \
|
{ L00, L01, L02, L03, L04, L05, L06 }, \
|
||||||
{ K10, K11, K12, K13, K14, K15, K16 }, \
|
{ L10, L11, L12, L13, L14, L15, L16 }, \
|
||||||
{ K20, K21, K22, K23, K24, K25, K26 }, \
|
{ L20, L21, L22, L23, L24, L25, L26 }, \
|
||||||
{ KC_NO, KC_NO, KC_NO, KC_NO, K34, KC_NO, KC_NO }, \
|
{ ___, ___, ___, ___, L34, ___, ___ }, \
|
||||||
\
|
\
|
||||||
{ K56, K55, K54, K53, K52, K51, K50 }, \
|
{ R06, R05, R04, R03, R02, R01, R00 }, \
|
||||||
{ K66, K65, K64, K63, K62, K61, K60 }, \
|
{ R16, R15, R14, R13, R12, R11, R10 }, \
|
||||||
{ K76, K75, K74, K73, K72, K71, K70 }, \
|
{ R26, R25, R24, R23, R22, R21, R20 }, \
|
||||||
{ KC_NO, KC_NO, KC_NO, KC_NO, K82, KC_NO, KC_NO } \
|
{ ___, ___, ___, ___, R32, ___, ___ } \
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "half_n_half",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 14,
|
||||||
|
"height": 4,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"key_count": 44,
|
||||||
|
"layout": [
|
||||||
|
{"label":"L00", "x":0, "y":0},
|
||||||
|
{"label":"L01", "x":1, "y":0},
|
||||||
|
{"label":"L02", "x":2, "y":0},
|
||||||
|
{"label":"L03", "x":3, "y":0},
|
||||||
|
{"label":"L04", "x":4, "y":0},
|
||||||
|
{"label":"L05", "x":5, "y":0},
|
||||||
|
{"label":"L06", "x":6, "y":0},
|
||||||
|
{"label":"R00", "x":7, "y":0},
|
||||||
|
{"label":"R01", "x":8, "y":0},
|
||||||
|
{"label":"R02", "x":9, "y":0},
|
||||||
|
{"label":"R03", "x":10, "y":0},
|
||||||
|
{"label":"R04", "x":11, "y":0},
|
||||||
|
{"label":"R05", "x":12, "y":0},
|
||||||
|
{"label":"R06", "x":13, "y":0},
|
||||||
|
|
||||||
|
{"label":"L10", "x":0, "y":1},
|
||||||
|
{"label":"L11", "x":1, "y":1},
|
||||||
|
{"label":"L12", "x":2, "y":1},
|
||||||
|
{"label":"L13", "x":3, "y":1},
|
||||||
|
{"label":"L14", "x":4, "y":1},
|
||||||
|
{"label":"L15", "x":5, "y":1},
|
||||||
|
{"label":"L16", "x":6, "y":1},
|
||||||
|
{"label":"R10", "x":7, "y":1},
|
||||||
|
{"label":"R11", "x":8, "y":1},
|
||||||
|
{"label":"R12", "x":9, "y":1},
|
||||||
|
{"label":"R13", "x":10, "y":1},
|
||||||
|
{"label":"R14", "x":11, "y":1},
|
||||||
|
{"label":"R15", "x":12, "y":1},
|
||||||
|
{"label":"R16", "x":13, "y":1},
|
||||||
|
|
||||||
|
{"label":"L20", "x":0, "y":2},
|
||||||
|
{"label":"L21", "x":1, "y":2},
|
||||||
|
{"label":"L22", "x":2, "y":2},
|
||||||
|
{"label":"L23", "x":3, "y":2},
|
||||||
|
{"label":"L24", "x":4, "y":2},
|
||||||
|
{"label":"L25", "x":5, "y":2},
|
||||||
|
{"label":"L26", "x":6, "y":2},
|
||||||
|
{"label":"R20", "x":7, "y":2},
|
||||||
|
{"label":"R21", "x":8, "y":2},
|
||||||
|
{"label":"R22", "x":9, "y":2},
|
||||||
|
{"label":"R23", "x":10, "y":2},
|
||||||
|
{"label":"R24", "x":11, "y":2},
|
||||||
|
{"label":"R25", "x":12, "y":2},
|
||||||
|
{"label":"R26", "x":13, "y":2},
|
||||||
|
|
||||||
|
{"label":"L34", "x":4, "y":3, "w":2},
|
||||||
|
{"label":"R32", "x":8, "y":3, "w":2}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -52,6 +52,28 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define BACKLIGHT_BREATHING
|
#define BACKLIGHT_BREATHING
|
||||||
#define BACKLIGHT_LEVELS 3
|
#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
|
||||||
|
// #endif
|
||||||
|
|
||||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
#define DEBOUNCING_DELAY 5
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2012 Jun Wako <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* Overrides for Feather 32u4 Bluefruit */
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#undef DESCRIPTION
|
||||||
|
#define DESCRIPTION Magicforce 68 BLE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#undef MATRIX_ROW_PINS
|
||||||
|
#undef MATRIX_COL_PINS
|
||||||
|
#undef UNUSED_PINS
|
||||||
|
#define MATRIX_ROW_PINS { D1, D0, C6, D7, B5, B6, B7, D6 }
|
||||||
|
#define MATRIX_COL_PINS { C7, F7, F6, F5, F4, F1, F0, D2, D3 }
|
||||||
|
#define UNUSED_PINS {B5}
|
||||||
File renamed without changes.
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
# mf68_ble
|
# mf68_ble
|
||||||
|
|
||||||

|

|
||||||
===
|
===
|
||||||
|
|
||||||
Magicforce 68 with [replacement PCB](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/mf68) designed by [di0ib](https://github.com/di0ib).
|
Magicforce 68 with [replacement PCB](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/mf68) designed by [di0ib](https://github.com/di0ib).
|
||||||
@@ -24,6 +24,6 @@ Below is how you wire the Feather to PCB
|
|||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
make 40percentclub/mf68_ble:default
|
make 40percentclub/mf68:mf68_ble
|
||||||
|
|
||||||
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).
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
# Overrides for Feather 32u4 Bluefruit
|
||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 8000000
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
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
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
|
||||||
|
# If you don't know the bootloader type, then you can specify the
|
||||||
|
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Teensy++ halfKay 1024
|
||||||
|
# Atmel DFU loader 4096
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
# USBaspLoader 2048
|
||||||
|
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BLUETOOTH = AdafruitBLE
|
||||||
|
BACKLIGHT_ENABLE = no
|
||||||
@@ -63,13 +63,14 @@ BOOTLOADER = caterina
|
|||||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# 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
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
NKRO_ENABLE = no # USB Nkey Rollover
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
MIDI_ENABLE = no # MIDI controls
|
MIDI_ENABLE = no # MIDI controls
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"keyboard_name": "MF68 BLE",
|
|
||||||
"url": "",
|
|
||||||
"maintainer": "qmk",
|
|
||||||
"width": 17.25,
|
|
||||||
"height": 5,
|
|
||||||
"layouts": {
|
|
||||||
"LAYOUT_68_ansi": {
|
|
||||||
"layout": [{"label":"~", "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":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15.25, "y":1}, {"x":16.25, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"x":15.25, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"x":14.25, "y":4}, {"x":15.25, "y":4}, {"x":16.25, "y":4}]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
#include "mf68_ble.h"
|
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
|
||||||
// put your keyboard start-up code here
|
|
||||||
// runs once when the firmware starts up
|
|
||||||
|
|
||||||
matrix_init_user();
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include "quantum.h"
|
|
||||||
|
|
||||||
#define LAYOUT_68_ansi( \
|
|
||||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K10, K11, K12, K13, K14, K15, K16, \
|
|
||||||
K17, K18, K20, K21, K22, K23, K24, K25, K26, K27, K28, K30, K31, K32, K33, K34, \
|
|
||||||
K35, K36, K37, K38, K40, K41, K42, K43, K44, K45, K46, K47, K48, \
|
|
||||||
K50, K51, K52, K53, K54, K55, K56, K57, K58, K60, K61, K62, K63, \
|
|
||||||
K64, K65, K66, K67, K68, K70, K71, K72, K73, K74 \
|
|
||||||
) { \
|
|
||||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \
|
|
||||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \
|
|
||||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \
|
|
||||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \
|
|
||||||
{ K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \
|
|
||||||
{ K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \
|
|
||||||
{ K60, K61, K62, K63, K64, K65, K66, K67, K68 }, \
|
|
||||||
{ K70, K71, K72, K73, K74 } \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define LAYOUT_kc( \
|
|
||||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K10, K11, K12, K13, K14, K15, K16, \
|
|
||||||
K17, K18, K20, K21, K22, K23, K24, K25, K26, K27, K28, K30, K31, K32, K33, K34, \
|
|
||||||
K35, K36, K37, K38, K40, K41, K42, K43, K44, K45, K46, K47, K48, \
|
|
||||||
K50, K51, K52, K53, K54, K55, K56, K57, K58, K60, K61, K62, K63, \
|
|
||||||
K64, K65, K66, K67, K68, K70, K71, K72, K73, K74 \
|
|
||||||
) LAYOUT_68_ansi( \
|
|
||||||
KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, \
|
|
||||||
KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, \
|
|
||||||
KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, \
|
|
||||||
KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, \
|
|
||||||
KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, KC_##K48, \
|
|
||||||
KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57, KC_##K58, \
|
|
||||||
KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67, KC_##K68, \
|
|
||||||
KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74 \
|
|
||||||
)
|
|
||||||
@@ -0,0 +1,249 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2018 Ryota Goto
|
||||||
|
|
||||||
|
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 0xA103
|
||||||
|
#define PRODUCT_ID 0x0003
|
||||||
|
#define DEVICE_VER 0x0003
|
||||||
|
#define MANUFACTURER ai03 Keyboard Designs
|
||||||
|
#define PRODUCT Orbit
|
||||||
|
#define DESCRIPTION Split ergonomic keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 10 // Double rows for split keyboards. Orbit has 5, so define 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 { F7, F6, F5, F4, D3 }
|
||||||
|
#define MATRIX_COL_PINS { C7, B4, D7, D6, D4, F1, F0 }
|
||||||
|
#define MATRIX_ROW_PINS_RIGHT { B6, B5, B4, D7, E6 }
|
||||||
|
#define MATRIX_COL_PINS_RIGHT { D4, D6, F1, F0, F4, F5, C6 }
|
||||||
|
|
||||||
|
#define SPLIT_HAND_PIN D5
|
||||||
|
|
||||||
|
//#define USE_I2C
|
||||||
|
|
||||||
|
#define SELECT_SOFT_SERIAL_SPEED 1
|
||||||
|
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||||
|
#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
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* 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
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* control how magic key switches layers */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||||
|
|
||||||
|
/* override magic key keymap */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||||
|
//#define MAGIC_KEY_HELP1 H
|
||||||
|
//#define MAGIC_KEY_HELP2 SLASH
|
||||||
|
//#define MAGIC_KEY_DEBUG D
|
||||||
|
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||||
|
//#define MAGIC_KEY_DEBUG_KBD K
|
||||||
|
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||||
|
//#define MAGIC_KEY_VERSION V
|
||||||
|
//#define MAGIC_KEY_STATUS S
|
||||||
|
//#define MAGIC_KEY_CONSOLE C
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
||||||
|
//#define MAGIC_KEY_LAYER0 0
|
||||||
|
//#define MAGIC_KEY_LAYER1 1
|
||||||
|
//#define MAGIC_KEY_LAYER2 2
|
||||||
|
//#define MAGIC_KEY_LAYER3 3
|
||||||
|
//#define MAGIC_KEY_LAYER4 4
|
||||||
|
//#define MAGIC_KEY_LAYER5 5
|
||||||
|
//#define MAGIC_KEY_LAYER6 6
|
||||||
|
//#define MAGIC_KEY_LAYER7 7
|
||||||
|
//#define MAGIC_KEY_LAYER8 8
|
||||||
|
//#define MAGIC_KEY_LAYER9 9
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||||
|
//#define MAGIC_KEY_LOCK CAPS
|
||||||
|
//#define MAGIC_KEY_EEPROM E
|
||||||
|
//#define MAGIC_KEY_NKRO N
|
||||||
|
//#define MAGIC_KEY_SLEEP_LED Z
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* 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
|
||||||
File renamed without changes.
@@ -0,0 +1,91 @@
|
|||||||
|
/* Copyright 2018 Ryota Goto
|
||||||
|
*
|
||||||
|
* 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 the keycodes used by our macros in process_record_user
|
||||||
|
enum custom_keycodes {
|
||||||
|
MANUAL = SAFE_RANGE,
|
||||||
|
DBLZERO
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT( /* Base */
|
||||||
|
TO(1), KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_BSPC, \
|
||||||
|
TO(1), KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC, KC_BSLS, \
|
||||||
|
KC_NO, 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_NO, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_PSCR, KC_DEL, \
|
||||||
|
KC_LCTL, KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_SPC, MO(2), KC_GRV, KC_MENU, KC_MINS, KC_EQL
|
||||||
|
),
|
||||||
|
[1] = LAYOUT( /* Fn, Arrowkeys, Media control, Backlight */
|
||||||
|
TO(2), _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_VOLU, _______, \
|
||||||
|
TO(2), _______, _______, KC_PGUP, _______, _______, KC_F11, KC_F12, _______, KC_UP, _______, _______, KC_VOLD, BL_STEP, \
|
||||||
|
TO(0), _______, KC_HOME, KC_PGDN, KC_END, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_MPLY, _______, \
|
||||||
|
TO(0), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[2] = LAYOUT( /* Mousekeys and Numpad */
|
||||||
|
KC_NO, _______, _______, _______, _______, _______, _______, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, _______, \
|
||||||
|
KC_NO, _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, _______, \
|
||||||
|
TO(1), _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, _______, \
|
||||||
|
TO(1), _______, KC_ACL0, KC_ACL1, KC_ACL2, KC_BTN3, _______, DBLZERO, KC_P0, KC_PDOT, KC_PENT, KC_PPLS, _______, MANUAL, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case MANUAL:
|
||||||
|
if (record->event.pressed)
|
||||||
|
{
|
||||||
|
// Keypress
|
||||||
|
SEND_STRING("https://kb.ai03.me/redir/orbit");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Key release
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case DBLZERO:
|
||||||
|
if (record->event.pressed)
|
||||||
|
{
|
||||||
|
// Keypress
|
||||||
|
SEND_STRING("00");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Key release
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t layer_state_set_user(uint32_t state) {
|
||||||
|
|
||||||
|
return state;
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# The default keymap for Orbit
|
||||||
|
|
||||||
|
[KLE of layout](http://www.keyboard-layout-editor.com/#/gists/53ebf59524de12515cb7e2e6de94f0d6)
|
||||||
@@ -0,0 +1,328 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2012 Jun Wako <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* scan matrix
|
||||||
|
*/
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include "wait.h"
|
||||||
|
#include "util.h"
|
||||||
|
#include "matrix.h"
|
||||||
|
#include "split_util.h"
|
||||||
|
#include "config.h"
|
||||||
|
#include "split_flags.h"
|
||||||
|
#include "quantum.h"
|
||||||
|
#include "debounce.h"
|
||||||
|
#include "transport.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
|
||||||
|
|
||||||
|
#define ERROR_DISCONNECT_COUNT 5
|
||||||
|
|
||||||
|
//#define ROWS_PER_HAND (MATRIX_ROWS / 2)
|
||||||
|
|
||||||
|
#ifdef DIRECT_PINS
|
||||||
|
static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS;
|
||||||
|
#else
|
||||||
|
static pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
|
||||||
|
static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* matrix state(1:on, 0:off) */
|
||||||
|
static matrix_row_t matrix[MATRIX_ROWS];
|
||||||
|
static matrix_row_t raw_matrix[ROWS_PER_HAND];
|
||||||
|
|
||||||
|
// row offsets for each hand
|
||||||
|
uint8_t thisHand, thatHand;
|
||||||
|
|
||||||
|
// user-defined overridable functions
|
||||||
|
|
||||||
|
__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) {}
|
||||||
|
|
||||||
|
__attribute__((weak)) void matrix_slave_scan_user(void) {}
|
||||||
|
|
||||||
|
// helper functions
|
||||||
|
|
||||||
|
inline uint8_t matrix_rows(void) { return MATRIX_ROWS; }
|
||||||
|
|
||||||
|
inline uint8_t matrix_cols(void) { return MATRIX_COLS; }
|
||||||
|
|
||||||
|
bool matrix_is_modified(void) {
|
||||||
|
if (debounce_active()) 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_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;
|
||||||
|
}
|
||||||
|
|
||||||
|
// matrix code
|
||||||
|
|
||||||
|
#ifdef DIRECT_PINS
|
||||||
|
|
||||||
|
static void init_pins(void) {
|
||||||
|
for (int row = 0; row < MATRIX_ROWS; row++) {
|
||||||
|
for (int col = 0; col < MATRIX_COLS; col++) {
|
||||||
|
pin_t pin = direct_pins[row][col];
|
||||||
|
if (pin != NO_PIN) {
|
||||||
|
setPinInputHigh(pin);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
|
||||||
|
matrix_row_t last_row_value = current_matrix[current_row];
|
||||||
|
current_matrix[current_row] = 0;
|
||||||
|
|
||||||
|
for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
|
||||||
|
pin_t pin = direct_pins[current_row][col_index];
|
||||||
|
if (pin != NO_PIN) {
|
||||||
|
current_matrix[current_row] |= readPin(pin) ? 0 : (ROW_SHIFTER << col_index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (last_row_value != current_matrix[current_row]);
|
||||||
|
}
|
||||||
|
|
||||||
|
#elif (DIODE_DIRECTION == COL2ROW)
|
||||||
|
|
||||||
|
static void select_row(uint8_t row) {
|
||||||
|
setPinOutput(row_pins[row]);
|
||||||
|
writePinLow(row_pins[row]);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void unselect_row(uint8_t row) { setPinInputHigh(row_pins[row]); }
|
||||||
|
|
||||||
|
static void unselect_rows(void) {
|
||||||
|
for (uint8_t x = 0; x < ROWS_PER_HAND; x++) {
|
||||||
|
setPinInputHigh(row_pins[x]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void init_pins(void) {
|
||||||
|
unselect_rows();
|
||||||
|
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
|
||||||
|
setPinInputHigh(col_pins[x]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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++) {
|
||||||
|
// Populate the matrix row with the state of the col pin
|
||||||
|
current_matrix[current_row] |= readPin(col_pins[col_index]) ? 0 : (ROW_SHIFTER << col_index);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unselect row
|
||||||
|
unselect_row(current_row);
|
||||||
|
|
||||||
|
return (last_row_value != current_matrix[current_row]);
|
||||||
|
}
|
||||||
|
|
||||||
|
#elif (DIODE_DIRECTION == ROW2COL)
|
||||||
|
|
||||||
|
static void select_col(uint8_t col) {
|
||||||
|
setPinOutput(col_pins[col]);
|
||||||
|
writePinLow(col_pins[col]);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void unselect_col(uint8_t col) { setPinInputHigh(col_pins[col]); }
|
||||||
|
|
||||||
|
static void unselect_cols(void) {
|
||||||
|
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
|
||||||
|
setPinInputHigh(col_pins[x]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void init_pins(void) {
|
||||||
|
unselect_cols();
|
||||||
|
for (uint8_t x = 0; x < ROWS_PER_HAND; x++) {
|
||||||
|
setPinInputHigh(row_pins[x]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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 (readPin(row_pins[row_index])) {
|
||||||
|
// Pin HI, clear col bit
|
||||||
|
current_matrix[row_index] &= ~(ROW_SHIFTER << current_col);
|
||||||
|
} else {
|
||||||
|
// Pin LO, set 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void matrix_init(void) {
|
||||||
|
debug_enable = true;
|
||||||
|
debug_matrix = true;
|
||||||
|
debug_mouse = true;
|
||||||
|
|
||||||
|
// Set pinout for right half if pinout for that half is defined
|
||||||
|
if (!isLeftHand) {
|
||||||
|
#ifdef MATRIX_ROW_PINS_RIGHT
|
||||||
|
const uint8_t row_pins_right[MATRIX_ROWS] = MATRIX_ROW_PINS_RIGHT;
|
||||||
|
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||||
|
row_pins[i] = row_pins_right[i];
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef MATRIX_COL_PINS_RIGHT
|
||||||
|
const uint8_t col_pins_right[MATRIX_COLS] = MATRIX_COL_PINS_RIGHT;
|
||||||
|
for (uint8_t i = 0; i < MATRIX_COLS; i++) {
|
||||||
|
col_pins[i] = col_pins_right[i];
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
thisHand = isLeftHand ? 0 : (ROWS_PER_HAND);
|
||||||
|
thatHand = ROWS_PER_HAND - thisHand;
|
||||||
|
|
||||||
|
// initialize key pins
|
||||||
|
init_pins();
|
||||||
|
|
||||||
|
// initialize matrix state: all keys off
|
||||||
|
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||||
|
matrix[i] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
debounce_init(ROWS_PER_HAND);
|
||||||
|
|
||||||
|
matrix_init_quantum();
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t _matrix_scan(void) {
|
||||||
|
bool changed = false;
|
||||||
|
|
||||||
|
#if defined(DIRECT_PINS) || (DIODE_DIRECTION == COL2ROW)
|
||||||
|
// Set row, read cols
|
||||||
|
for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) {
|
||||||
|
changed |= read_cols_on_row(raw_matrix, current_row);
|
||||||
|
}
|
||||||
|
#elif (DIODE_DIRECTION == ROW2COL)
|
||||||
|
// Set col, read rows
|
||||||
|
for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
|
||||||
|
changed |= read_rows_on_col(raw_matrix, current_col);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
debounce(raw_matrix, matrix + thisHand, ROWS_PER_HAND, changed);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t matrix_scan(void) {
|
||||||
|
uint8_t ret = _matrix_scan();
|
||||||
|
|
||||||
|
if (is_keyboard_master()) {
|
||||||
|
static uint8_t error_count;
|
||||||
|
|
||||||
|
if (!transport_master(matrix + thatHand)) {
|
||||||
|
error_count++;
|
||||||
|
|
||||||
|
if (error_count > ERROR_DISCONNECT_COUNT) {
|
||||||
|
// reset other half if disconnected
|
||||||
|
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||||
|
matrix[thatHand + i] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
error_count = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
matrix_scan_quantum();
|
||||||
|
} else {
|
||||||
|
transport_slave(matrix + thisHand);
|
||||||
|
matrix_slave_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <common/matrix.h>
|
||||||
@@ -0,0 +1,228 @@
|
|||||||
|
/* Copyright 2018 Ryota Goto
|
||||||
|
*
|
||||||
|
* 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 "orbit.h"
|
||||||
|
#include "split_util.h"
|
||||||
|
#include "transport.h"
|
||||||
|
|
||||||
|
|
||||||
|
// Call led_toggle to set LEDs easily
|
||||||
|
// LED IDs:
|
||||||
|
//
|
||||||
|
// (LEFT) 0 1 2 | 3 4 5 (RIGHT)
|
||||||
|
|
||||||
|
void led_toggle(int id, bool on) {
|
||||||
|
|
||||||
|
if (isLeftHand) {
|
||||||
|
switch(id) {
|
||||||
|
case 0:
|
||||||
|
// Left hand C6
|
||||||
|
if (on)
|
||||||
|
//PORTC |= (1<<6);
|
||||||
|
writePinHigh(C6);
|
||||||
|
else
|
||||||
|
//PORTC &= ~(1<<6);
|
||||||
|
writePinLow(C6);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
// Left hand B6
|
||||||
|
if (on)
|
||||||
|
//PORTB |= (1<<6);
|
||||||
|
writePinHigh(B6);
|
||||||
|
else
|
||||||
|
//PORTB &= ~(1<<6);
|
||||||
|
writePinLow(B6);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
// Left hand B5
|
||||||
|
if (on)
|
||||||
|
//PORTB |= (1<<5);
|
||||||
|
writePinHigh(B5);
|
||||||
|
else
|
||||||
|
//PORTB &= ~(1<<5);
|
||||||
|
writePinLow(B5);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
switch(id) {
|
||||||
|
case 3:
|
||||||
|
// Right hand F6
|
||||||
|
if (on)
|
||||||
|
//PORTF |= (1<<6);
|
||||||
|
writePinHigh(F6);
|
||||||
|
else
|
||||||
|
//PORTF &= ~(1<<6);
|
||||||
|
writePinLow(F6);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
// Right hand F7
|
||||||
|
if (on)
|
||||||
|
//PORTF |= (1<<7);
|
||||||
|
writePinHigh(F7);
|
||||||
|
else
|
||||||
|
//PORTF &= ~(1<<7);
|
||||||
|
writePinLow(F7);
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
// Right hand C7
|
||||||
|
if (on)
|
||||||
|
//PORTC |= (1<<7);
|
||||||
|
writePinHigh(C7);
|
||||||
|
else
|
||||||
|
//PORTC &= ~(1<<7);
|
||||||
|
writePinLow(C7);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set all LEDs at once using an array of 6 booleans
|
||||||
|
// LED IDs:
|
||||||
|
//
|
||||||
|
// (LEFT) 0 1 2 | 3 4 5 (RIGHT)
|
||||||
|
//
|
||||||
|
// Ex. set_all_leds({ false, false, false, true, true, true }) would turn off left hand, turn on right hand
|
||||||
|
|
||||||
|
void set_all_leds(bool leds[6]) {
|
||||||
|
for (int i = 0; i < 6; i++) {
|
||||||
|
led_toggle(i, leds[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void set_layer_indicators(uint8_t layer) {
|
||||||
|
|
||||||
|
switch (layer)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
led_toggle(0, true);
|
||||||
|
led_toggle(1, false);
|
||||||
|
led_toggle(2, false);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
led_toggle(0, true);
|
||||||
|
led_toggle(1, true);
|
||||||
|
led_toggle(2, false);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
led_toggle(0, true);
|
||||||
|
led_toggle(1, true);
|
||||||
|
led_toggle(2, true);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
led_toggle(0, false);
|
||||||
|
led_toggle(1, true);
|
||||||
|
led_toggle(2, true);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
led_toggle(0, false);
|
||||||
|
led_toggle(1, false);
|
||||||
|
led_toggle(2, true);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
led_toggle(0, true);
|
||||||
|
led_toggle(1, false);
|
||||||
|
led_toggle(2, true);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
|
||||||
|
// Initialize indicator LEDs to output
|
||||||
|
if (isLeftHand)
|
||||||
|
{
|
||||||
|
setPinOutput(C6);
|
||||||
|
setPinOutput(B6);
|
||||||
|
setPinOutput(B5);
|
||||||
|
//DDRC |= (1<<6);
|
||||||
|
//DDRB |= (1<<6);
|
||||||
|
//DDRB |= (1<<5);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setPinOutput(F6);
|
||||||
|
setPinOutput(F7);
|
||||||
|
setPinOutput(C7);
|
||||||
|
//DDRF |= (1<<6);
|
||||||
|
//DDRF |= (1<<7);
|
||||||
|
//DDRC |= (1<<7);
|
||||||
|
}
|
||||||
|
|
||||||
|
set_layer_indicators(0);
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
// put your looping keyboard code here
|
||||||
|
// runs every cycle (a lot)
|
||||||
|
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
// put your per-action keyboard code here
|
||||||
|
// runs for every action, just before processing by the firmware
|
||||||
|
|
||||||
|
return process_record_user(keycode, record);
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||||
|
|
||||||
|
if (is_keyboard_master()) {
|
||||||
|
|
||||||
|
serial_m2s_buffer.nlock_led = IS_LED_ON(usb_led, USB_LED_NUM_LOCK);
|
||||||
|
serial_m2s_buffer.clock_led = IS_LED_ON(usb_led, USB_LED_CAPS_LOCK);
|
||||||
|
serial_m2s_buffer.slock_led = IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK);
|
||||||
|
|
||||||
|
led_toggle(3, IS_LED_ON(usb_led, USB_LED_NUM_LOCK));
|
||||||
|
led_toggle(4, IS_LED_ON(usb_led, USB_LED_CAPS_LOCK));
|
||||||
|
led_toggle(5, IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t layer_state_set_kb(uint32_t state) {
|
||||||
|
|
||||||
|
if (is_keyboard_master())
|
||||||
|
{
|
||||||
|
|
||||||
|
current_layer = biton32(state);
|
||||||
|
serial_m2s_buffer.current_layer = biton32(state);
|
||||||
|
|
||||||
|
// If left half, do the LED toggle thing
|
||||||
|
if (isLeftHand)
|
||||||
|
{
|
||||||
|
set_layer_indicators(biton32(state));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
// NOTE: Do not set slave LEDs here.
|
||||||
|
// This is not called on slave
|
||||||
|
|
||||||
|
return layer_state_set_user(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
/* Copyright 2018 Ryota Goto
|
||||||
|
*
|
||||||
|
* 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 ORBIT_H
|
||||||
|
#define ORBIT_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
/* This 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef USE_I2C
|
||||||
|
#include <stddef.h>
|
||||||
|
#ifdef __AVR__
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <avr/interrupt.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#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, L36, R30, R31, R32, R33, R34, R35, R36, \
|
||||||
|
L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ 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, L36 }, \
|
||||||
|
{ KC_NO, L41, L42, L43, L44, L45, L46 }, \
|
||||||
|
{ R00, R01, R02, R03, R04, R05, R06 }, \
|
||||||
|
{ R10, R11, R12, R13, R14, R15, R16 }, \
|
||||||
|
{ R20, R21, R22, R23, R24, R25, R26 }, \
|
||||||
|
{ R30, R31, R32, R33, R34, R35, R36 }, \
|
||||||
|
{ R40, R41, R42, R43, R44, R45, KC_NO } \
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t current_layer;
|
||||||
|
|
||||||
|
extern void led_toggle(int id, bool on);
|
||||||
|
void set_all_leds(bool leds[6]);
|
||||||
|
extern void set_layer_indicators(uint8_t layer);
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# Orbit
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A split ergonomic keyboard project.
|
||||||
|
|
||||||
|
Keyboard Maintainer: [ai03](https://github.com/ai03-2725)
|
||||||
|
Hardware Supported: The [Orbit PCB](https://github.com/ai03-2725/Orbit)
|
||||||
|
Hardware Availability: [This repository](https://github.com/ai03-2725/Orbit) has PCB files. Case group buy orders are currently closed.
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make ai03/orbit:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
SRC += split_util.c \
|
||||||
|
split_flags.c \
|
||||||
|
serial.c \
|
||||||
|
transport.c \
|
||||||
|
matrix.c
|
||||||
|
|
||||||
|
# MCU name
|
||||||
|
#MCU = at90usb1286
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
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
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
|
||||||
|
# If you don't know the bootloader type, then you can specify the
|
||||||
|
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Teensy++ halfKay 1024
|
||||||
|
# Atmel DFU loader 4096
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
# USBaspLoader 2048
|
||||||
|
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||||
|
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 (+400)
|
||||||
|
USE_I2C = no # I2C for split communication
|
||||||
|
CUSTOM_MATRIX = yes # For providing custom matrix.c (in this case, override regular matrix.c with split matrix.c)
|
||||||
|
# SPLIT_KEYBOARD = yes # Split keyboard flag disabled as manual edits had to be done to the split common files
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,546 @@
|
|||||||
|
/*
|
||||||
|
* WARNING: be careful changing this code, it is very timing dependent
|
||||||
|
*
|
||||||
|
* 2018-10-28 checked
|
||||||
|
* avr-gcc 4.9.2
|
||||||
|
* avr-gcc 5.4.0
|
||||||
|
* avr-gcc 7.3.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef F_CPU
|
||||||
|
#define F_CPU 16000000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <avr/interrupt.h>
|
||||||
|
#include <util/delay.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include "serial.h"
|
||||||
|
//#include <pro_micro.h>
|
||||||
|
|
||||||
|
#ifdef SOFT_SERIAL_PIN
|
||||||
|
|
||||||
|
#ifdef __AVR_ATmega32U4__
|
||||||
|
// if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial.
|
||||||
|
#ifdef USE_AVR_I2C
|
||||||
|
#if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1
|
||||||
|
#error Using ATmega32U4 I2C, so can not use PD0, PD1
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3
|
||||||
|
#define SERIAL_PIN_DDR DDRD
|
||||||
|
#define SERIAL_PIN_PORT PORTD
|
||||||
|
#define SERIAL_PIN_INPUT PIND
|
||||||
|
#if SOFT_SERIAL_PIN == D0
|
||||||
|
#define SERIAL_PIN_MASK _BV(PD0)
|
||||||
|
#define EIMSK_BIT _BV(INT0)
|
||||||
|
#define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01)))
|
||||||
|
#define SERIAL_PIN_INTERRUPT INT0_vect
|
||||||
|
#elif SOFT_SERIAL_PIN == D1
|
||||||
|
#define SERIAL_PIN_MASK _BV(PD1)
|
||||||
|
#define EIMSK_BIT _BV(INT1)
|
||||||
|
#define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11)))
|
||||||
|
#define SERIAL_PIN_INTERRUPT INT1_vect
|
||||||
|
#elif SOFT_SERIAL_PIN == D2
|
||||||
|
#define SERIAL_PIN_MASK _BV(PD2)
|
||||||
|
#define EIMSK_BIT _BV(INT2)
|
||||||
|
#define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21)))
|
||||||
|
#define SERIAL_PIN_INTERRUPT INT2_vect
|
||||||
|
#elif SOFT_SERIAL_PIN == D3
|
||||||
|
#define SERIAL_PIN_MASK _BV(PD3)
|
||||||
|
#define EIMSK_BIT _BV(INT3)
|
||||||
|
#define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31)))
|
||||||
|
#define SERIAL_PIN_INTERRUPT INT3_vect
|
||||||
|
#endif
|
||||||
|
#elif SOFT_SERIAL_PIN == E6
|
||||||
|
#define SERIAL_PIN_DDR DDRE
|
||||||
|
#define SERIAL_PIN_PORT PORTE
|
||||||
|
#define SERIAL_PIN_INPUT PINE
|
||||||
|
#define SERIAL_PIN_MASK _BV(PE6)
|
||||||
|
#define EIMSK_BIT _BV(INT6)
|
||||||
|
#define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61)))
|
||||||
|
#define SERIAL_PIN_INTERRUPT INT6_vect
|
||||||
|
#else
|
||||||
|
#error invalid SOFT_SERIAL_PIN value
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#else
|
||||||
|
#error serial.c now support ATmega32U4 only
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define ALWAYS_INLINE __attribute__((always_inline))
|
||||||
|
#define NO_INLINE __attribute__((noinline))
|
||||||
|
#define _delay_sub_us(x) __builtin_avr_delay_cycles(x)
|
||||||
|
|
||||||
|
// parity check
|
||||||
|
#define ODD_PARITY 1
|
||||||
|
#define EVEN_PARITY 0
|
||||||
|
#define PARITY EVEN_PARITY
|
||||||
|
|
||||||
|
#ifdef SERIAL_DELAY
|
||||||
|
// custom setup in config.h
|
||||||
|
// #define TID_SEND_ADJUST 2
|
||||||
|
// #define SERIAL_DELAY 6 // micro sec
|
||||||
|
// #define READ_WRITE_START_ADJUST 30 // cycles
|
||||||
|
// #define READ_WRITE_WIDTH_ADJUST 8 // cycles
|
||||||
|
#else
|
||||||
|
// ============ Standard setups ============
|
||||||
|
|
||||||
|
#ifndef SELECT_SOFT_SERIAL_SPEED
|
||||||
|
#define SELECT_SOFT_SERIAL_SPEED 1
|
||||||
|
// 0: about 189kbps (Experimental only)
|
||||||
|
// 1: about 137kbps (default)
|
||||||
|
// 2: about 75kbps
|
||||||
|
// 3: about 39kbps
|
||||||
|
// 4: about 26kbps
|
||||||
|
// 5: about 20kbps
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if __GNUC__ < 6
|
||||||
|
#define TID_SEND_ADJUST 14
|
||||||
|
#else
|
||||||
|
#define TID_SEND_ADJUST 2
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if SELECT_SOFT_SERIAL_SPEED == 0
|
||||||
|
// Very High speed
|
||||||
|
#define SERIAL_DELAY 4 // micro sec
|
||||||
|
#if __GNUC__ < 6
|
||||||
|
#define READ_WRITE_START_ADJUST 33 // cycles
|
||||||
|
#define READ_WRITE_WIDTH_ADJUST 3 // cycles
|
||||||
|
#else
|
||||||
|
#define READ_WRITE_START_ADJUST 34 // cycles
|
||||||
|
#define READ_WRITE_WIDTH_ADJUST 7 // cycles
|
||||||
|
#endif
|
||||||
|
#elif SELECT_SOFT_SERIAL_SPEED == 1
|
||||||
|
// High speed
|
||||||
|
#define SERIAL_DELAY 6 // micro sec
|
||||||
|
#if __GNUC__ < 6
|
||||||
|
#define READ_WRITE_START_ADJUST 30 // cycles
|
||||||
|
#define READ_WRITE_WIDTH_ADJUST 3 // cycles
|
||||||
|
#else
|
||||||
|
#define READ_WRITE_START_ADJUST 33 // cycles
|
||||||
|
#define READ_WRITE_WIDTH_ADJUST 7 // cycles
|
||||||
|
#endif
|
||||||
|
#elif SELECT_SOFT_SERIAL_SPEED == 2
|
||||||
|
// Middle speed
|
||||||
|
#define SERIAL_DELAY 12 // micro sec
|
||||||
|
#define READ_WRITE_START_ADJUST 30 // cycles
|
||||||
|
#if __GNUC__ < 6
|
||||||
|
#define READ_WRITE_WIDTH_ADJUST 3 // cycles
|
||||||
|
#else
|
||||||
|
#define READ_WRITE_WIDTH_ADJUST 7 // cycles
|
||||||
|
#endif
|
||||||
|
#elif SELECT_SOFT_SERIAL_SPEED == 3
|
||||||
|
// Low speed
|
||||||
|
#define SERIAL_DELAY 24 // micro sec
|
||||||
|
#define READ_WRITE_START_ADJUST 30 // cycles
|
||||||
|
#if __GNUC__ < 6
|
||||||
|
#define READ_WRITE_WIDTH_ADJUST 3 // cycles
|
||||||
|
#else
|
||||||
|
#define READ_WRITE_WIDTH_ADJUST 7 // cycles
|
||||||
|
#endif
|
||||||
|
#elif SELECT_SOFT_SERIAL_SPEED == 4
|
||||||
|
// Very Low speed
|
||||||
|
#define SERIAL_DELAY 36 // micro sec
|
||||||
|
#define READ_WRITE_START_ADJUST 30 // cycles
|
||||||
|
#if __GNUC__ < 6
|
||||||
|
#define READ_WRITE_WIDTH_ADJUST 3 // cycles
|
||||||
|
#else
|
||||||
|
#define READ_WRITE_WIDTH_ADJUST 7 // cycles
|
||||||
|
#endif
|
||||||
|
#elif SELECT_SOFT_SERIAL_SPEED == 5
|
||||||
|
// Ultra Low speed
|
||||||
|
#define SERIAL_DELAY 48 // micro sec
|
||||||
|
#define READ_WRITE_START_ADJUST 30 // cycles
|
||||||
|
#if __GNUC__ < 6
|
||||||
|
#define READ_WRITE_WIDTH_ADJUST 3 // cycles
|
||||||
|
#else
|
||||||
|
#define READ_WRITE_WIDTH_ADJUST 7 // cycles
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#error invalid SELECT_SOFT_SERIAL_SPEED value
|
||||||
|
#endif /* SELECT_SOFT_SERIAL_SPEED */
|
||||||
|
#endif /* SERIAL_DELAY */
|
||||||
|
|
||||||
|
#define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2)
|
||||||
|
#define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2)
|
||||||
|
|
||||||
|
#define SLAVE_INT_WIDTH_US 1
|
||||||
|
#ifndef SERIAL_USE_MULTI_TRANSACTION
|
||||||
|
#define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY
|
||||||
|
#else
|
||||||
|
#define SLAVE_INT_ACK_WIDTH_UNIT 2
|
||||||
|
#define SLAVE_INT_ACK_WIDTH 4
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static SSTD_t *Transaction_table = NULL;
|
||||||
|
static uint8_t Transaction_table_size = 0;
|
||||||
|
|
||||||
|
inline static void serial_delay(void) ALWAYS_INLINE;
|
||||||
|
inline static
|
||||||
|
void serial_delay(void) {
|
||||||
|
_delay_us(SERIAL_DELAY);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline static void serial_delay_half1(void) ALWAYS_INLINE;
|
||||||
|
inline static
|
||||||
|
void serial_delay_half1(void) {
|
||||||
|
_delay_us(SERIAL_DELAY_HALF1);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline static void serial_delay_half2(void) ALWAYS_INLINE;
|
||||||
|
inline static
|
||||||
|
void serial_delay_half2(void) {
|
||||||
|
_delay_us(SERIAL_DELAY_HALF2);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline static void serial_output(void) ALWAYS_INLINE;
|
||||||
|
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_with_pullup(void) ALWAYS_INLINE;
|
||||||
|
inline static
|
||||||
|
void serial_input_with_pullup(void) {
|
||||||
|
SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK;
|
||||||
|
SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline static uint8_t serial_read_pin(void) ALWAYS_INLINE;
|
||||||
|
inline static
|
||||||
|
uint8_t serial_read_pin(void) {
|
||||||
|
return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline static void serial_low(void) ALWAYS_INLINE;
|
||||||
|
inline static
|
||||||
|
void serial_low(void) {
|
||||||
|
SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline static void serial_high(void) ALWAYS_INLINE;
|
||||||
|
inline static
|
||||||
|
void serial_high(void) {
|
||||||
|
SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size)
|
||||||
|
{
|
||||||
|
Transaction_table = sstd_table;
|
||||||
|
Transaction_table_size = (uint8_t)sstd_table_size;
|
||||||
|
serial_output();
|
||||||
|
serial_high();
|
||||||
|
}
|
||||||
|
|
||||||
|
void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size)
|
||||||
|
{
|
||||||
|
Transaction_table = sstd_table;
|
||||||
|
Transaction_table_size = (uint8_t)sstd_table_size;
|
||||||
|
serial_input_with_pullup();
|
||||||
|
|
||||||
|
// Enable INT0-INT3,INT6
|
||||||
|
EIMSK |= EIMSK_BIT;
|
||||||
|
#if SERIAL_PIN_MASK == _BV(PE6)
|
||||||
|
// Trigger on falling edge of INT6
|
||||||
|
EICRB &= EICRx_BIT;
|
||||||
|
#else
|
||||||
|
// Trigger on falling edge of INT0-INT3
|
||||||
|
EICRA &= EICRx_BIT;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
// Used by the sender to synchronize timing with the reciver.
|
||||||
|
static void sync_recv(void) NO_INLINE;
|
||||||
|
static
|
||||||
|
void sync_recv(void) {
|
||||||
|
for (uint8_t i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) {
|
||||||
|
}
|
||||||
|
// This shouldn't hang if the target disconnects because the
|
||||||
|
// serial line will float to high if the target does disconnect.
|
||||||
|
while (!serial_read_pin());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Used by the reciver to send a synchronization signal to the sender.
|
||||||
|
static void sync_send(void) NO_INLINE;
|
||||||
|
static
|
||||||
|
void sync_send(void) {
|
||||||
|
serial_low();
|
||||||
|
serial_delay();
|
||||||
|
serial_high();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reads a byte from the serial line
|
||||||
|
static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) NO_INLINE;
|
||||||
|
static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) {
|
||||||
|
uint8_t byte, i, p, pb;
|
||||||
|
|
||||||
|
_delay_sub_us(READ_WRITE_START_ADJUST);
|
||||||
|
for( i = 0, byte = 0, p = PARITY; i < bit; i++ ) {
|
||||||
|
serial_delay_half1(); // read the middle of pulses
|
||||||
|
if( serial_read_pin() ) {
|
||||||
|
byte = (byte << 1) | 1; p ^= 1;
|
||||||
|
} else {
|
||||||
|
byte = (byte << 1) | 0; p ^= 0;
|
||||||
|
}
|
||||||
|
_delay_sub_us(READ_WRITE_WIDTH_ADJUST);
|
||||||
|
serial_delay_half2();
|
||||||
|
}
|
||||||
|
/* recive parity bit */
|
||||||
|
serial_delay_half1(); // read the middle of pulses
|
||||||
|
pb = serial_read_pin();
|
||||||
|
_delay_sub_us(READ_WRITE_WIDTH_ADJUST);
|
||||||
|
serial_delay_half2();
|
||||||
|
|
||||||
|
*pterrcount += (p != pb)? 1 : 0;
|
||||||
|
|
||||||
|
return byte;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sends a byte with MSB ordering
|
||||||
|
void serial_write_chunk(uint8_t data, uint8_t bit) NO_INLINE;
|
||||||
|
void serial_write_chunk(uint8_t data, uint8_t bit) {
|
||||||
|
uint8_t b, p;
|
||||||
|
for( p = PARITY, b = 1<<(bit-1); b ; b >>= 1) {
|
||||||
|
if(data & b) {
|
||||||
|
serial_high(); p ^= 1;
|
||||||
|
} else {
|
||||||
|
serial_low(); p ^= 0;
|
||||||
|
}
|
||||||
|
serial_delay();
|
||||||
|
}
|
||||||
|
/* send parity bit */
|
||||||
|
if(p & 1) { serial_high(); }
|
||||||
|
else { serial_low(); }
|
||||||
|
serial_delay();
|
||||||
|
|
||||||
|
serial_low(); // sync_send() / senc_recv() need raise edge
|
||||||
|
}
|
||||||
|
|
||||||
|
static void serial_send_packet(uint8_t *buffer, uint8_t size) NO_INLINE;
|
||||||
|
static
|
||||||
|
void serial_send_packet(uint8_t *buffer, uint8_t size) {
|
||||||
|
for (uint8_t i = 0; i < size; ++i) {
|
||||||
|
uint8_t data;
|
||||||
|
data = buffer[i];
|
||||||
|
sync_send();
|
||||||
|
serial_write_chunk(data,8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) NO_INLINE;
|
||||||
|
static
|
||||||
|
uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) {
|
||||||
|
uint8_t pecount = 0;
|
||||||
|
for (uint8_t i = 0; i < size; ++i) {
|
||||||
|
uint8_t data;
|
||||||
|
sync_recv();
|
||||||
|
data = serial_read_chunk(&pecount, 8);
|
||||||
|
buffer[i] = data;
|
||||||
|
}
|
||||||
|
return pecount == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline static
|
||||||
|
void change_sender2reciver(void) {
|
||||||
|
sync_send(); //0
|
||||||
|
serial_delay_half1(); //1
|
||||||
|
serial_low(); //2
|
||||||
|
serial_input_with_pullup(); //2
|
||||||
|
serial_delay_half1(); //3
|
||||||
|
}
|
||||||
|
|
||||||
|
inline static
|
||||||
|
void change_reciver2sender(void) {
|
||||||
|
sync_recv(); //0
|
||||||
|
serial_delay(); //1
|
||||||
|
serial_low(); //3
|
||||||
|
serial_output(); //3
|
||||||
|
serial_delay_half1(); //4
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline uint8_t nibble_bits_count(uint8_t bits)
|
||||||
|
{
|
||||||
|
bits = (bits & 0x5) + (bits >> 1 & 0x5);
|
||||||
|
bits = (bits & 0x3) + (bits >> 2 & 0x3);
|
||||||
|
return bits;
|
||||||
|
}
|
||||||
|
|
||||||
|
// interrupt handle to be used by the target device
|
||||||
|
ISR(SERIAL_PIN_INTERRUPT) {
|
||||||
|
|
||||||
|
#ifndef SERIAL_USE_MULTI_TRANSACTION
|
||||||
|
serial_low();
|
||||||
|
serial_output();
|
||||||
|
SSTD_t *trans = Transaction_table;
|
||||||
|
#else
|
||||||
|
// recive transaction table index
|
||||||
|
uint8_t tid, bits;
|
||||||
|
uint8_t pecount = 0;
|
||||||
|
sync_recv();
|
||||||
|
bits = serial_read_chunk(&pecount,7);
|
||||||
|
tid = bits>>3;
|
||||||
|
bits = (bits&7) != nibble_bits_count(tid);
|
||||||
|
if( bits || pecount> 0 || tid > Transaction_table_size ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
serial_delay_half1();
|
||||||
|
|
||||||
|
serial_high(); // response step1 low->high
|
||||||
|
serial_output();
|
||||||
|
_delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT*SLAVE_INT_ACK_WIDTH);
|
||||||
|
SSTD_t *trans = &Transaction_table[tid];
|
||||||
|
serial_low(); // response step2 ack high->low
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// target send phase
|
||||||
|
if( trans->target2initiator_buffer_size > 0 )
|
||||||
|
serial_send_packet((uint8_t *)trans->target2initiator_buffer,
|
||||||
|
trans->target2initiator_buffer_size);
|
||||||
|
// target switch to input
|
||||||
|
change_sender2reciver();
|
||||||
|
|
||||||
|
// target recive phase
|
||||||
|
if( trans->initiator2target_buffer_size > 0 ) {
|
||||||
|
if (serial_recive_packet((uint8_t *)trans->initiator2target_buffer,
|
||||||
|
trans->initiator2target_buffer_size) ) {
|
||||||
|
*trans->status = TRANSACTION_ACCEPTED;
|
||||||
|
} else {
|
||||||
|
*trans->status = TRANSACTION_DATA_ERROR;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
*trans->status = TRANSACTION_ACCEPTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
sync_recv(); //weit initiator output to high
|
||||||
|
}
|
||||||
|
|
||||||
|
/////////
|
||||||
|
// start transaction by initiator
|
||||||
|
//
|
||||||
|
// int soft_serial_transaction(int sstd_index)
|
||||||
|
//
|
||||||
|
// Returns:
|
||||||
|
// TRANSACTION_END
|
||||||
|
// TRANSACTION_NO_RESPONSE
|
||||||
|
// TRANSACTION_DATA_ERROR
|
||||||
|
// this code is very time dependent, so we need to disable interrupts
|
||||||
|
#ifndef SERIAL_USE_MULTI_TRANSACTION
|
||||||
|
int soft_serial_transaction(void) {
|
||||||
|
SSTD_t *trans = Transaction_table;
|
||||||
|
#else
|
||||||
|
int soft_serial_transaction(int sstd_index) {
|
||||||
|
if( sstd_index > Transaction_table_size )
|
||||||
|
return TRANSACTION_TYPE_ERROR;
|
||||||
|
SSTD_t *trans = &Transaction_table[sstd_index];
|
||||||
|
#endif
|
||||||
|
cli();
|
||||||
|
|
||||||
|
// signal to the target that we want to start a transaction
|
||||||
|
serial_output();
|
||||||
|
serial_low();
|
||||||
|
_delay_us(SLAVE_INT_WIDTH_US);
|
||||||
|
|
||||||
|
#ifndef SERIAL_USE_MULTI_TRANSACTION
|
||||||
|
// wait for the target response
|
||||||
|
serial_input_with_pullup();
|
||||||
|
_delay_us(SLAVE_INT_RESPONSE_TIME);
|
||||||
|
|
||||||
|
// check if the target is present
|
||||||
|
if (serial_read_pin()) {
|
||||||
|
// target failed to pull the line low, assume not present
|
||||||
|
serial_output();
|
||||||
|
serial_high();
|
||||||
|
*trans->status = TRANSACTION_NO_RESPONSE;
|
||||||
|
sei();
|
||||||
|
return TRANSACTION_NO_RESPONSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
// send transaction table index
|
||||||
|
int tid = (sstd_index<<3) | (7 & nibble_bits_count(sstd_index));
|
||||||
|
sync_send();
|
||||||
|
_delay_sub_us(TID_SEND_ADJUST);
|
||||||
|
serial_write_chunk(tid, 7);
|
||||||
|
serial_delay_half1();
|
||||||
|
|
||||||
|
// wait for the target response (step1 low->high)
|
||||||
|
serial_input_with_pullup();
|
||||||
|
while( !serial_read_pin() ) {
|
||||||
|
_delay_sub_us(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
// check if the target is present (step2 high->low)
|
||||||
|
for( int i = 0; serial_read_pin(); i++ ) {
|
||||||
|
if (i > SLAVE_INT_ACK_WIDTH + 1) {
|
||||||
|
// slave failed to pull the line low, assume not present
|
||||||
|
serial_output();
|
||||||
|
serial_high();
|
||||||
|
*trans->status = TRANSACTION_NO_RESPONSE;
|
||||||
|
sei();
|
||||||
|
return TRANSACTION_NO_RESPONSE;
|
||||||
|
}
|
||||||
|
_delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// initiator recive phase
|
||||||
|
// if the target is present syncronize with it
|
||||||
|
if( trans->target2initiator_buffer_size > 0 ) {
|
||||||
|
if (!serial_recive_packet((uint8_t *)trans->target2initiator_buffer,
|
||||||
|
trans->target2initiator_buffer_size) ) {
|
||||||
|
serial_output();
|
||||||
|
serial_high();
|
||||||
|
*trans->status = TRANSACTION_DATA_ERROR;
|
||||||
|
sei();
|
||||||
|
return TRANSACTION_DATA_ERROR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// initiator switch to output
|
||||||
|
change_reciver2sender();
|
||||||
|
|
||||||
|
// initiator send phase
|
||||||
|
if( trans->initiator2target_buffer_size > 0 ) {
|
||||||
|
serial_send_packet((uint8_t *)trans->initiator2target_buffer,
|
||||||
|
trans->initiator2target_buffer_size);
|
||||||
|
}
|
||||||
|
|
||||||
|
// always, release the line when not in use
|
||||||
|
sync_send();
|
||||||
|
|
||||||
|
*trans->status = TRANSACTION_END;
|
||||||
|
sei();
|
||||||
|
return TRANSACTION_END;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef SERIAL_USE_MULTI_TRANSACTION
|
||||||
|
int soft_serial_get_and_clean_status(int sstd_index) {
|
||||||
|
SSTD_t *trans = &Transaction_table[sstd_index];
|
||||||
|
cli();
|
||||||
|
int retval = *trans->status;
|
||||||
|
*trans->status = 0;;
|
||||||
|
sei();
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Helix serial.c history
|
||||||
|
// 2018-1-29 fork from let's split and add PD2, modify sync_recv() (#2308, bceffdefc)
|
||||||
|
// 2018-6-28 bug fix master to slave comm and speed up (#3255, 1038bbef4)
|
||||||
|
// (adjusted with avr-gcc 4.9.2)
|
||||||
|
// 2018-7-13 remove USE_SERIAL_PD2 macro (#3374, f30d6dd78)
|
||||||
|
// (adjusted with avr-gcc 4.9.2)
|
||||||
|
// 2018-8-11 add support multi-type transaction (#3608, feb5e4aae)
|
||||||
|
// (adjusted with avr-gcc 4.9.2)
|
||||||
|
// 2018-10-21 fix serial and RGB animation conflict (#4191, 4665e4fff)
|
||||||
|
// (adjusted with avr-gcc 7.3.0)
|
||||||
|
// 2018-10-28 re-adjust compiler depend value of delay (#4269, 8517f8a66)
|
||||||
|
// (adjusted with avr-gcc 5.4.0, 7.3.0)
|
||||||
|
// 2018-12-17 copy to TOP/quantum/split_common/ and remove backward compatibility code (#4669)
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
// /////////////////////////////////////////////////////////////////
|
||||||
|
// Need Soft Serial defines in config.h
|
||||||
|
// /////////////////////////////////////////////////////////////////
|
||||||
|
// ex.
|
||||||
|
// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6
|
||||||
|
// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5
|
||||||
|
// // 1: about 137kbps (default)
|
||||||
|
// // 2: about 75kbps
|
||||||
|
// // 3: about 39kbps
|
||||||
|
// // 4: about 26kbps
|
||||||
|
// // 5: about 20kbps
|
||||||
|
//
|
||||||
|
// //// USE simple API (using signle-type transaction function)
|
||||||
|
// /* nothing */
|
||||||
|
// //// USE flexible API (using multi-type transaction function)
|
||||||
|
// #define SERIAL_USE_MULTI_TRANSACTION
|
||||||
|
//
|
||||||
|
// /////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// Soft Serial Transaction Descriptor
|
||||||
|
typedef struct _SSTD_t {
|
||||||
|
uint8_t *status;
|
||||||
|
uint8_t initiator2target_buffer_size;
|
||||||
|
uint8_t *initiator2target_buffer;
|
||||||
|
uint8_t target2initiator_buffer_size;
|
||||||
|
uint8_t *target2initiator_buffer;
|
||||||
|
} SSTD_t;
|
||||||
|
#define TID_LIMIT( table ) (sizeof(table) / sizeof(SSTD_t))
|
||||||
|
|
||||||
|
// initiator is transaction start side
|
||||||
|
void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size);
|
||||||
|
// target is interrupt accept side
|
||||||
|
void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size);
|
||||||
|
|
||||||
|
// initiator resullt
|
||||||
|
#define TRANSACTION_END 0
|
||||||
|
#define TRANSACTION_NO_RESPONSE 0x1
|
||||||
|
#define TRANSACTION_DATA_ERROR 0x2
|
||||||
|
#define TRANSACTION_TYPE_ERROR 0x4
|
||||||
|
#ifndef SERIAL_USE_MULTI_TRANSACTION
|
||||||
|
int soft_serial_transaction(void);
|
||||||
|
#else
|
||||||
|
int soft_serial_transaction(int sstd_index);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// target status
|
||||||
|
// *SSTD_t.status has
|
||||||
|
// initiator:
|
||||||
|
// TRANSACTION_END
|
||||||
|
// or TRANSACTION_NO_RESPONSE
|
||||||
|
// or TRANSACTION_DATA_ERROR
|
||||||
|
// target:
|
||||||
|
// TRANSACTION_DATA_ERROR
|
||||||
|
// or TRANSACTION_ACCEPTED
|
||||||
|
#define TRANSACTION_ACCEPTED 0x8
|
||||||
|
#ifdef SERIAL_USE_MULTI_TRANSACTION
|
||||||
|
int soft_serial_get_and_clean_status(int sstd_index);
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
#include "split_flags.h"
|
||||||
|
|
||||||
|
volatile bool RGB_DIRTY = false;
|
||||||
|
|
||||||
|
volatile bool BACKLIT_DIRTY = false;
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Global Flags
|
||||||
|
**/
|
||||||
|
|
||||||
|
//RGB Stuff
|
||||||
|
extern volatile bool RGB_DIRTY;
|
||||||
|
|
||||||
|
|
||||||
|
//Backlight Stuff
|
||||||
|
extern volatile bool BACKLIT_DIRTY;
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
#include "split_util.h"
|
||||||
|
#include "matrix.h"
|
||||||
|
#include "keyboard.h"
|
||||||
|
#include "config.h"
|
||||||
|
#include "timer.h"
|
||||||
|
#include "split_flags.h"
|
||||||
|
#include "transport.h"
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#ifdef EE_HANDS
|
||||||
|
# include "tmk_core/common/eeprom.h"
|
||||||
|
# include "eeconfig.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
volatile bool isLeftHand = true;
|
||||||
|
|
||||||
|
__attribute__((weak))
|
||||||
|
bool is_keyboard_left(void) {
|
||||||
|
#ifdef SPLIT_HAND_PIN
|
||||||
|
// Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand
|
||||||
|
setPinInput(SPLIT_HAND_PIN);
|
||||||
|
return readPin(SPLIT_HAND_PIN);
|
||||||
|
#else
|
||||||
|
#ifdef EE_HANDS
|
||||||
|
return eeprom_read_byte(EECONFIG_HANDEDNESS);
|
||||||
|
#else
|
||||||
|
#ifdef MASTER_RIGHT
|
||||||
|
return !is_keyboard_master();
|
||||||
|
#else
|
||||||
|
return is_keyboard_master();
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
bool is_keyboard_master(void)
|
||||||
|
{
|
||||||
|
#ifdef __AVR__
|
||||||
|
static enum { UNKNOWN, MASTER, SLAVE } usbstate = UNKNOWN;
|
||||||
|
|
||||||
|
// only check once, as this is called often
|
||||||
|
if (usbstate == UNKNOWN)
|
||||||
|
{
|
||||||
|
USBCON |= (1 << OTGPADE); // enables VBUS pad
|
||||||
|
wait_us(5);
|
||||||
|
|
||||||
|
usbstate = (USBSTA & (1 << VBUS)) ? MASTER : SLAVE; // checks state of VBUS
|
||||||
|
}
|
||||||
|
|
||||||
|
return (usbstate == MASTER);
|
||||||
|
#else
|
||||||
|
return true;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static void keyboard_master_setup(void) {
|
||||||
|
#if defined(USE_I2C) || defined(EH)
|
||||||
|
#ifdef SSD1306OLED
|
||||||
|
matrix_master_OLED_init ();
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
transport_master_init();
|
||||||
|
|
||||||
|
// For master the Backlight info needs to be sent on startup
|
||||||
|
// Otherwise the salve won't start with the proper info until an update
|
||||||
|
BACKLIT_DIRTY = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void keyboard_slave_setup(void)
|
||||||
|
{
|
||||||
|
transport_slave_init();
|
||||||
|
}
|
||||||
|
|
||||||
|
// this code runs before the usb and keyboard is initialized
|
||||||
|
void matrix_setup(void)
|
||||||
|
{
|
||||||
|
isLeftHand = is_keyboard_left();
|
||||||
|
|
||||||
|
if (is_keyboard_master())
|
||||||
|
{
|
||||||
|
keyboard_master_setup();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
keyboard_slave_setup();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
extern volatile bool isLeftHand;
|
||||||
|
|
||||||
|
void matrix_master_OLED_init (void);
|
||||||
@@ -0,0 +1,238 @@
|
|||||||
|
|
||||||
|
#include "transport.h"
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include "matrix.h"
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#include "orbit.h"
|
||||||
|
|
||||||
|
#define ROWS_PER_HAND (MATRIX_ROWS/2)
|
||||||
|
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
# include "rgblight.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef BACKLIGHT_ENABLE
|
||||||
|
# include "backlight.h"
|
||||||
|
extern backlight_config_t backlight_config;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(USE_I2C) || defined(EH)
|
||||||
|
|
||||||
|
#include "i2c.h"
|
||||||
|
|
||||||
|
#ifndef SLAVE_I2C_ADDRESS
|
||||||
|
# define SLAVE_I2C_ADDRESS 0x32
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if (MATRIX_COLS > 8)
|
||||||
|
# error "Currently only supports 8 COLS"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Get rows from other half over i2c
|
||||||
|
bool transport_master(matrix_row_t matrix[]) {
|
||||||
|
int err = 0;
|
||||||
|
|
||||||
|
// write backlight info
|
||||||
|
#ifdef BACKLIGHT_ENABLE
|
||||||
|
if (BACKLIT_DIRTY) {
|
||||||
|
err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE);
|
||||||
|
if (err) { goto i2c_error; }
|
||||||
|
|
||||||
|
// Backlight location
|
||||||
|
err = i2c_master_write(I2C_BACKLIT_START);
|
||||||
|
if (err) { goto i2c_error; }
|
||||||
|
|
||||||
|
// Write backlight
|
||||||
|
i2c_master_write(get_backlight_level());
|
||||||
|
|
||||||
|
BACKLIT_DIRTY = false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE);
|
||||||
|
if (err) { goto i2c_error; }
|
||||||
|
|
||||||
|
// start of matrix stored at I2C_KEYMAP_START
|
||||||
|
err = i2c_master_write(I2C_KEYMAP_START);
|
||||||
|
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[i] = i2c_master_read(I2C_ACK);
|
||||||
|
}
|
||||||
|
matrix[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 false;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
if (RGB_DIRTY) {
|
||||||
|
err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE);
|
||||||
|
if (err) { goto i2c_error; }
|
||||||
|
|
||||||
|
// RGB Location
|
||||||
|
err = i2c_master_write(I2C_RGB_START);
|
||||||
|
if (err) { goto i2c_error; }
|
||||||
|
|
||||||
|
uint32_t dword = eeconfig_read_rgblight();
|
||||||
|
|
||||||
|
// Write RGB
|
||||||
|
err = i2c_master_write_data(&dword, 4);
|
||||||
|
if (err) { goto i2c_error; }
|
||||||
|
|
||||||
|
RGB_DIRTY = false;
|
||||||
|
i2c_master_stop();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void transport_slave(matrix_row_t matrix[]) {
|
||||||
|
|
||||||
|
for (int i = 0; i < ROWS_PER_HAND; ++i)
|
||||||
|
{
|
||||||
|
i2c_slave_buffer[I2C_KEYMAP_START + i] = matrix[i];
|
||||||
|
}
|
||||||
|
// Read Backlight Info
|
||||||
|
#ifdef BACKLIGHT_ENABLE
|
||||||
|
if (BACKLIT_DIRTY)
|
||||||
|
{
|
||||||
|
backlight_set(i2c_slave_buffer[I2C_BACKLIT_START]);
|
||||||
|
BACKLIT_DIRTY = false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
if (RGB_DIRTY)
|
||||||
|
{
|
||||||
|
// Disable interupts (RGB data is big)
|
||||||
|
cli();
|
||||||
|
// Create new DWORD for RGB data
|
||||||
|
uint32_t dword;
|
||||||
|
|
||||||
|
// Fill the new DWORD with the data that was sent over
|
||||||
|
uint8_t * dword_dat = (uint8_t *)(&dword);
|
||||||
|
for (int i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
dword_dat[i] = i2c_slave_buffer[I2C_RGB_START + i];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update the RGB now with the new data and set RGB_DIRTY to false
|
||||||
|
rgblight_update_dword(dword);
|
||||||
|
RGB_DIRTY = false;
|
||||||
|
// Re-enable interupts now that RGB is set
|
||||||
|
sei();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void transport_master_init(void) {
|
||||||
|
i2c_master_init();
|
||||||
|
}
|
||||||
|
|
||||||
|
void transport_slave_init(void) {
|
||||||
|
i2c_slave_init(SLAVE_I2C_ADDRESS);
|
||||||
|
}
|
||||||
|
|
||||||
|
#else // USE_SERIAL
|
||||||
|
|
||||||
|
#include "serial.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
volatile Serial_s2m_buffer_t serial_s2m_buffer = {};
|
||||||
|
volatile Serial_m2s_buffer_t serial_m2s_buffer = {};
|
||||||
|
uint8_t volatile status0 = 0;
|
||||||
|
|
||||||
|
SSTD_t transactions[] = {
|
||||||
|
{ (uint8_t *)&status0,
|
||||||
|
sizeof(serial_m2s_buffer), (uint8_t *)&serial_m2s_buffer,
|
||||||
|
sizeof(serial_s2m_buffer), (uint8_t *)&serial_s2m_buffer
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
uint8_t slave_layer_cache;
|
||||||
|
uint8_t slave_nlock_cache;
|
||||||
|
uint8_t slave_clock_cache;
|
||||||
|
uint8_t slave_slock_cache;
|
||||||
|
|
||||||
|
void transport_master_init(void)
|
||||||
|
{ soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); }
|
||||||
|
|
||||||
|
void transport_slave_init(void)
|
||||||
|
{
|
||||||
|
soft_serial_target_init(transactions, TID_LIMIT(transactions));
|
||||||
|
slave_layer_cache = 255;
|
||||||
|
slave_nlock_cache = 255;
|
||||||
|
slave_clock_cache = 255;
|
||||||
|
slave_slock_cache = 255;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool transport_master(matrix_row_t matrix[]) {
|
||||||
|
|
||||||
|
if (soft_serial_transaction()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: if MATRIX_COLS > 8 change to unpack()
|
||||||
|
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||||
|
matrix[i] = serial_s2m_buffer.smatrix[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
|
||||||
|
// Code to send RGB over serial goes here (not implemented yet)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef BACKLIGHT_ENABLE
|
||||||
|
// Write backlight level for slave to read
|
||||||
|
serial_m2s_buffer.backlight_level = backlight_config.enable ? backlight_config.level : 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void transport_slave(matrix_row_t matrix[]) {
|
||||||
|
|
||||||
|
// TODO: if MATRIX_COLS > 8 change to pack()
|
||||||
|
for (int i = 0; i < ROWS_PER_HAND; ++i)
|
||||||
|
{
|
||||||
|
serial_s2m_buffer.smatrix[i] = matrix[i];
|
||||||
|
}
|
||||||
|
#ifdef BACKLIGHT_ENABLE
|
||||||
|
backlight_set(serial_m2s_buffer.backlight_level);
|
||||||
|
#endif
|
||||||
|
#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
|
||||||
|
// Add serial implementation for RGB here
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (slave_layer_cache != serial_m2s_buffer.current_layer) {
|
||||||
|
slave_layer_cache = serial_m2s_buffer.current_layer;
|
||||||
|
set_layer_indicators(slave_layer_cache);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (slave_nlock_cache != serial_m2s_buffer.nlock_led) {
|
||||||
|
slave_nlock_cache = serial_m2s_buffer.nlock_led;
|
||||||
|
led_toggle(3, slave_nlock_cache);
|
||||||
|
}
|
||||||
|
if (slave_clock_cache != serial_m2s_buffer.clock_led) {
|
||||||
|
slave_clock_cache = serial_m2s_buffer.clock_led;
|
||||||
|
led_toggle(4, slave_clock_cache);
|
||||||
|
}
|
||||||
|
if (slave_slock_cache != serial_m2s_buffer.slock_led) {
|
||||||
|
slave_slock_cache = serial_m2s_buffer.slock_led;
|
||||||
|
led_toggle(5, slave_slock_cache);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <common/matrix.h>
|
||||||
|
|
||||||
|
#define ROWS_PER_HAND (MATRIX_ROWS/2)
|
||||||
|
|
||||||
|
typedef struct _Serial_s2m_buffer_t {
|
||||||
|
// TODO: if MATRIX_COLS > 8 change to uint8_t packed_matrix[] for pack/unpack
|
||||||
|
matrix_row_t smatrix[ROWS_PER_HAND];
|
||||||
|
} Serial_s2m_buffer_t;
|
||||||
|
|
||||||
|
typedef struct _Serial_m2s_buffer_t {
|
||||||
|
#ifdef BACKLIGHT_ENABLE
|
||||||
|
uint8_t backlight_level;
|
||||||
|
#endif
|
||||||
|
#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
|
||||||
|
rgblight_config_t rgblight_config; //not yet use
|
||||||
|
//
|
||||||
|
// When MCUs on both sides drive their respective RGB LED chains,
|
||||||
|
// it is necessary to synchronize, so it is necessary to communicate RGB information.
|
||||||
|
// In that case, define the RGBLIGHT_SPLIT macro.
|
||||||
|
//
|
||||||
|
// Otherwise, if the master side MCU drives both sides RGB LED chains,
|
||||||
|
// there is no need to communicate.
|
||||||
|
#endif
|
||||||
|
|
||||||
|
uint8_t current_layer;
|
||||||
|
uint8_t nlock_led;
|
||||||
|
uint8_t clock_led;
|
||||||
|
uint8_t slock_led;
|
||||||
|
|
||||||
|
} Serial_m2s_buffer_t;
|
||||||
|
|
||||||
|
extern volatile Serial_s2m_buffer_t serial_s2m_buffer;
|
||||||
|
extern volatile Serial_m2s_buffer_t serial_m2s_buffer;
|
||||||
|
|
||||||
|
void transport_master_init(void);
|
||||||
|
void transport_slave_init(void);
|
||||||
|
|
||||||
|
// returns false if valid data not received from slave
|
||||||
|
bool transport_master(matrix_row_t matrix[]);
|
||||||
|
void transport_slave(matrix_row_t matrix[]);
|
||||||
@@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
*/
|
*/
|
||||||
[_LW] = LAYOUT( /* [> LOWER <] */
|
[_LW] = LAYOUT( /* [> LOWER <] */
|
||||||
KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 ,
|
KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 ,
|
||||||
KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 ,
|
KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 ,
|
||||||
KC_NO, KC_VOLU, KC_NO, KC_NO, RESET, KC_NO, KC_F1, KC_F2, KC_F3, KC_F12 ,
|
KC_NO, KC_VOLU, KC_NO, KC_NO, RESET, KC_NO, KC_F1, KC_F2, KC_F3, KC_F12 ,
|
||||||
KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, TO(_QW), KC_PSCR, KC_SLCK, KC_PAUS )
|
KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, TO(_QW), KC_PSCR, KC_SLCK, KC_PAUS )
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,77 +1,103 @@
|
|||||||
# Overview
|
# Overview
|
||||||
|
|
||||||
A Balance 12 layout for the Atreus keyboard.
|
This layout is based on Balance Twelve (mirror variant) by Sasha Viminitz. Please see [this page](https://mathematicalmulticore.wordpress.com/the-keyboard-layout-project/)
|
||||||
|
for more information. It's designed for left-handers who use their right hand for the mouse.
|
||||||
|
|
||||||
Balance 12 was created by Sasha Viminitz. Please see [this page](https://mathematicalmulticore.wordpress.com/the-keyboard-layout-project/)
|
## To build
|
||||||
for some background on the design of the layout.
|
|
||||||
|
|
||||||
* The variant used here is a mirror of the original for left-handers
|
```
|
||||||
* The central column of punctuation keys has been moved elsewhere
|
sudo make atreus:yttyx
|
||||||
* Home positions for the left and right forefingers are *T* and *A* respectively
|
```
|
||||||
|
|
||||||
## To build/flash
|
## To flash (example)
|
||||||
|
|
||||||
> make atreus:yttyx:avrdude
|
```
|
||||||
|
sudo avrdude -p atmega32u4 -c avr109 -U flash:w:atreus_yttyx.hex -P /dev/ttyACM0
|
||||||
|
```
|
||||||
|
|
||||||
## Layers
|
## Layers
|
||||||
|
|
||||||
### Base:
|
### Base:
|
||||||
|
|
||||||
.----------------------------------. .------------------------------.
|
.--------.-------.-------.-------.--------. .-------.-------.-------.-------.------.
|
||||||
| P | L | C | D | W | | U | O | Y | K | Q |
|
| P | L | C | D | W | | U | O | Y | K | Q |
|
||||||
+------+------+------+-----+-------| |------+-----+-----+-----+-----|
|
|--------+-------+-------+-------+--------| |-------+-------+-------+-------+------|
|
||||||
| N | R | S | T | M | | A | E | I | H | V |
|
| N | R | S | T | M | | A | E | I | H | V |
|
||||||
+------+------+------+-----+-------| |------+-----+-----+-----+-----|
|
|--------+-------+-------+-------+--------| |-------+-------+-------+-------+------|
|
||||||
| Z | J | F | G | B | | , | . | ; | X | - |
|
| Z Sft | J Ctl | F Alt | G | B | | , | . Alt | ; Ctl | X Sft | Sup |
|
||||||
+------+------+------+-----+-------+---------+------+-----+-----+-----+-----|
|
'--------'-------'-------+-------+--------+-----. .-----+-------+-------+-------'-------'------'
|
||||||
| Shft | Ctl | Alt | BS | Space | L1 | R1 | Shft | R2 | Win | Ctl | Alt |
|
| BS P1 | Spc P2 | P3 | | | Sft | |
|
||||||
'---------------------------------------------------------------------------'
|
'-------'--------'-----' '-----'-------'-------'
|
||||||
|
|
||||||
### L1:
|
### P1: Punctuation (1)
|
||||||
|
|
||||||
.---------------------------------. .--------------------------------.
|
|
||||||
| 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |
|
|
||||||
|------+------+------+----+-------| |------+----+-----+------+-------|
|
|
||||||
| Tab | ? | = | - | _ | | ' | " | + | * | Enter |
|
|
||||||
|------+------+------+----+-------| |------+----+-----+------+-------|
|
|
||||||
| Esc | ! | & | | | | , | . | ; | | - |
|
|
||||||
|------+------+------+----+-------+---------+------+----+-----+------+-------|
|
|
||||||
| Shft | Ctrl | Alt | Bk | Space | L1 | R1 | Shft | R2 | Sup | Ctrl | Alt |
|
|
||||||
'----------------------------------------------------------------------------'
|
|
||||||
|
|
||||||
### R1:
|
.--------.-------.-------.-------.-------. .------.-------.-------.-------.------.
|
||||||
|
| Esc | | | | RS | | | | / | ^ | £ | ~ |
|
||||||
|
|--------+-------+-------+-------+-------| |------+-------+-------+-------+------|
|
||||||
|
| Tab | | | | | | & | \ | ` | $ | Ent |
|
||||||
|
|--------+-------+-------+-------+-------| |------+-------+-------+-------+------|
|
||||||
|
| Sft | Ctl | Alt | Del | | | % | Alt | Ctl | Sft | Sup |
|
||||||
|
'--------'-------'-------+-------+-------+-----. .-----+------+-------+-------'-------'------'
|
||||||
|
| P1 | | | | | Sft | |
|
||||||
|
'-------'-------'-----' '-----'------'-------'
|
||||||
|
|
||||||
.---------------------------------. .-------------------------------.
|
### P2: Punctuation (2)
|
||||||
| < | > | { | } | @ | | $ | £ | | | R3 |
|
|
||||||
+------+------+-----+-----|-------| |------+----+-----+------+------|
|
|
||||||
| [ | ] | ( | ) | # | | ' | " | ~ | ` | Caps |
|
|
||||||
|------+------+-----+-----+-------| |------+----+-----+------+------|
|
|
||||||
| / | \ | ^ | | | % | | , | . | ; | | PScn |
|
|
||||||
|------+------+-----+-----+-------+---------+------+----+-----+------+------|
|
|
||||||
| Shft | Ctrl | Alt | Del | Space | L1 | R1 | Shft | R2 | Sup | Ctrl | Alt |
|
|
||||||
'---------------------------------------------------------------------------'
|
|
||||||
|
|
||||||
### R2:
|
.-------.-------.-------.-------.-------. .-------.-------.-------.-------.------.
|
||||||
|
| Esc | | NC | FV | | | ( | ) | " | ? | |
|
||||||
|
|-------+-------+-------+-------+-------| |-------+-------+-------+-------+------|
|
||||||
|
| Tab | Ctl-X | Ctl-C | Ctl-V | Ctl-Z | | { | } | ' | ! | Ent |
|
||||||
|
|-------+-------+-------+-------+-------| |-------+-------+-------+-------+------|
|
||||||
|
| Sft | Ctl | Alt | Del | Ent | | # | Alt | Ctl | Sft | Sup |
|
||||||
|
'-------'-------'-------+-------+-------+-----. .-----+-------+-------+-------'-------'------'
|
||||||
|
| BS | P2 | | | | Sft | |
|
||||||
|
'-------'-------'-----' '-----'-------'-------'
|
||||||
|
|
||||||
.-----------------------------------. .--------------------.-----------------.
|
### P3: Punctuation (3)
|
||||||
| F12 | F11 | F10 | F9 | Copy | | Home | Up | End | PgUp | Insert |
|
|
||||||
|------+------+------+------+-------| |------+------+------+------+----------|
|
|
||||||
| F8 | F7 | F6 | F5 | Paste | | Left | Down | Right| PgDn | Enter |
|
|
||||||
|------+------+------+------+-------| |------+------+------+------+----------|
|
|
||||||
| F4 | F3 | F2 | F1 | Cut | | ^Tab | | Tab | | |
|
|
||||||
|------+------+------+------+-------+---------+------+------+------+------+----------|
|
|
||||||
| Shft | Ctrl | Alt | Del | Undo | L1 | R1 | Shft | R2 | Sup | Ctrl | WinRight |
|
|
||||||
'------------------------------------------------------------------------------------'
|
|
||||||
|
|
||||||
### R3:
|
.-------.-------.-------.-------.-------. .------.-------.-------.-------.------.
|
||||||
|
| Esc | | Break | Pscr | ScLk | | < | > | + | _ | = |
|
||||||
|
|-------+-------+-------+-------+-------| |------+-------+-------+-------+------|
|
||||||
|
| Tab | | | Caps | | | [ | ] | * | - | Ent |
|
||||||
|
|-------+-------+-------+-------+-------| |------+-------+-------+-------+------|
|
||||||
|
| Sft | Ctl | Alt | Del | | | @ | Alt | Ctl | Sft | Sup |
|
||||||
|
'-------'-------'-------+-------+-------+-----. .-----+------+-------+-------'-------'------'
|
||||||
|
| BS | | P3 | | | Sft | |
|
||||||
|
'-------'-------'-----' '-----'------'-------'
|
||||||
|
|
||||||
.----------------------------. .------------------------.
|
### Numerals / Cursor control
|
||||||
| RESET | | | | | | | | | | R3 |
|
|
||||||
|-------+----+-----+----+----| |----+----+----+----+----|
|
|
||||||
| | | | | | | | | | | |
|
|
||||||
|-------+----+-----+----+----| |----+----+----+----+----|
|
|
||||||
| | | | | | | | | | | |
|
|
||||||
|-------+----+-----+----+----+---------+----+----+----+----+----|
|
|
||||||
| | | | | | | | | | | | |
|
|
||||||
'---------------------------------------------------------------'
|
|
||||||
|
|
||||||
|
.-------.-------.-------.------.-------. .------.-------.-------.------.------.
|
||||||
|
| 1 | 2 | 3 | 4 | 5 | | Home | Up | End | PgUp | |
|
||||||
|
|-------+-------+-------+------+-------| |------+-------+-------+------+------|
|
||||||
|
| 6 | 7 | 8 | 9 | 0 | | Left | Down | Right | PgDn | |
|
||||||
|
|-------+-------+-------+------+-------| |------+-------+-------+------+------|
|
||||||
|
| Sft | Ctl | Alt | Del | . | | Ins | Alt | Ctl | Sft | Sup |
|
||||||
|
'-------'-------'-------+------+-------+-----. .-----+------+-------+-------'------'------'
|
||||||
|
| BS | BA | | | | Sft | |
|
||||||
|
'------'-------'-----' '-----'------'-------'
|
||||||
|
|
||||||
|
### FV: Function keys / Cursor control (Vim)
|
||||||
|
|
||||||
|
.-------.------.-------.-----.-------. .------.-------.-----.-------.------.
|
||||||
|
| F1 | F2 | F3 | F4 | F5 | | 0 | K | $ | Ctl-B | |
|
||||||
|
|-------+------+-------+-----+-------| |------+-------+-----+-------+------|
|
||||||
|
| F6 | F7 | F8 | F9 | F10 | | H | J | L | Ctl-F | |
|
||||||
|
|-------+------+-------+-----+-------| |------+-------+-----+-------+------|
|
||||||
|
| Sft | Ctl | Alt | F11 | F12 | | | Alt | Ctl | Sft | Sup |
|
||||||
|
'-------'------'-------+-----+-------+-----. .-----+------+-------+-----'-------'------'
|
||||||
|
| BS | BA | | | | Sft | |
|
||||||
|
'-----'-------'-----' '-----'------'-------'
|
||||||
|
|
||||||
|
### RS: Reset
|
||||||
|
|
||||||
|
.-------.------.-------.-----.-------. .------.-------.-----.-------.------.
|
||||||
|
| RESET | | | | | | | | | | |
|
||||||
|
|-------+------+-------+-----+-------| |------+-------+-----+-------+------|
|
||||||
|
| | | | | | | | | | | |
|
||||||
|
|-------+------+-------+-----+-------| |------+-------+-----+-------+------|
|
||||||
|
| | | | | | | | | | | |
|
||||||
|
'-------'------'-------+-----+-------+-----. .-----+------+-------+-----'-------'------'
|
||||||
|
| | BA | | | | | |
|
||||||
|
'-----'-------'-----' '-----'------'-------'
|
||||||
@@ -1,12 +1,4 @@
|
|||||||
#ifndef CONFIG_H
|
#pragma once
|
||||||
#define CONFIG_H
|
#define NO_ACTION_ONESHOT
|
||||||
|
|
||||||
#define ONESHOT_TIMEOUT 500 // Time (in ms) before the one shot key is released
|
|
||||||
|
|
||||||
// Disable some options to reduce firmware size
|
|
||||||
#define NO_PRINT
|
|
||||||
#define NO_ACTION_TAPPING
|
|
||||||
#define NO_ACTION_MACRO
|
#define NO_ACTION_MACRO
|
||||||
#define NO_ACTION_FUNCTION
|
#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -2,115 +2,158 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
enum layers {
|
enum layers {
|
||||||
BASE, // Balance Twelve
|
BA, // Base (Balance Twelve mirror variant)
|
||||||
L1, // (momentary)
|
P1, // Punctuation (1)
|
||||||
R1, // (momentary)
|
P2, // Punctuation (2)
|
||||||
R2, // (momentary)
|
P3, // Punctuation (2)
|
||||||
R3 // (momentary)
|
NC, // Numerals / Cursor control
|
||||||
|
FV, // Function keys / Cursor control (Vim)
|
||||||
|
RS // Reset
|
||||||
};
|
};
|
||||||
|
|
||||||
// Aliases from replicaJunction's atreus layout
|
// Abbreviations - base
|
||||||
#define KCX_LST LSFT(KC_TAB)
|
#define KX_P1_BSPC LT(P1, KC_BSPC)
|
||||||
#define KX_COPY LCTL(KC_C)
|
#define KX_P2_SPC LT(P2, KC_SPC)
|
||||||
#define KX_CUT LCTL(KC_X)
|
|
||||||
#define KX_PAST LCTL(KC_V)
|
|
||||||
#define KX_UNDO LCTL(KC_Z)
|
|
||||||
|
|
||||||
#define KX_AT LSFT(KC_QUOT)
|
#define KX_SFT_Z MT(MOD_LSFT, KC_Z)
|
||||||
#define KX_PIPE LSFT(KC_NUBS)
|
#define KX_CTL_J MT(MOD_LCTL, KC_J)
|
||||||
#define KX_WINR LSFT(LGUI(KC_RGHT)) // Move window to next monitor (Windows)
|
#define KX_ALT_F MT(MOD_LALT, KC_F)
|
||||||
|
|
||||||
|
#define KX_ALT_DOT MT(MOD_LALT, KC_DOT)
|
||||||
|
#define KX_CTL_SCLN MT(MOD_LCTL, KC_SCLN)
|
||||||
|
#define KX_SFT_X MT(MOD_LSFT, KC_X)
|
||||||
|
|
||||||
|
#define KX_AT LSFT(KC_QUOT)
|
||||||
|
#define KX_DQUOT LSFT(KC_2)
|
||||||
|
#define KX_PIPE LSFT(KC_NUBS)
|
||||||
|
#define KX_TILDA LSFT(KC_NUHS)
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][ MATRIX_ROWS ][ MATRIX_COLS ] = {
|
const uint16_t PROGMEM keymaps[][ MATRIX_ROWS ][ MATRIX_COLS ] = {
|
||||||
|
/*
|
||||||
/* Balance Twelve mirror variant (left-handed)
|
.--------.-------.-------.-------.--------. .-------.-------.-------.-------.------.
|
||||||
.--------------------------------. .------------------------------.
|
| P | L | C | D | W | | U | O | Y | K | Q |
|
||||||
| P | L | C | D | W | | U | O | Y | K | Q |
|
|--------+-------+-------+-------+--------| |-------+-------+-------+-------+------|
|
||||||
+------+------+-----+----+-------| |------+----+-----+------+-----|
|
| N | R | S | T | M | | A | E | I | H | V |
|
||||||
| N | R | S | T | M | | A | E | I | H | V |
|
|--------+-------+-------+-------+--------| |-------+-------+-------+-------+------|
|
||||||
+------+------+-----+----+-------| |------+----+-----+------+-----|
|
| Z Sft | J Ctl | F Alt | G | B | | , | . Alt | ; Ctl | X Sft | Sup |
|
||||||
| Z | J | F | G | B | | , | . | ; | X | - |
|
'--------'-------'-------+-------+--------+-----. .-----+-------+-------+-------'-------'------'
|
||||||
+------+------+-----+----+-------+---------+------+----+-----+------+-----|
|
| BS P1 | Spc P2 | P3 | | | Sft | |
|
||||||
| Shft | Ctrl | Alt | Bk | Space | L1 | R1 | Shft | R2 | Win | Ctrl | Alt |
|
'-------'--------'-----' '-----'-------'-------'
|
||||||
'-------------------------------------------------------------------------'
|
*/
|
||||||
*/
|
[BA] = LAYOUT(
|
||||||
[BASE] = LAYOUT(
|
KC_P, KC_L, KC_C, KC_D, KC_W, KC_U, KC_O, KC_Y, KC_K, KC_Q,
|
||||||
KC_P, KC_L, KC_C, KC_D, KC_W, KC_U, KC_O, KC_Y, KC_K, KC_Q,
|
KC_N, KC_R, KC_S, KC_T, KC_M, KC_A, KC_E, KC_I, KC_H, KC_V,
|
||||||
KC_N, KC_R, KC_S, KC_T, KC_M, KC_A, KC_E, KC_I, KC_H, KC_V,
|
KX_SFT_Z, KX_CTL_J, KX_ALT_F, KC_G, KC_B, KC_COMM, KX_ALT_DOT, KX_CTL_SCLN, KX_SFT_X, KC_LGUI,
|
||||||
KC_Z, KC_J, KC_F, KC_G, KC_B, KC_COMM, KC_DOT, KC_SCLN, KC_X, KC_MINS,
|
XXXXXXX, XXXXXXX, XXXXXXX, KX_P1_BSPC, KX_P2_SPC, MO(P3), XXXXXXX, KC_RSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||||
KC_LSFT, KC_LCTL, KC_LALT, KC_BSPC, KC_SPC, MO(L1), MO(R1), OSM(MOD_LSFT), MO(R2), KC_LWIN, KC_RCTL, KC_RALT
|
|
||||||
),
|
),
|
||||||
|
|
||||||
/* L1
|
/* P1: Punctuation (1)
|
||||||
.---------------------------------. .--------------------------------.
|
.--------.-------.-------.-------.-------. .------.-------.-------.-------.------.
|
||||||
| 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |
|
| Esc | | | | RS | | | | / | ^ | £ | ~ |
|
||||||
|------+------+------+----+-------| |------+----+-----+------+-------|
|
|--------+-------+-------+-------+-------| |------+-------+-------+-------+------|
|
||||||
| Tab | ? | = | - | _ | | ' | " | + | * | Enter |
|
| Tab | | | | | | & | \ | ` | $ | Ent |
|
||||||
|------+------+------+----+-------| |------+----+-----+------+-------|
|
|--------+-------+-------+-------+-------| |------+-------+-------+-------+------|
|
||||||
| Esc | ! | & | | | | , | . | ; | | - |
|
| Sft | Ctl | Alt | Del | | | % | Alt | Ctl | Sft | Sup |
|
||||||
|------+------+------+----+-------+---------+------+----+-----+------+-------|
|
'--------'-------'-------+-------+-------+-----. .-----+------+-------+-------'-------'------'
|
||||||
| Shft | Ctrl | Alt | Bk | Space | L1 | R1 | Shft | R2 | Sup | Ctrl | Alt |
|
| P1 | | | | | Sft | |
|
||||||
'----------------------------------------------------------------------------'
|
'-------'-------'-----' '-----'------'-------'
|
||||||
*/
|
*/
|
||||||
[L1] = LAYOUT(
|
[P1] = LAYOUT(
|
||||||
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
|
KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, TO(RS), KX_PIPE, KC_SLSH, KC_CIRC, KC_HASH, KX_TILDA,
|
||||||
KC_TAB, KC_QUES, KC_EQL, KC_MINS, KC_UNDS, KC_QUOT, LSFT(KC_2), KC_PLUS, KC_ASTR, KC_ENT,
|
KC_TAB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_AMPR, KC_NUBS, KC_GRV, KC_DLR, KC_ENT,
|
||||||
KC_ESC, KC_EXLM, KC_AMPR, XXXXXXX, XXXXXXX, _______, _______, _______, XXXXXXX, _______,
|
KC_LSFT, KC_LCTL, KC_LALT, KC_DEL, XXXXXXX, KC_PERC, KC_LALT, KC_LCTL, KC_LSFT, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||||
),
|
),
|
||||||
|
|
||||||
/* R1
|
/* P2: Punctuation (2)
|
||||||
.---------------------------------. .-------------------------------.
|
.-------.-------.-------.-------.-------. .-------.-------.-------.-------.------.
|
||||||
| < | > | { | } | @ | | $ | £ | | | R3 |
|
| Esc | | NC | FV | | | ( | ) | " | ? | |
|
||||||
+------+------+-----+-----|-------| |------+----+-----+------+------|
|
|-------+-------+-------+-------+-------| |-------+-------+-------+-------+------|
|
||||||
| [ | ] | ( | ) | # | | ' | " | ~ | ` | Caps |
|
| Tab | Ctl-X | Ctl-C | Ctl-V | Ctl-Z | | { | } | ' | ! | Ent |
|
||||||
|------+------+-----+-----+-------| |------+----+-----+------+------|
|
|-------+-------+-------+-------+-------| |-------+-------+-------+-------+------|
|
||||||
| / | \ | ^ | | | % | | , | . | ; | | PScn |
|
| Sft | Ctl | Alt | Del | Ent | | # | Alt | Ctl | Sft | Sup |
|
||||||
|------+------+-----+-----+-------+---------+------+----+-----+------+------|
|
'-------'-------'-------+-------+-------+-----. .-----+-------+-------+-------'-------'------'
|
||||||
| Shft | Ctrl | Alt | Del | Space | L1 | R1 | Shft | R2 | Sup | Ctrl | Alt |
|
| BS | P2 | | | | Sft | |
|
||||||
'---------------------------------------------------------------------------'
|
'-------'-------'-----' '-----'-------'-------'
|
||||||
*/
|
*/
|
||||||
[R1] = LAYOUT(
|
[P2] = LAYOUT(
|
||||||
KC_LABK, KC_RABK, KC_LCBR, KC_RCBR, KX_AT, KC_DLR, KC_HASH, XXXXXXX, XXXXXXX, MO(R3),
|
KC_ESC, XXXXXXX, TO(NC), TO(FV), XXXXXXX, KC_LPRN, KC_RPRN, KX_DQUOT, KC_QUES, XXXXXXX,
|
||||||
KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_NUHS, KC_QUOT, LSFT(KC_2), LSFT(KC_NUHS), KC_GRV, KC_CAPS,
|
KC_TAB, LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), LCTL(KC_Z), KC_LCBR, KC_RCBR, KC_QUOT, KC_EXLM, KC_ENT,
|
||||||
KC_SLSH, KC_NUBS, KC_CIRC, KX_PIPE, KC_PERC, _______, _______, _______, XXXXXXX, KC_PSCR,
|
KC_LSFT, KC_LCTL, KC_LALT, KC_DEL, KC_ENT, KC_NUHS, KC_LALT, KC_LCTL, KC_LSFT, _______,
|
||||||
_______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______, _______, _______
|
XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||||
),
|
),
|
||||||
|
|
||||||
/* R2
|
/* P3: Punctuation (3)
|
||||||
.-----------------------------------. .--------------------.-----------------.
|
.-------.-------.-------.-------.-------. .------.-------.-------.-------.------.
|
||||||
| F12 | F11 | F10 | F9 | Copy | | Home | Up | End | PgUp | Insert |
|
| Esc | | Break | Pscr | ScLk | | < | > | + | _ | = |
|
||||||
|------+------+------+------+-------| |------+------+------+------+----------|
|
|-------+-------+-------+-------+-------| |------+-------+-------+-------+------|
|
||||||
| F8 | F7 | F6 | F5 | Paste | | Left | Down | Right| PgDn | Enter |
|
| Tab | | | Caps | | | [ | ] | * | - | Ent |
|
||||||
|------+------+------+------+-------| |------+------+------+------+----------|
|
|-------+-------+-------+-------+-------| |------+-------+-------+-------+------|
|
||||||
| F4 | F3 | F2 | F1 | Cut | | ^Tab | | Tab | | |
|
| Sft | Ctl | Alt | Del | | | @ | Alt | Ctl | Sft | Sup |
|
||||||
|------+------+------+------+-------+---------+------+------+------+------+----------|
|
'-------'-------'-------+-------+-------+-----. .-----+------+-------+-------'-------'------'
|
||||||
| Shft | Ctrl | Alt | Del | Undo | L1 | R1 | Shft | R2 | Sup | Ctrl | WinRight |
|
| BS | | P3 | | | Sft | |
|
||||||
'------------------------------------------------------------------------------------'
|
'-------'-------'-----' '-----'------'-------'
|
||||||
*/
|
*/
|
||||||
[R2] = LAYOUT(
|
[P3] = LAYOUT(
|
||||||
KC_F12, KC_F11, KC_F10, KC_F9, KX_COPY, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_INS,
|
KC_ESC, XXXXXXX, KC_BRK, KC_PSCR, KC_SLCK, KC_LABK, KC_RABK, KC_PLUS, KC_UNDS, KC_EQL,
|
||||||
KC_F8, KC_F7, KC_F6, KC_F5, KX_PAST, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_ENT,
|
KC_TAB, XXXXXXX, XXXXXXX, KC_CAPS, XXXXXXX, KC_LBRC, KC_RBRC, KC_ASTR, KC_MINS, KC_ENT,
|
||||||
KC_F4, KC_F3, KC_F2, KC_F1, KX_CUT, KCX_LST, XXXXXXX, KC_TAB, XXXXXXX, XXXXXXX,
|
KC_LSFT, KC_LCTL, KC_LALT, KC_DEL, XXXXXXX, KX_AT, KC_LALT, KC_LCTL, KC_LSFT, _______,
|
||||||
_______, _______, _______, KC_DEL, KX_UNDO, _______, _______, _______, _______, _______, _______, KX_WINR
|
XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, XXXXXXX, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||||
),
|
),
|
||||||
|
|
||||||
/* R3
|
/* NC: Numerals / Cursor control
|
||||||
.----------------------------. .------------------------.
|
.-------.-------.-------.------.-------. .------.-------.-------.------.------.
|
||||||
| RESET | | | | | | | | | | R3 |
|
| 1 | 2 | 3 | 4 | 5 | | Home | Up | End | PgUp | |
|
||||||
|-------+----+-----+----+----| |----+----+----+----+----|
|
|-------+-------+-------+------+-------| |------+-------+-------+------+------|
|
||||||
| | | | | | | | | | | |
|
| 6 | 7 | 8 | 9 | 0 | | Left | Down | Right | PgDn | |
|
||||||
|-------+----+-----+----+----| |----+----+----+----+----|
|
|-------+-------+-------+------+-------| |------+-------+-------+------+------|
|
||||||
| | | | | | | | | | | |
|
| Sft | Ctl | Alt | Del | . | | Ins | Alt | Ctl | Sft | Sup |
|
||||||
|-------+----+-----+----+----+---------+----+----+----+----+----|
|
'-------'-------'-------+------+-------+-----. .-----+------+-------+-------'------'------'
|
||||||
| | | | | | | | | | | | |
|
| BS | BA | | | | Sft | |
|
||||||
'---------------------------------------------------------------'
|
'------'-------'-----' '-----'------'-------'
|
||||||
*/
|
*/
|
||||||
[R3] = LAYOUT(
|
[NC] = LAYOUT(
|
||||||
RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
|
KC_1, KC_2, KC_3, KC_4, KC_5, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX,
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
KC_6, KC_7, KC_8, KC_9, KC_0, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX,
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
KC_LSFT, KC_LCTL, KC_LALT, KC_DEL, KC_DOT, KC_INS, KC_LALT, KC_LCTL, KC_LSFT, _______,
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, TO(BA), XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||||
|
),
|
||||||
|
|
||||||
|
/* FV: Function keys / Cursor control (Vim)
|
||||||
|
.-------.------.-------.-----.-------. .------.-------.-----.-------.------.
|
||||||
|
| F1 | F2 | F3 | F4 | F5 | | 0 | K | $ | Ctl-B | |
|
||||||
|
|-------+------+-------+-----+-------| |------+-------+-----+-------+------|
|
||||||
|
| F6 | F7 | F8 | F9 | F10 | | H | J | L | Ctl-F | |
|
||||||
|
|-------+------+-------+-----+-------| |------+-------+-----+-------+------|
|
||||||
|
| Sft | Ctl | Alt | F11 | F12 | | | Alt | Ctl | Sft | Sup |
|
||||||
|
'-------'------'-------+-----+-------+-----. .-----+------+-------+-----'-------'------'
|
||||||
|
| BS | BA | | | | Sft | |
|
||||||
|
'-----'-------'-----' '-----'------'-------'
|
||||||
|
*/
|
||||||
|
[FV] = LAYOUT(
|
||||||
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_0, KC_K, KC_DLR, LCTL(KC_B), XXXXXXX,
|
||||||
|
KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_H, KC_J, KC_L, LCTL(KC_F), XXXXXXX,
|
||||||
|
KC_LSFT, KC_LCTL, KC_LALT, KC_F11, KC_F12, XXXXXXX, KC_LALT, KC_LCTL, KC_LSFT, _______,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, TO(BA), XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||||
|
),
|
||||||
|
|
||||||
|
/* RS: Reset
|
||||||
|
.-------.------.-------.-----.-------. .------.-------.-----.-------.------.
|
||||||
|
| RESET | | | | | | | | | | |
|
||||||
|
|-------+------+-------+-----+-------| |------+-------+-----+-------+------|
|
||||||
|
| | | | | | | | | | | |
|
||||||
|
|-------+------+-------+-----+-------| |------+-------+-----+-------+------|
|
||||||
|
| | | | | | | | | | | |
|
||||||
|
'-------'------'-------+-----+-------+-----. .-----+------+-------+-----'-------'------'
|
||||||
|
| | BA | | | | | |
|
||||||
|
'-----'-------'-----' '-----'------'-------'
|
||||||
|
*/
|
||||||
|
[RS] = LAYOUT(
|
||||||
|
RESET, 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, TO(BA), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT_ortho_5x14( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, \
|
||||||
|
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k410, k411, k412, k413 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013 }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113 }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213 }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313 }, \
|
||||||
|
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k410, k411, k412, k413 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_ortho_hhkb( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, \
|
||||||
|
k41, k42, k43, k44, k45, k47, k49, k410, k411, k412 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013 }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113 }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213 }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313 }, \
|
||||||
|
{ KC_NO, k41, k42, k43, k44, k45, KC_NO, k47, KC_NO, k49, k410, k411, k412, KC_NO } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_ortho_7u( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, \
|
||||||
|
k41, k42, k46, k411, k412 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013 }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113 }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213 }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313 }, \
|
||||||
|
{ KC_NO, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, KC_NO, k411, k412, KC_NO } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_2u_arrow( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, \
|
||||||
|
k40, k41, k42, k43, k44, k46, k48, k49, k410, k411, k412, k413 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013 }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113 }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213 }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313 }, \
|
||||||
|
{ k40, k41, k42, k43, k44, KC_NO, k46, KC_NO, k48, k49, k410, k411, k412, k413 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_625u_arrow( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, \
|
||||||
|
k40, k41, k42, k45, k49, k410, k411, k412, k413 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013 }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113 }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213 }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313 }, \
|
||||||
|
{ k40, k41, k42, KC_NO, KC_NO, k45, KC_NO, KC_NO, KC_NO, k49, k410, k411, k412, k413 } \
|
||||||
|
}
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
/*
|
||||||
|
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 0xCDCD
|
||||||
|
#define PRODUCT_ID 0x5337
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER shens
|
||||||
|
#define PRODUCT Boardwalk
|
||||||
|
#define DESCRIPTION QMK keyboard firmware for Boardwalk
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 14
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MATRIX_ROW_PINS { F0, F1, F4, F5, F6 }
|
||||||
|
#define MATRIX_COL_PINS { F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
// #define BACKLIGHT_PIN F5
|
||||||
|
// #define BACKLIGHT_LEVELS 6
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCING_DELAY 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
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
// ws2812 options
|
||||||
|
#define RGB_DI_PIN B7 // pin the DI on the ws2812 is hooked-up to
|
||||||
|
#define RGBLIGHT_ANIMATIONS // run RGB animations
|
||||||
|
#define RGBLED_NUM 14 // number of LEDs
|
||||||
|
#define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue
|
||||||
|
#define RGBLIGHT_SAT_STEP 25 // units to step when in/decresing saturation
|
||||||
|
#define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness)
|
||||||
@@ -0,0 +1,359 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Boardwalk",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 15,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_ortho_5x14": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"k00", "x":0, "y":0, "w":1.5},
|
||||||
|
{"label":"k01", "x":1.5, "y":0},
|
||||||
|
{"label":"k02", "x":2.5, "y":0},
|
||||||
|
{"label":"k03", "x":3.5, "y":0},
|
||||||
|
{"label":"k04", "x":4.5, "y":0},
|
||||||
|
{"label":"k05", "x":5.5, "y":0},
|
||||||
|
{"label":"k06", "x":6.5, "y":0},
|
||||||
|
{"label":"k07", "x":7.5, "y":0},
|
||||||
|
{"label":"k08", "x":8.5, "y":0},
|
||||||
|
{"label":"k09", "x":9.5, "y":0},
|
||||||
|
{"label":"k010", "x":10.5, "y":0},
|
||||||
|
{"label":"k011", "x":11.5, "y":0},
|
||||||
|
{"label":"k012", "x":12.5, "y":0},
|
||||||
|
{"label":"k013", "x":13.5, "y":0, "w":1.5},
|
||||||
|
{"label":"k10", "x":0, "y":1, "w":1.5},
|
||||||
|
{"label":"k11", "x":1.5, "y":1},
|
||||||
|
{"label":"k12", "x":2.5, "y":1},
|
||||||
|
{"label":"k13", "x":3.5, "y":1},
|
||||||
|
{"label":"k14", "x":4.5, "y":1},
|
||||||
|
{"label":"k15", "x":5.5, "y":1},
|
||||||
|
{"label":"k16", "x":6.5, "y":1},
|
||||||
|
{"label":"k17", "x":7.5, "y":1},
|
||||||
|
{"label":"k18", "x":8.5, "y":1},
|
||||||
|
{"label":"k19", "x":9.5, "y":1},
|
||||||
|
{"label":"k110", "x":10.5, "y":1},
|
||||||
|
{"label":"k111", "x":11.5, "y":1},
|
||||||
|
{"label":"k112", "x":12.5, "y":1},
|
||||||
|
{"label":"k113", "x":13.5, "y":1, "w":1.5},
|
||||||
|
{"label":"k20", "x":0, "y":2, "w":1.5},
|
||||||
|
{"label":"k21", "x":1.5, "y":2},
|
||||||
|
{"label":"k22", "x":2.5, "y":2},
|
||||||
|
{"label":"k23", "x":3.5, "y":2},
|
||||||
|
{"label":"k24", "x":4.5, "y":2},
|
||||||
|
{"label":"k25", "x":5.5, "y":2},
|
||||||
|
{"label":"k26", "x":6.5, "y":2},
|
||||||
|
{"label":"k27", "x":7.5, "y":2},
|
||||||
|
{"label":"k28", "x":8.5, "y":2},
|
||||||
|
{"label":"k29", "x":9.5, "y":2},
|
||||||
|
{"label":"k210", "x":10.5, "y":2},
|
||||||
|
{"label":"k211", "x":11.5, "y":2},
|
||||||
|
{"label":"k212", "x":12.5, "y":2},
|
||||||
|
{"label":"k213", "x":13.5, "y":2, "w":1.5},
|
||||||
|
{"label":"k30", "x":0, "y":3, "w":1.5},
|
||||||
|
{"label":"k31", "x":1.5, "y":3},
|
||||||
|
{"label":"k32", "x":2.5, "y":3},
|
||||||
|
{"label":"k33", "x":3.5, "y":3},
|
||||||
|
{"label":"k34", "x":4.5, "y":3},
|
||||||
|
{"label":"k35", "x":5.5, "y":3},
|
||||||
|
{"label":"k36", "x":6.5, "y":3},
|
||||||
|
{"label":"k37", "x":7.5, "y":3},
|
||||||
|
{"label":"k38", "x":8.5, "y":3},
|
||||||
|
{"label":"k39", "x":9.5, "y":3},
|
||||||
|
{"label":"k310", "x":10.5, "y":3},
|
||||||
|
{"label":"k311", "x":11.5, "y":3},
|
||||||
|
{"label":"k312", "x":12.5, "y":3},
|
||||||
|
{"label":"k313", "x":13.5, "y":3, "w":1.5},
|
||||||
|
{"label":"k40", "x":0, "y":4, "w":1.5},
|
||||||
|
{"label":"k41", "x":1.5, "y":4},
|
||||||
|
{"label":"k42", "x":2.5, "y":4},
|
||||||
|
{"label":"k43", "x":3.5, "y":4},
|
||||||
|
{"label":"k44", "x":4.5, "y":4},
|
||||||
|
{"label":"k45", "x":5.5, "y":4},
|
||||||
|
{"label":"k46", "x":6.5, "y":4},
|
||||||
|
{"label":"k47", "x":7.5, "y":4},
|
||||||
|
{"label":"k48", "x":8.5, "y":4},
|
||||||
|
{"label":"k49", "x":9.5, "y":4},
|
||||||
|
{"label":"k410", "x":10.5, "y":4},
|
||||||
|
{"label":"k411", "x":11.5, "y":4},
|
||||||
|
{"label":"k412", "x":12.5, "y":4},
|
||||||
|
{"label":"k413", "x":13.5, "y":4, "w":1.5}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"LAYOUT_ortho_hhkb": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"k00", "x":0, "y":0, "w":1.5},
|
||||||
|
{"label":"k01", "x":1.5, "y":0},
|
||||||
|
{"label":"k02", "x":2.5, "y":0},
|
||||||
|
{"label":"k03", "x":3.5, "y":0},
|
||||||
|
{"label":"k04", "x":4.5, "y":0},
|
||||||
|
{"label":"k05", "x":5.5, "y":0},
|
||||||
|
{"label":"k06", "x":6.5, "y":0},
|
||||||
|
{"label":"k07", "x":7.5, "y":0},
|
||||||
|
{"label":"k08", "x":8.5, "y":0},
|
||||||
|
{"label":"k09", "x":9.5, "y":0},
|
||||||
|
{"label":"k010", "x":10.5, "y":0},
|
||||||
|
{"label":"k011", "x":11.5, "y":0},
|
||||||
|
{"label":"k012", "x":12.5, "y":0},
|
||||||
|
{"label":"k013", "x":13.5, "y":0, "w":1.5},
|
||||||
|
{"label":"k10", "x":0, "y":1, "w":1.5},
|
||||||
|
{"label":"k11", "x":1.5, "y":1},
|
||||||
|
{"label":"k12", "x":2.5, "y":1},
|
||||||
|
{"label":"k13", "x":3.5, "y":1},
|
||||||
|
{"label":"k14", "x":4.5, "y":1},
|
||||||
|
{"label":"k15", "x":5.5, "y":1},
|
||||||
|
{"label":"k16", "x":6.5, "y":1},
|
||||||
|
{"label":"k17", "x":7.5, "y":1},
|
||||||
|
{"label":"k18", "x":8.5, "y":1},
|
||||||
|
{"label":"k19", "x":9.5, "y":1},
|
||||||
|
{"label":"k110", "x":10.5, "y":1},
|
||||||
|
{"label":"k111", "x":11.5, "y":1},
|
||||||
|
{"label":"k112", "x":12.5, "y":1},
|
||||||
|
{"label":"k113", "x":13.5, "y":1, "w":1.5},
|
||||||
|
{"label":"k20", "x":0, "y":2, "w":1.5},
|
||||||
|
{"label":"k21", "x":1.5, "y":2},
|
||||||
|
{"label":"k22", "x":2.5, "y":2},
|
||||||
|
{"label":"k23", "x":3.5, "y":2},
|
||||||
|
{"label":"k24", "x":4.5, "y":2},
|
||||||
|
{"label":"k25", "x":5.5, "y":2},
|
||||||
|
{"label":"k26", "x":6.5, "y":2},
|
||||||
|
{"label":"k27", "x":7.5, "y":2},
|
||||||
|
{"label":"k28", "x":8.5, "y":2},
|
||||||
|
{"label":"k29", "x":9.5, "y":2},
|
||||||
|
{"label":"k210", "x":10.5, "y":2},
|
||||||
|
{"label":"k211", "x":11.5, "y":2},
|
||||||
|
{"label":"k212", "x":12.5, "y":2},
|
||||||
|
{"label":"k213", "x":13.5, "y":2, "w":1.5},
|
||||||
|
{"label":"k30", "x":0, "y":3, "w":1.5},
|
||||||
|
{"label":"k31", "x":1.5, "y":3},
|
||||||
|
{"label":"k32", "x":2.5, "y":3},
|
||||||
|
{"label":"k33", "x":3.5, "y":3},
|
||||||
|
{"label":"k34", "x":4.5, "y":3},
|
||||||
|
{"label":"k35", "x":5.5, "y":3},
|
||||||
|
{"label":"k36", "x":6.5, "y":3},
|
||||||
|
{"label":"k37", "x":7.5, "y":3},
|
||||||
|
{"label":"k38", "x":8.5, "y":3},
|
||||||
|
{"label":"k39", "x":9.5, "y":3},
|
||||||
|
{"label":"k310", "x":10.5, "y":3},
|
||||||
|
{"label":"k311", "x":11.5, "y":3},
|
||||||
|
{"label":"k312", "x":12.5, "y":3},
|
||||||
|
{"label":"k313", "x":13.5, "y":3, "w":1.5},
|
||||||
|
{"label":"k41", "x":1.5, "y":4},
|
||||||
|
{"label":"k42", "x":2.5, "y":4},
|
||||||
|
{"label":"k43", "x":3.5, "y":4},
|
||||||
|
{"label":"k44", "x":4.5, "y":4},
|
||||||
|
{"label":"k45", "x":5.5, "y":4, "w":2},
|
||||||
|
{"label":"k47", "x":7.5, "y":4, "w":2},
|
||||||
|
{"label":"k49", "x":9.5, "y":4},
|
||||||
|
{"label":"k410", "x":10.5, "y":4},
|
||||||
|
{"label":"k411", "x":11.5, "y":4},
|
||||||
|
{"label":"k412", "x":12.5, "y":4}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"LAYOUT_ortho_7u": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"k00", "x":0, "y":0, "w":1.5},
|
||||||
|
{"label":"k01", "x":1.5, "y":0},
|
||||||
|
{"label":"k02", "x":2.5, "y":0},
|
||||||
|
{"label":"k03", "x":3.5, "y":0},
|
||||||
|
{"label":"k04", "x":4.5, "y":0},
|
||||||
|
{"label":"k05", "x":5.5, "y":0},
|
||||||
|
{"label":"k06", "x":6.5, "y":0},
|
||||||
|
{"label":"k07", "x":7.5, "y":0},
|
||||||
|
{"label":"k08", "x":8.5, "y":0},
|
||||||
|
{"label":"k09", "x":9.5, "y":0},
|
||||||
|
{"label":"k010", "x":10.5, "y":0},
|
||||||
|
{"label":"k011", "x":11.5, "y":0},
|
||||||
|
{"label":"k012", "x":12.5, "y":0},
|
||||||
|
{"label":"k013", "x":13.5, "y":0, "w":1.5},
|
||||||
|
{"label":"k10", "x":0, "y":1, "w":1.5},
|
||||||
|
{"label":"k11", "x":1.5, "y":1},
|
||||||
|
{"label":"k12", "x":2.5, "y":1},
|
||||||
|
{"label":"k13", "x":3.5, "y":1},
|
||||||
|
{"label":"k14", "x":4.5, "y":1},
|
||||||
|
{"label":"k15", "x":5.5, "y":1},
|
||||||
|
{"label":"k16", "x":6.5, "y":1},
|
||||||
|
{"label":"k17", "x":7.5, "y":1},
|
||||||
|
{"label":"k18", "x":8.5, "y":1},
|
||||||
|
{"label":"k19", "x":9.5, "y":1},
|
||||||
|
{"label":"k110", "x":10.5, "y":1},
|
||||||
|
{"label":"k111", "x":11.5, "y":1},
|
||||||
|
{"label":"k112", "x":12.5, "y":1},
|
||||||
|
{"label":"k113", "x":13.5, "y":1, "w":1.5},
|
||||||
|
{"label":"k20", "x":0, "y":2, "w":1.5},
|
||||||
|
{"label":"k21", "x":1.5, "y":2},
|
||||||
|
{"label":"k22", "x":2.5, "y":2},
|
||||||
|
{"label":"k23", "x":3.5, "y":2},
|
||||||
|
{"label":"k24", "x":4.5, "y":2},
|
||||||
|
{"label":"k25", "x":5.5, "y":2},
|
||||||
|
{"label":"k26", "x":6.5, "y":2},
|
||||||
|
{"label":"k27", "x":7.5, "y":2},
|
||||||
|
{"label":"k28", "x":8.5, "y":2},
|
||||||
|
{"label":"k29", "x":9.5, "y":2},
|
||||||
|
{"label":"k210", "x":10.5, "y":2},
|
||||||
|
{"label":"k211", "x":11.5, "y":2},
|
||||||
|
{"label":"k212", "x":12.5, "y":2},
|
||||||
|
{"label":"k213", "x":13.5, "y":2, "w":1.5},
|
||||||
|
{"label":"k30", "x":0, "y":3, "w":1.5},
|
||||||
|
{"label":"k31", "x":1.5, "y":3},
|
||||||
|
{"label":"k32", "x":2.5, "y":3},
|
||||||
|
{"label":"k33", "x":3.5, "y":3},
|
||||||
|
{"label":"k34", "x":4.5, "y":3},
|
||||||
|
{"label":"k35", "x":5.5, "y":3},
|
||||||
|
{"label":"k36", "x":6.5, "y":3},
|
||||||
|
{"label":"k37", "x":7.5, "y":3},
|
||||||
|
{"label":"k38", "x":8.5, "y":3},
|
||||||
|
{"label":"k39", "x":9.5, "y":3},
|
||||||
|
{"label":"k310", "x":10.5, "y":3},
|
||||||
|
{"label":"k311", "x":11.5, "y":3},
|
||||||
|
{"label":"k312", "x":12.5, "y":3},
|
||||||
|
{"label":"k313", "x":13.5, "y":3, "w":1.5},
|
||||||
|
{"label":"k41", "x":1.5, "y":4},
|
||||||
|
{"label":"k42", "x":2.5, "y":4, "w":1.5},
|
||||||
|
{"label":"k46", "x":4, "y":4, "w":7},
|
||||||
|
{"label":"k411", "x":11, "y":4, "w":1.5},
|
||||||
|
{"label":"k412", "x":12.5, "y":4}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"LAYOUT_2u_arrow": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"k00", "x":0, "y":0, "w":1.5},
|
||||||
|
{"label":"k01", "x":1.5, "y":0},
|
||||||
|
{"label":"k02", "x":2.5, "y":0},
|
||||||
|
{"label":"k03", "x":3.5, "y":0},
|
||||||
|
{"label":"k04", "x":4.5, "y":0},
|
||||||
|
{"label":"k05", "x":5.5, "y":0},
|
||||||
|
{"label":"k06", "x":6.5, "y":0},
|
||||||
|
{"label":"k07", "x":7.5, "y":0},
|
||||||
|
{"label":"k08", "x":8.5, "y":0},
|
||||||
|
{"label":"k09", "x":9.5, "y":0},
|
||||||
|
{"label":"k010", "x":10.5, "y":0},
|
||||||
|
{"label":"k011", "x":11.5, "y":0},
|
||||||
|
{"label":"k012", "x":12.5, "y":0},
|
||||||
|
{"label":"k013", "x":13.5, "y":0, "w":1.5},
|
||||||
|
{"label":"k10", "x":0, "y":1, "w":1.5},
|
||||||
|
{"label":"k11", "x":1.5, "y":1},
|
||||||
|
{"label":"k12", "x":2.5, "y":1},
|
||||||
|
{"label":"k13", "x":3.5, "y":1},
|
||||||
|
{"label":"k14", "x":4.5, "y":1},
|
||||||
|
{"label":"k15", "x":5.5, "y":1},
|
||||||
|
{"label":"k16", "x":6.5, "y":1},
|
||||||
|
{"label":"k17", "x":7.5, "y":1},
|
||||||
|
{"label":"k18", "x":8.5, "y":1},
|
||||||
|
{"label":"k19", "x":9.5, "y":1},
|
||||||
|
{"label":"k110", "x":10.5, "y":1},
|
||||||
|
{"label":"k111", "x":11.5, "y":1},
|
||||||
|
{"label":"k112", "x":12.5, "y":1},
|
||||||
|
{"label":"k113", "x":13.5, "y":1, "w":1.5},
|
||||||
|
{"label":"k20", "x":0, "y":2, "w":1.5},
|
||||||
|
{"label":"k21", "x":1.5, "y":2},
|
||||||
|
{"label":"k22", "x":2.5, "y":2},
|
||||||
|
{"label":"k23", "x":3.5, "y":2},
|
||||||
|
{"label":"k24", "x":4.5, "y":2},
|
||||||
|
{"label":"k25", "x":5.5, "y":2},
|
||||||
|
{"label":"k26", "x":6.5, "y":2},
|
||||||
|
{"label":"k27", "x":7.5, "y":2},
|
||||||
|
{"label":"k28", "x":8.5, "y":2},
|
||||||
|
{"label":"k29", "x":9.5, "y":2},
|
||||||
|
{"label":"k210", "x":10.5, "y":2},
|
||||||
|
{"label":"k211", "x":11.5, "y":2},
|
||||||
|
{"label":"k212", "x":12.5, "y":2, "w":1.5},
|
||||||
|
{"label":"k213", "x":14, "y":2},
|
||||||
|
{"label":"k30", "x":0, "y":3, "w":1.5},
|
||||||
|
{"label":"k31", "x":1.5, "y":3},
|
||||||
|
{"label":"k32", "x":2.5, "y":3},
|
||||||
|
{"label":"k33", "x":3.5, "y":3},
|
||||||
|
{"label":"k34", "x":4.5, "y":3},
|
||||||
|
{"label":"k35", "x":5.5, "y":3},
|
||||||
|
{"label":"k36", "x":6.5, "y":3},
|
||||||
|
{"label":"k37", "x":7.5, "y":3},
|
||||||
|
{"label":"k38", "x":8.5, "y":3},
|
||||||
|
{"label":"k39", "x":9.5, "y":3},
|
||||||
|
{"label":"k310", "x":10.5, "y":3},
|
||||||
|
{"label":"k311", "x":11.5, "y":3, "w":1.5},
|
||||||
|
{"label":"k312", "x":13, "y":3},
|
||||||
|
{"label":"k313", "x":14, "y":3},
|
||||||
|
{"label":"k40", "x":0, "y":4, "w":1.25},
|
||||||
|
{"label":"k41", "x":1.25, "y":4, "w":1.25},
|
||||||
|
{"label":"k42", "x":2.5, "y":4},
|
||||||
|
{"label":"k43", "x":3.5, "y":4},
|
||||||
|
{"label":"k44", "x":4.5, "y":4, "w":2},
|
||||||
|
{"label":"k46", "x":6.5, "y":4, "w":2},
|
||||||
|
{"label":"k48", "x":8.5, "y":4},
|
||||||
|
{"label":"k49", "x":9.5, "y":4, "w":1.25},
|
||||||
|
{"label":"k410", "x":10.75, "y":4, "w":1.25},
|
||||||
|
{"label":"k411", "x":12, "y":4},
|
||||||
|
{"label":"k412", "x":13, "y":4},
|
||||||
|
{"label":"k413", "x":14, "y":4}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"LAYOUT_625u_arrow": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"k00", "x":0, "y":0, "w":1.5},
|
||||||
|
{"label":"k01", "x":1.5, "y":0},
|
||||||
|
{"label":"k02", "x":2.5, "y":0},
|
||||||
|
{"label":"k03", "x":3.5, "y":0},
|
||||||
|
{"label":"k04", "x":4.5, "y":0},
|
||||||
|
{"label":"k05", "x":5.5, "y":0},
|
||||||
|
{"label":"k06", "x":6.5, "y":0},
|
||||||
|
{"label":"k07", "x":7.5, "y":0},
|
||||||
|
{"label":"k08", "x":8.5, "y":0},
|
||||||
|
{"label":"k09", "x":9.5, "y":0},
|
||||||
|
{"label":"k010", "x":10.5, "y":0},
|
||||||
|
{"label":"k011", "x":11.5, "y":0},
|
||||||
|
{"label":"k012", "x":12.5, "y":0},
|
||||||
|
{"label":"k013", "x":13.5, "y":0, "w":1.5},
|
||||||
|
{"label":"k10", "x":0, "y":1, "w":1.5},
|
||||||
|
{"label":"k11", "x":1.5, "y":1},
|
||||||
|
{"label":"k12", "x":2.5, "y":1},
|
||||||
|
{"label":"k13", "x":3.5, "y":1},
|
||||||
|
{"label":"k14", "x":4.5, "y":1},
|
||||||
|
{"label":"k15", "x":5.5, "y":1},
|
||||||
|
{"label":"k16", "x":6.5, "y":1},
|
||||||
|
{"label":"k17", "x":7.5, "y":1},
|
||||||
|
{"label":"k18", "x":8.5, "y":1},
|
||||||
|
{"label":"k19", "x":9.5, "y":1},
|
||||||
|
{"label":"k110", "x":10.5, "y":1},
|
||||||
|
{"label":"k111", "x":11.5, "y":1},
|
||||||
|
{"label":"k112", "x":12.5, "y":1},
|
||||||
|
{"label":"k113", "x":13.5, "y":1, "w":1.5},
|
||||||
|
{"label":"k20", "x":0, "y":2, "w":1.5},
|
||||||
|
{"label":"k21", "x":1.5, "y":2},
|
||||||
|
{"label":"k22", "x":2.5, "y":2},
|
||||||
|
{"label":"k23", "x":3.5, "y":2},
|
||||||
|
{"label":"k24", "x":4.5, "y":2},
|
||||||
|
{"label":"k25", "x":5.5, "y":2},
|
||||||
|
{"label":"k26", "x":6.5, "y":2},
|
||||||
|
{"label":"k27", "x":7.5, "y":2},
|
||||||
|
{"label":"k28", "x":8.5, "y":2},
|
||||||
|
{"label":"k29", "x":9.5, "y":2},
|
||||||
|
{"label":"k210", "x":10.5, "y":2},
|
||||||
|
{"label":"k211", "x":11.5, "y":2},
|
||||||
|
{"label":"k212", "x":12.5, "y":2, "w":1.5},
|
||||||
|
{"label":"k213", "x":14, "y":2},
|
||||||
|
{"label":"k30", "x":0, "y":3, "w":1.5},
|
||||||
|
{"label":"k31", "x":1.5, "y":3},
|
||||||
|
{"label":"k32", "x":2.5, "y":3},
|
||||||
|
{"label":"k33", "x":3.5, "y":3},
|
||||||
|
{"label":"k34", "x":4.5, "y":3},
|
||||||
|
{"label":"k35", "x":5.5, "y":3},
|
||||||
|
{"label":"k36", "x":6.5, "y":3},
|
||||||
|
{"label":"k37", "x":7.5, "y":3},
|
||||||
|
{"label":"k38", "x":8.5, "y":3},
|
||||||
|
{"label":"k39", "x":9.5, "y":3},
|
||||||
|
{"label":"k310", "x":10.5, "y":3},
|
||||||
|
{"label":"k311", "x":11.5, "y":3, "w":1.5},
|
||||||
|
{"label":"k312", "x":13, "y":3},
|
||||||
|
{"label":"k313", "x":14, "y":3},
|
||||||
|
{"label":"k40", "x":0, "y":4, "w":1.25},
|
||||||
|
{"label":"k41", "x":1.25, "y":4, "w":1.25},
|
||||||
|
{"label":"k42", "x":2.5, "y":4},
|
||||||
|
{"label":"k45", "x":3.5, "y":4, "w":6.25},
|
||||||
|
{"label":"k49", "x":9.75, "y":4},
|
||||||
|
{"label":"k410", "x":10.75, "y":4, "w":1.25},
|
||||||
|
{"label":"k411", "x":12, "y":4},
|
||||||
|
{"label":"k412", "x":13, "y":4},
|
||||||
|
{"label":"k413", "x":14, "y":4}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
@@ -0,0 +1,162 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
// Layer shorthand
|
||||||
|
enum layer {
|
||||||
|
_1U,
|
||||||
|
_FN,
|
||||||
|
_HHKB,
|
||||||
|
_7U,
|
||||||
|
_2UARROW,
|
||||||
|
_625UARROW,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* 1uGrid
|
||||||
|
* .-----------------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | ESC | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||||
|
* | TAB | Q | W | E | R | T | [ | ] | Y | U | I | O | P | ' |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
|
||||||
|
* | CAP LK | A | S | D | F | G | HOME | PG UP | H | J | K | L | ; | ENTER |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
|
||||||
|
* | LSHIFT | Z | X | C | V | B | END | PG DN | N | M | , | . | / | RSHIFT |
|
||||||
|
* |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
|
||||||
|
* | LCTRL | LGUI | FN | LALT | SPACE | SPACE | SPACE | SPACE | SPACE | SPACE | RIGHT | DOWN | UP | RIGHT |
|
||||||
|
* '-----------------------------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_1U] = LAYOUT_ortho_5x14(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
|
||||||
|
KC_TAB, 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_QUOT, \
|
||||||
|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
|
||||||
|
KC_LCTL, KC_LGUI, MO(1), KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_RCTL \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* HHKB
|
||||||
|
* .-----------------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | ESC | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||||
|
* | TAB | Q | W | E | R | T | [ | ] | Y | U | I | O | P | ' |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
|
||||||
|
* | CAP LK | A | S | D | F | G | HOME | PG UP | H | J | K | L | ; | ENTER |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
|
||||||
|
* | LSHIFT | Z | X | C | V | B | END | PG DN | N | M | , | . | / | RSHIFT |
|
||||||
|
* |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
|
||||||
|
* | | LCTRL | FN | LALT | LGUI | SPACE | SPACE | LEFT | DOWN | UP | RIGHT | |
|
||||||
|
* '-----------------------------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_HHKB] = LAYOUT_ortho_hhkb(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \
|
||||||
|
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_RSFT, \
|
||||||
|
KC_LCTL, MO(1), KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* 7u HHKB
|
||||||
|
* .-----------------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | ESC | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||||
|
* | TAB | Q | W | E | R | T | [ | ] | Y | U | I | O | P | ' |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
|
||||||
|
* | CAP LK | A | S | D | F | G | HOME | PG UP | H | J | K | L | ; | ENTER |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
|
||||||
|
* | LSHIFT | Z | X | C | V | B | END | PG DN | N | M | , | . | / | RSHIFT |
|
||||||
|
* |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
|
||||||
|
* | | LCTRL | LALT | SPACE | RALT | FN | |
|
||||||
|
* '-----------------------------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_7U] = LAYOUT_ortho_7u(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \
|
||||||
|
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_RSFT, \
|
||||||
|
KC_LCTL, KC_LALT, KC_SPC, KC_RALT, MO(1) \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* 2x2u Space with Arrows
|
||||||
|
* .-----------------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||||
|
* | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
|
||||||
|
* | CAP LK | A | S | D | F | G | H | J | K | L | ; | " | ENTER | PG UP |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
|
||||||
|
* | LSHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | UP | PG DN |
|
||||||
|
* |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
|
||||||
|
* | LCTRL | LGUI | FN | LALT | SPACE | SPACE | RALT | RGUI | RCTRL | LEFT | DOWN | RIGHT |
|
||||||
|
* '-----------------------------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_2UARROW] = LAYOUT_2u_arrow(
|
||||||
|
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_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_QUOT, \
|
||||||
|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_BSLS, KC_ENT, KC_PGUP, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \
|
||||||
|
KC_LCTL, KC_LGUI, MO(1), KC_LALT, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* 6.25u Space with Arrows
|
||||||
|
* .-----------------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||||
|
* | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
|
||||||
|
* | CAP LK | A | S | D | F | G | H | J | K | L | ; | " | ENTER | PG UP |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
|
||||||
|
* | LSHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | UP | PG DN |
|
||||||
|
* |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
|
||||||
|
* | LCTRL | LGUI | LALT | SPACE | FN | RCTRL | LEFT | DOWN | RIGHT |
|
||||||
|
* '-----------------------------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_625UARROW] = LAYOUT_625u_arrow(
|
||||||
|
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_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_QUOT, \
|
||||||
|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_BSLS, KC_ENT, KC_PGUP, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* FUNCTION
|
||||||
|
* .-----------------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||||
|
* | | | | | | | | | | | | | | |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
|
||||||
|
* | | | | | | | | | | | | | | |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
|
||||||
|
* | | | | | | | | | | | | | | |
|
||||||
|
* |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
|
||||||
|
* | | | | | | | | | | | | | | |
|
||||||
|
* '-----------------------------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
[_FN] = LAYOUT_ortho_5x14(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# The default keymap for Boardwalk
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Layer shorthand
|
||||||
|
enum layer {
|
||||||
|
_BASE,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_FN
|
||||||
|
};
|
||||||
|
|
||||||
|
#define LOWER MO(1)
|
||||||
|
#define RAISE MO(2)
|
||||||
|
#define FN MO(3)
|
||||||
|
|
||||||
|
// Mac sleep
|
||||||
|
#define __SLEEP S(LCTL(KC_POWER))
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_BASE] = LAYOUT_ortho_hhkb(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_SLCK, KC_PSCR, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, KC_PGUP, 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_END, KC_PGDN, 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_DEL, KC_INS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \
|
||||||
|
KC_CAPS, KC_LALT, KC_LGUI, RAISE, KC_SPC, KC_SPC, LOWER, KC_RGUI, KC_RALT, KC_RCTL
|
||||||
|
),
|
||||||
|
|
||||||
|
[_LOWER] = LAYOUT_ortho_hhkb(
|
||||||
|
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_PAUS, KC_NLCK, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, \
|
||||||
|
_______, 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_LBRC, KC_RBRC, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_GRV, KC_BSLS, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[_RAISE] = LAYOUT_ortho_hhkb(
|
||||||
|
_______, KC_F11, KC_F12, _______, _______, _______, KC_PAUS, KC_NLCK, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_TILD, KC_PIPE, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[_FN] = LAYOUT_ortho_hhkb(
|
||||||
|
__SLEEP, _______, _______, _______, _______, _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, RESET, _______, KC_MPRV, KC_MNXT, _______, RGB_SAI, RGB_HUI, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, _______, RGB_SAD, RGB_HUD, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
uint32_t layer_state_set_user(uint32_t state) {
|
||||||
|
return update_tri_layer_state(state, _LOWER, _RAISE, _FN);
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
// Layer shorthand
|
||||||
|
#define _QW 0
|
||||||
|
|
||||||
|
#define LOWER LT(1, KC_SPC)
|
||||||
|
#define RAISE LT(2, KC_ENT)
|
||||||
|
|
||||||
|
#define CTRLESC CTL_T(KC_ESC)
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap _QWE: Base Layer (Default Layer) */
|
||||||
|
[_QW] = LAYOUT_ortho_hhkb(
|
||||||
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, _______, _______, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
|
||||||
|
CTRLESC, KC_A, KC_S, KC_D, KC_F, KC_G, _______, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
|
||||||
|
MO(3), KC_LCTL, KC_LALT, KC_LGUI, RAISE, LOWER, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Keymap LOWER: Lower Layer */
|
||||||
|
[1] = LAYOUT_ortho_hhkb(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Keymap RAISE: Raise Layer */
|
||||||
|
[2] = LAYOUT_ortho_hhkb(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Keymap _FL: Function Layer */
|
||||||
|
[3] = LAYOUT_ortho_hhkb(
|
||||||
|
RESET, _______, _______, _______, _______, _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# The default keymap for Boardwalk
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# 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/>.
|
||||||
|
|
||||||
|
RGBLIGHT_ENABLE = yes
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# Boardwalk
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
The Boardwalk is a 60% ortholinear keyboard, designed around Ergodox keycap sets and to fit into many standard 60% cases. The project was inspired by OLKB’s Atomic keyboard, which used larger 2u mods, but u/shensmobile
|
||||||
|
decided to switch to 1.5u keys so that Ergodox sets would provide excellent compatibility. The rest of the board can be covered using standard key sizes from 60% sets.
|
||||||
|
|
||||||
|
Keyboard Maintainer: QMK Community
|
||||||
|
Hardware Supported: Boardwalk Ortholinear PCB
|
||||||
|
Hardware Availability: [panc.co](https://www.panc.co/boardwalk-group-buy.html)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make boardwalk:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
# Boot Section Size in *bytes*
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Teensy++ halfKay 1024
|
||||||
|
# Atmel DFU loader 4096
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
# USBaspLoader 2048
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
# QMK 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
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = yes # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
LAYOUTS = ortho_5x14
|
||||||
@@ -39,11 +39,11 @@ EXTRAFLAGS+=-flto
|
|||||||
BACKLIGHT_ENABLE = no
|
BACKLIGHT_ENABLE = no
|
||||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
||||||
## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
|
## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
MOUSEKEY_ENABLE = no # Mouse keys
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
CONSOLE_ENABLE = yes # Console for debug
|
CONSOLE_ENABLE = yes # Console for debug
|
||||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
AUDIO_ENABLE = no
|
AUDIO_ENABLE = no
|
||||||
RGBLIGHT_ENABLE = no
|
RGBLIGHT_ENABLE = no
|
||||||
|
|||||||
+4
-4
@@ -34,10 +34,10 @@ merge with those in the keyboard folder_
|
|||||||
|
|
||||||
## Relevant Links
|
## Relevant Links
|
||||||
|
|
||||||
- 
|
- [Online Dvorak Layout Trainer](https://learn.dvorak.nl/)
|
||||||
- 
|
- [Dvorak Wikipedia Page](https://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard)
|
||||||
- 
|
- [QMK Docs](https://docs.qmk.fm/#/)
|
||||||
- 
|
- [QMK KeyCode Reference](https://docs.qmk.fm/#/keycodes)
|
||||||
|
|
||||||
## Contact
|
## Contact
|
||||||
|
|
||||||
@@ -3,3 +3,7 @@
|
|||||||
#ifdef KEYBOARD_clueboard_66_hotswap_gen1
|
#ifdef KEYBOARD_clueboard_66_hotswap_gen1
|
||||||
#include "gen1.h"
|
#include "gen1.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef KEYBOARD_clueboard_66_hotswap_prototype
|
||||||
|
#include "prototype.h"
|
||||||
|
#endif
|
||||||
@@ -16,7 +16,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
|
|||||||
@@ -0,0 +1,520 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file templates/chconf.h
|
||||||
|
* @brief Configuration file template.
|
||||||
|
* @details A copy of this file must be placed in each project directory, it
|
||||||
|
* contains the application specific kernel settings.
|
||||||
|
*
|
||||||
|
* @addtogroup config
|
||||||
|
* @details Kernel related settings and hooks.
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CHCONF_H
|
||||||
|
#define CHCONF_H
|
||||||
|
|
||||||
|
#define _CHIBIOS_RT_CONF_
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name System timers settings
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System time counter resolution.
|
||||||
|
* @note Allowed values are 16 or 32 bits.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_ST_RESOLUTION 32
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System tick frequency.
|
||||||
|
* @details Frequency of the system timer that drives the system ticks. This
|
||||||
|
* setting also defines the system tick time unit.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_ST_FREQUENCY 100000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Time delta constant for the tick-less mode.
|
||||||
|
* @note If this value is zero then the system uses the classic
|
||||||
|
* periodic tick. This value represents the minimum number
|
||||||
|
* of ticks that is safe to specify in a timeout directive.
|
||||||
|
* The value one is not valid, timeouts are rounded up to
|
||||||
|
* this value.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_ST_TIMEDELTA 2
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Kernel parameters and options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Round robin interval.
|
||||||
|
* @details This constant is the number of system ticks allowed for the
|
||||||
|
* threads before preemption occurs. Setting this value to zero
|
||||||
|
* disables the preemption for threads with equal priority and the
|
||||||
|
* round robin becomes cooperative. Note that higher priority
|
||||||
|
* threads can still preempt, the kernel is always preemptive.
|
||||||
|
* @note Disabling the round robin preemption makes the kernel more compact
|
||||||
|
* and generally faster.
|
||||||
|
* @note The round robin preemption is not supported in tickless mode and
|
||||||
|
* must be set to zero in that case.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_TIME_QUANTUM 0
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Managed RAM size.
|
||||||
|
* @details Size of the RAM area to be managed by the OS. If set to zero
|
||||||
|
* then the whole available RAM is used. The core memory is made
|
||||||
|
* available to the heap allocator and/or can be used directly through
|
||||||
|
* the simplified core memory allocator.
|
||||||
|
*
|
||||||
|
* @note In order to let the OS manage the whole RAM the linker script must
|
||||||
|
* provide the @p __heap_base__ and @p __heap_end__ symbols.
|
||||||
|
* @note Requires @p CH_CFG_USE_MEMCORE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_MEMCORE_SIZE 0
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle thread automatic spawn suppression.
|
||||||
|
* @details When this option is activated the function @p chSysInit()
|
||||||
|
* does not spawn the idle thread. The application @p main()
|
||||||
|
* function becomes the idle thread and must implement an
|
||||||
|
* infinite loop.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_NO_IDLE_THREAD FALSE
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Performance options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief OS optimization.
|
||||||
|
* @details If enabled then time efficient rather than space efficient code
|
||||||
|
* is used when two possible implementations exist.
|
||||||
|
*
|
||||||
|
* @note This is not related to the compiler optimization options.
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_OPTIMIZE_SPEED TRUE
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Subsystem options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Time Measurement APIs.
|
||||||
|
* @details If enabled then the time measurement APIs are included in
|
||||||
|
* the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_TM TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads registry APIs.
|
||||||
|
* @details If enabled then the registry APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_REGISTRY TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads synchronization APIs.
|
||||||
|
* @details If enabled then the @p chThdWait() function is included in
|
||||||
|
* the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_WAITEXIT TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Semaphores APIs.
|
||||||
|
* @details If enabled then the Semaphores APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_SEMAPHORES TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Semaphores queuing mode.
|
||||||
|
* @details If enabled then the threads are enqueued on semaphores by
|
||||||
|
* priority rather than in FIFO order.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE. Enable this if you have special
|
||||||
|
* requirements.
|
||||||
|
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Mutexes APIs.
|
||||||
|
* @details If enabled then the mutexes APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MUTEXES TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables recursive behavior on mutexes.
|
||||||
|
* @note Recursive mutexes are heavier and have an increased
|
||||||
|
* memory footprint.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
* @note Requires @p CH_CFG_USE_MUTEXES.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Conditional Variables APIs.
|
||||||
|
* @details If enabled then the conditional variables APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_MUTEXES.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_CONDVARS TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Conditional Variables APIs with timeout.
|
||||||
|
* @details If enabled then the conditional variables APIs with timeout
|
||||||
|
* specification are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_CONDVARS.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Events Flags APIs.
|
||||||
|
* @details If enabled then the event flags APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_EVENTS TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Events Flags APIs with timeout.
|
||||||
|
* @details If enabled then the events APIs with timeout specification
|
||||||
|
* are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_EVENTS.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Synchronous Messages APIs.
|
||||||
|
* @details If enabled then the synchronous messages APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MESSAGES TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Synchronous Messages queuing mode.
|
||||||
|
* @details If enabled then messages are served by priority rather than in
|
||||||
|
* FIFO order.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE. Enable this if you have special
|
||||||
|
* requirements.
|
||||||
|
* @note Requires @p CH_CFG_USE_MESSAGES.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MESSAGES_PRIORITY TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Mailboxes APIs.
|
||||||
|
* @details If enabled then the asynchronous messages (mailboxes) APIs are
|
||||||
|
* included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MAILBOXES TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Core Memory Manager APIs.
|
||||||
|
* @details If enabled then the core memory manager APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MEMCORE TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Heap Allocator APIs.
|
||||||
|
* @details If enabled then the memory heap allocator APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
|
||||||
|
* @p CH_CFG_USE_SEMAPHORES.
|
||||||
|
* @note Mutexes are recommended.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_HEAP TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Memory Pools Allocator APIs.
|
||||||
|
* @details If enabled then the memory pools allocator APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MEMPOOLS TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Dynamic Threads APIs.
|
||||||
|
* @details If enabled then the dynamic threads creation APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_WAITEXIT.
|
||||||
|
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_DYNAMIC TRUE
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Debug options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, kernel statistics.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_STATISTICS FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, system state check.
|
||||||
|
* @details If enabled the correct call protocol for system APIs is checked
|
||||||
|
* at runtime.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, parameters checks.
|
||||||
|
* @details If enabled then the checks on the API functions input
|
||||||
|
* parameters are activated.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_ENABLE_CHECKS FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, consistency checks.
|
||||||
|
* @details If enabled then all the assertions in the kernel code are
|
||||||
|
* activated. This includes consistency checks inside the kernel,
|
||||||
|
* runtime anomalies and port-defined checks.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_ENABLE_ASSERTS FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, trace buffer.
|
||||||
|
* @details If enabled then the trace buffer is activated.
|
||||||
|
*
|
||||||
|
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Trace buffer entries.
|
||||||
|
* @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
|
||||||
|
* different from @p CH_DBG_TRACE_MASK_DISABLED.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_TRACE_BUFFER_SIZE 128
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, stack checks.
|
||||||
|
* @details If enabled then a runtime stack check is performed.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
* @note The stack check is performed in a architecture/port dependent way.
|
||||||
|
* It may not be implemented or some ports.
|
||||||
|
* @note The default failure mode is to halt the system with the global
|
||||||
|
* @p panic_msg variable set to @p NULL.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_ENABLE_STACK_CHECK TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, stacks initialization.
|
||||||
|
* @details If enabled then the threads working area is filled with a byte
|
||||||
|
* value when a thread is created. This can be useful for the
|
||||||
|
* runtime measurement of the used stack.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_FILL_THREADS FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, threads profiling.
|
||||||
|
* @details If enabled then a field is added to the @p thread_t structure that
|
||||||
|
* counts the system ticks occurred while executing the thread.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
* @note This debug option is not currently compatible with the
|
||||||
|
* tickless mode.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_THREADS_PROFILING FALSE
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Kernel hooks
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads descriptor structure extension.
|
||||||
|
* @details User fields added to the end of the @p thread_t structure.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_THREAD_EXTRA_FIELDS \
|
||||||
|
/* Add threads custom fields here.*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads initialization hook.
|
||||||
|
* @details User initialization code added to the @p chThdInit() API.
|
||||||
|
*
|
||||||
|
* @note It is invoked from within @p chThdInit() and implicitly from all
|
||||||
|
* the threads creation APIs.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
|
||||||
|
/* Add threads initialization code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads finalization hook.
|
||||||
|
* @details User finalization code added to the @p chThdExit() API.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
|
||||||
|
/* Add threads finalization code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Context switch hook.
|
||||||
|
* @details This hook is invoked just before switching between threads.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
|
||||||
|
/* Context switch code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief ISR enter hook.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
|
||||||
|
/* IRQ prologue code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief ISR exit hook.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
|
||||||
|
/* IRQ epilogue code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle thread enter hook.
|
||||||
|
* @note This hook is invoked within a critical zone, no OS functions
|
||||||
|
* should be invoked from here.
|
||||||
|
* @note This macro can be used to activate a power saving mode.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IDLE_ENTER_HOOK() { \
|
||||||
|
/* Idle-enter code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle thread leave hook.
|
||||||
|
* @note This hook is invoked within a critical zone, no OS functions
|
||||||
|
* should be invoked from here.
|
||||||
|
* @note This macro can be used to deactivate a power saving mode.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IDLE_LEAVE_HOOK() { \
|
||||||
|
/* Idle-leave code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle Loop hook.
|
||||||
|
* @details This hook is continuously invoked by the idle thread loop.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IDLE_LOOP_HOOK() { \
|
||||||
|
/* Idle loop code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System tick event hook.
|
||||||
|
* @details This hook is invoked in the system tick handler immediately
|
||||||
|
* after processing the virtual timers queue.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_SYSTEM_TICK_HOOK() { \
|
||||||
|
/* System tick event code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System halt hook.
|
||||||
|
* @details This hook is invoked in case to a system halting error before
|
||||||
|
* the system is halted.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \
|
||||||
|
/* System halt code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Trace hook.
|
||||||
|
* @details This hook is invoked each time a new record is written in the
|
||||||
|
* trace buffer.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_TRACE_HOOK(tep) { \
|
||||||
|
/* Trace code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Port-specific settings (override port settings defaulted in chcore.h). */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#endif /* CHCONF_H */
|
||||||
|
|
||||||
|
/** @} */
|
||||||
@@ -1,44 +1,146 @@
|
|||||||
#pragma once
|
/*
|
||||||
|
* Copyright 2017 skully <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
#define PRODUCT_ID 0x2390
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xC1ED
|
||||||
|
#define PRODUCT_ID 0x2391
|
||||||
#define DEVICE_VER 0x0001
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER Clueboard
|
||||||
|
|
||||||
|
/* Address for jumping to bootloader on STM32 chips. */
|
||||||
|
/* It is chip dependent, the correct number can be looked up here:
|
||||||
|
* http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
|
||||||
|
* This also requires a patch to chibios:
|
||||||
|
* <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch
|
||||||
|
*/
|
||||||
|
#define STM32_BOOTLOADER_ADDRESS 0x1FFFD800
|
||||||
|
|
||||||
/* key matrix size */
|
/* key matrix size */
|
||||||
#define MATRIX_ROWS 10
|
#define MATRIX_ROWS 10
|
||||||
#define MATRIX_COLS 8
|
#define MATRIX_COLS 8
|
||||||
|
|
||||||
/* ROWS: Top to bottom, COLS: Left to right
|
/*
|
||||||
|
* 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 { B2, C7, C6, B6, B5, B0, B3, D5, D3, D2 }
|
#define MATRIX_ROW_PINS { B11, A6, A3, A2, A1, B5, B6, C15, C14, C13 }
|
||||||
#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, E6, B1 }
|
#define MATRIX_COL_PINS { B10, B2, B1, B0, A7, B4, B3, B7 }
|
||||||
#define UNUSED_PINS
|
#define UNUSED_PINS { A0, A8, A15, B12, B13, B14, B15 }
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
/* Speaker configuration
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCE 6
|
||||||
|
|
||||||
|
/* 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
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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 B7_AUDIO
|
//#define FORCE_NKRO
|
||||||
#define NO_MUSIC_MODE
|
|
||||||
#define AUDIO_CLICKY
|
|
||||||
|
|
||||||
/* Backlight configuration
|
/* key combination for magic key command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
*/
|
*/
|
||||||
#define BACKLIGHT_LEVELS 1
|
|
||||||
|
|
||||||
/* Underlight configuration
|
/* 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
|
||||||
*/
|
*/
|
||||||
#define RGB_DI_PIN D7
|
|
||||||
#define RGBLED_NUM 26 // Number of LEDs
|
|
||||||
#define RGBLIGHT_HUE_STEP 32
|
|
||||||
#define RGBLIGHT_SAT_STEP 17
|
|
||||||
#define RGBLIGHT_VAL_STEP 17
|
|
||||||
|
|
||||||
#define RGBLIGHT_ANIMATIONS
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
#define RGBLIGHT_EFFECT_BREATHE_MAX 200
|
|
||||||
#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 666*2
|
/* enable basic MIDI features:
|
||||||
#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1
|
- MIDI notes can be sent when in Music mode is on
|
||||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 4 // How many LEDs wide to light up
|
*/
|
||||||
#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 16 // The led to start at
|
//#define MIDI_BASIC
|
||||||
#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 8 // How many LEDs to travel
|
|
||||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // How many LEDs wide to light up
|
/* 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
|
||||||
|
|
||||||
|
/* Backlight configuration
|
||||||
|
*/
|
||||||
|
#define BACKLIGHT_LEVELS 10
|
||||||
|
|
||||||
|
// This is a 7-bit address, that gets left-shifted and bit 0
|
||||||
|
// set to 0 for write, 1 for read (as per I2C protocol)
|
||||||
|
// The address will vary depending on your wiring:
|
||||||
|
// 0b1110100 AD <-> GND
|
||||||
|
// 0b1110111 AD <-> VCC
|
||||||
|
// 0b1110101 AD <-> SCL
|
||||||
|
// 0b1110110 AD <-> SDA
|
||||||
|
#define LED_DRIVER_ADDR_1 0b1110100
|
||||||
|
#define I2C1_BANK GPIOB
|
||||||
|
#define I2C1_SCL 8
|
||||||
|
#define I2C1_SDA 9
|
||||||
|
|
||||||
|
#define LED_DRIVER_COUNT 1
|
||||||
|
#define LED_DRIVER_LED_COUNT 71
|
||||||
@@ -1,63 +1,186 @@
|
|||||||
|
/* Copyright 2017 Clueboard <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
#include "gen1.h"
|
#include "gen1.h"
|
||||||
#include <avr/io.h>
|
#include "is31fl3731-simple.h"
|
||||||
#include "backlight.h"
|
|
||||||
#include "print.h"
|
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
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();
|
|
||||||
|
|
||||||
// JTAG disable for PORT F. write JTD bit twice within four cycles.
|
|
||||||
MCUCR |= (1<<JTD);
|
|
||||||
MCUCR |= (1<<JTD);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void matrix_scan_kb(void) {
|
void matrix_scan_kb(void) {
|
||||||
matrix_scan_user();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void backlight_init_ports(void) {
|
#ifdef LED_MATRIX_ENABLE
|
||||||
print("init_backlight_pin()\n");
|
const is31_led g_is31_leds[LED_DRIVER_LED_COUNT] = {
|
||||||
// Set our LED pins as output
|
/* Refer to IS31 manual for these locations
|
||||||
DDRD |= (1<<0); // Esc
|
* driver
|
||||||
DDRD |= (1<<4); // Page Up
|
* | LED address
|
||||||
DDRD |= (1<<1); // Arrows
|
* | | */
|
||||||
|
{0, C1_1}, // k00 KC_GESC
|
||||||
|
{0, C1_2}, // k01 KC_1
|
||||||
|
{0, C1_3}, // k02 KC_2
|
||||||
|
{0, C1_4}, // k03 KC_3
|
||||||
|
{0, C1_5}, // k04 KC_4
|
||||||
|
{0, C1_6}, // k05 KC_5
|
||||||
|
{0, C1_7}, // k06 KC_6
|
||||||
|
{0, C1_8}, // k07 KC_7
|
||||||
|
{0, C1_9}, // k50 KC_8
|
||||||
|
{0, C1_10}, // k51 KC_9
|
||||||
|
{0, C1_11}, // k52 KC_0
|
||||||
|
{0, C1_12}, // k53 KC_MINS
|
||||||
|
{0, C1_13}, // k54 KC_EQL
|
||||||
|
{0, C1_14}, // k55 KC_BSPC
|
||||||
|
{0, C1_15}, // k57 KC_PGUP
|
||||||
|
{0, C2_1}, // k10 KC_TAB
|
||||||
|
{0, C2_2}, // k11 KC_Q
|
||||||
|
{0, C2_3}, // k12 KC_W
|
||||||
|
{0, C2_4}, // k13 KC_E
|
||||||
|
{0, C2_5}, // k14 KC_R
|
||||||
|
{0, C2_6}, // k15 KC_T
|
||||||
|
{0, C2_7}, // k16 KC_Y
|
||||||
|
{0, C2_8}, // k17 KC_U
|
||||||
|
{0, C2_9}, // k60 KC_I
|
||||||
|
{0, C2_10}, // k61 KC_O
|
||||||
|
{0, C2_11}, // k62 KC_P
|
||||||
|
{0, C2_12}, // k63 KC_LBRC
|
||||||
|
{0, C2_13}, // k64 KC_RBRC
|
||||||
|
{0, C2_14}, // k65 KC_BSLS
|
||||||
|
{0, C2_15}, // k67 KC_PGDN
|
||||||
|
{0, C3_1}, // k20 KC_CAPS
|
||||||
|
{0, C3_2}, // k21 KC_A
|
||||||
|
{0, C3_3}, // k22 KC_S
|
||||||
|
{0, C3_4}, // k23 KC_D
|
||||||
|
{0, C3_5}, // k24 KC_F
|
||||||
|
{0, C3_6}, // k25 KC_G
|
||||||
|
{0, C3_7}, // k26 KC_H
|
||||||
|
{0, C3_8}, // k27 KC_J
|
||||||
|
{0, C3_9}, // k70 KC_K
|
||||||
|
{0, C3_10}, // k71 KC_L
|
||||||
|
{0, C3_11}, // k72 KC_SCLN
|
||||||
|
{0, C3_12}, // k73 KC_QUOT
|
||||||
|
{0, C3_14}, // k75 KC_ENT
|
||||||
|
{0, C4_1}, // k30 KC_LSFT
|
||||||
|
{0, C4_3}, // k32 KC_Z
|
||||||
|
{0, C4_4}, // k33 KC_X
|
||||||
|
{0, C4_5}, // k34 KC_C
|
||||||
|
{0, C4_6}, // k35 KC_V
|
||||||
|
{0, C4_7}, // k36 KC_B
|
||||||
|
{0, C4_8}, // k37 KC_N
|
||||||
|
{0, C4_9}, // k80 KC_M
|
||||||
|
{0, C4_10}, // k81 KC_COMM
|
||||||
|
{0, C4_11}, // k82 KC_DOT
|
||||||
|
{0, C4_12}, // k83 KC_SLSH
|
||||||
|
{0, C4_13}, // k85 KC_RSFT
|
||||||
|
{0, C4_14}, // k86 KC_UP
|
||||||
|
{0, C5_1}, // k40 KC_LCTL
|
||||||
|
{0, C5_2}, // k41 KC_LGUI
|
||||||
|
{0, C5_3}, // k42 KC_LALT
|
||||||
|
{0, C5_4}, // Unassociated between LALT and SPACE_2.75
|
||||||
|
{0, C5_5}, // k45 KC_SPC SPACE_2.75
|
||||||
|
{0, C5_6}, // k45 KC_SPC SPACE_6.75
|
||||||
|
{0, C5_7}, // k46 KC_SPC SPACE_2.25
|
||||||
|
{0, C5_8}, // Unassociated between SPACE_2.25 and SPACE_1.25
|
||||||
|
{0, C5_9}, // k90 KC_RGUI
|
||||||
|
{0, C5_10}, // k92 KC_RALT
|
||||||
|
{0, C5_11}, // k93 MO(_FL)
|
||||||
|
{0, C5_12}, // k94 KC_RCTL
|
||||||
|
{0, C5_13}, // k95 KC_LEFT
|
||||||
|
{0, C5_14}, // k96 KC_DOWN
|
||||||
|
{0, C5_15} // k97 KC_RGHT
|
||||||
|
};
|
||||||
|
|
||||||
// Set our LED pins low
|
const led_matrix g_leds[LED_DRIVER_LED_COUNT] = {
|
||||||
PORTD &= ~(1<<0); // Esc
|
|
||||||
PORTD &= ~(1<<4); // Page Up
|
|
||||||
PORTD &= ~(1<<1); // Arrows
|
|
||||||
}
|
|
||||||
|
|
||||||
void backlight_set(uint8_t level) {
|
/*{row | col << 4}
|
||||||
if ( level == 0 ) {
|
| LED_ROW_COL(row, col)
|
||||||
// Turn off light
|
| | modifier
|
||||||
PORTD |= (1<<0); // Esc
|
| | | */
|
||||||
PORTD |= (1<<4); // Page Up
|
{{0|(1<<4)}, {0, 0}, 1}, // k00 KC_GESC
|
||||||
PORTD |= (1<<1); // Arrows
|
{{0|(2<<4)}, {14.45, 0}, 0}, // k01 KC_1
|
||||||
} else {
|
{{0|(3<<4)}, {28.9, 0}, 0}, // k02 KC_2
|
||||||
// Turn on light
|
{{0|(4<<4)}, {43.35, 0}, 0}, // k03 KC_3
|
||||||
PORTD &= ~(1<<0); // Esc
|
{{0|(5<<4)}, {57.8, 0}, 0}, // k04 KC_4
|
||||||
PORTD &= ~(1<<4); // Page Up
|
{{0|(6<<4)}, {72.25, 0}, 0}, // k05 KC_5
|
||||||
PORTD &= ~(1<<1); // Arrows
|
{{0|(7<<4)}, {86.7, 0}, 0}, // k06 KC_6
|
||||||
}
|
{{0|(8<<4)}, {101.2, 0}, 0}, // k07 KC_7
|
||||||
}
|
{{0|(9<<4)}, {115.6, 0}, 0}, // k50 KC_8
|
||||||
|
{{0|(10<<4)}, {130, 0}, 0}, // k51 KC_9
|
||||||
|
{{0|(11<<4)}, {144.5, 0}, 0}, // k52 KC_0
|
||||||
|
{{0|(12<<4)}, {159, 0}, 0}, // k53 KC_MINS
|
||||||
|
{{0|(13<<4)}, {173.4, 0}, 0}, // k54 KC_EQL
|
||||||
|
{{0|(14<<4)}, {195.1, 0}, 1}, // k55 KC_BSPC
|
||||||
|
{{0|(15<<4)}, {224, 0}, 1}, // k57 KC_PGUP
|
||||||
|
|
||||||
void led_init_ports() {
|
{{1|(0<<4)}, {3.6125, 16}, 1}, // k10 KC_TAB
|
||||||
// * Set our LED pins as output
|
{{1|(1<<4)}, {21.675, 16}, 0}, // k11 KC_Q
|
||||||
DDRB |= (1<<4);
|
{{1|(2<<4)}, {36.125, 16}, 0}, // k12 KC_W
|
||||||
}
|
{{1|(3<<4)}, {50.575, 16}, 0}, // k13 KC_E
|
||||||
|
{{1|(4<<4)}, {65.025, 16}, 0}, // k14 KC_R
|
||||||
|
{{1|(5<<4)}, {79.475, 16}, 0}, // k15 KC_T
|
||||||
|
{{1|(6<<4)}, {93.925, 16}, 0}, // k16 KC_Y
|
||||||
|
{{1|(7<<4)}, {108.375, 16}, 0}, // k17 KC_U
|
||||||
|
{{1|(8<<4)}, {122.825, 16}, 0}, // k60 KC_I
|
||||||
|
{{1|(9<<4)}, {137.275, 16}, 0}, // k61 KC_O
|
||||||
|
{{1|(10<<4)}, {151.725, 16}, 0}, // k62 KC_P
|
||||||
|
{{1|(11<<4)}, {166.175, 16}, 0}, // k63 KC_LBRC
|
||||||
|
{{1|(12<<4)}, {180.625, 16}, 0}, // k64 KC_RBRC
|
||||||
|
{{1|(13<<4)}, {198.6875, 16}, 1}, // k65 KC_BSLS
|
||||||
|
{{1|(14<<4)}, {224, 16}, 1}, // k67 KC_PGDN
|
||||||
|
|
||||||
void led_set_kb(uint8_t usb_led) {
|
{{2|(0<<4)}, {5.41875, 32}, 1}, // k20 KC_CAPS
|
||||||
DDRB |= (1<<4);
|
{{2|(1<<4)}, {25.2875, 32}, 0}, // k21 KC_A
|
||||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
{{2|(2<<4)}, {39.7375, 32}, 0}, // k22 KC_S
|
||||||
// Turn capslock on
|
{{2|(3<<4)}, {54.1875, 32}, 0}, // k23 KC_D
|
||||||
PORTB |= (1<<4);
|
{{2|(4<<4)}, {68.6375, 32}, 0}, // k24 KC_F
|
||||||
} else {
|
{{2|(5<<4)}, {83.0875, 32}, 0}, // k25 KC_G
|
||||||
// Turn capslock off
|
{{2|(6<<4)}, {97.5375, 32}, 0}, // k26 KC_H
|
||||||
PORTB &= ~(1<<4);
|
{{2|(7<<4)}, {111.9875, 32}, 0}, // k27 KC_J
|
||||||
}
|
{{2|(8<<4)}, {126.4375, 32}, 0}, // k70 KC_K
|
||||||
}
|
{{2|(9<<4)}, {140.8875, 32}, 0}, // k71 KC_L
|
||||||
|
{{2|(10<<4)}, {155.3375, 32}, 0}, // k72 KC_SCLN
|
||||||
|
{{2|(11<<4)}, {169.7875, 32}, 0}, // k73 KC_QUOT
|
||||||
|
{{2|(12<<4)}, {184.2375, 32}, 1}, // k75 KC_ENT
|
||||||
|
|
||||||
|
{{3|(0<<4)}, {16.25625, 48}, 1}, // k30 KC_LSFT
|
||||||
|
{{3|(1<<4)}, {32.5125, 48}, 0}, // k32 KC_Z
|
||||||
|
{{3|(2<<4)}, {46.9625, 48}, 0}, // k33 KC_X
|
||||||
|
{{3|(3<<4)}, {61.4125, 48}, 0}, // k34 KC_C
|
||||||
|
{{3|(4<<4)}, {75.8625, 48}, 0}, // k35 KC_V
|
||||||
|
{{3|(5<<4)}, {90.3125, 48}, 0}, // k36 KC_B
|
||||||
|
{{3|(6<<4)}, {104.7625, 48}, 0}, // k37 KC_N
|
||||||
|
{{3|(7<<4)}, {119.2125, 48}, 0}, // k80 KC_M
|
||||||
|
{{3|(8<<4)}, {133.6625, 48}, 0}, // k81 KC_COMM
|
||||||
|
{{3|(9<<4)}, {148.1125, 48}, 0}, // k82 KC_DOT
|
||||||
|
{{3|(10<<4)}, {162.5625, 48}, 0}, // k83 KC_SLSH
|
||||||
|
{{3|(11<<4)}, {187.85, 48}, 1}, // k85 KC_RSFT
|
||||||
|
{{3|(12<<4)}, {209.525, 48}, 1}, // k86 KC_UP
|
||||||
|
|
||||||
|
{{4|(0<<4)}, {9.03125, 64}, 1}, // k40 KC_LCTL
|
||||||
|
{{4|(1<<4)}, {27.09375, 64}, 1}, // k41 KC_LGUI
|
||||||
|
{{4|(2<<4)}, {45.15625, 64}, 1}, // k42 KC_LALT
|
||||||
|
{{4|(3<<4)}, {59.45, 64}, 1}, // Unassociated between LALT and SPACE_2.75
|
||||||
|
{{4|(4<<4)}, {73.9, 64}, 1}, // k45 KC_SPC SPACE_2.75
|
||||||
|
{{4|(5<<4)}, {88.35, 64}, 1}, // k45 KC_SPC SPACE_6.25
|
||||||
|
{{4|(6<<4)}, {102.8, 64}, 1}, // k46 KC_SPC SPACE_2.25
|
||||||
|
{{4|(7<<4)}, {117.40625, 64}, 1}, // Unassociated between SPACE_2.25 and SPACE_2.75
|
||||||
|
{{4|(8<<4)}, {135.46875, 64}, 1}, // k90 KC_RGUI
|
||||||
|
{{4|(9<<4)}, {153.53125, 64}, 1}, // k92 KC_RALT
|
||||||
|
{{4|(10<<4)}, {167.98125, 64}, 1}, // k93 MO(_FL)
|
||||||
|
{{4|(11<<4)}, {186.04375, 64}, 1}, // k94 KC_RCTL
|
||||||
|
{{4|(12<<4)}, {195.075, 64}, 1}, // k95 KC_LEFT
|
||||||
|
{{4|(13<<4)}, {209.525, 64}, 1}, // k96 KC_DOWN
|
||||||
|
{{4|(14<<4)}, {224, 64}, 1} // k97 KC_RGHT
|
||||||
|
};
|
||||||
|
#endif
|
||||||
@@ -1,67 +1,89 @@
|
|||||||
|
/* Copyright 2017 Clueboard <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* These are shortcuts to help you work with the various layout options. If your
|
||||||
|
* keymap works with one of the LAYOUT_...() macros you are encouraged to use that
|
||||||
|
* and to contribute your keymap to the corresponding layout in
|
||||||
|
* `qmk_firmware/layouts/community`.
|
||||||
|
*/
|
||||||
|
|
||||||
/* Clueboard matrix layout
|
/* Clueboard matrix layout
|
||||||
* ,-----------------------------------------------------------. ,---.
|
* ,-----------------------------------------------------------. ,---.
|
||||||
* | 00| 01| 02| 03| 04| 05| 06| 07| 50| 51| 52| 53| 54| 56| | 57|
|
* | 00| 01| 02| 03| 04| 05| 06| 07| 50| 51| 52| 53| 54| 56 | | 57|
|
||||||
* |-----------------------------------------------------------| |---|
|
* |-----------------------------------------------------------| |---|
|
||||||
* | 10| 11| 12| 13| 14| 15| 16| 17| 60| 61| 62| 63| 64| 65| | 67|
|
* | 10| 11| 12| 13| 14| 15| 16| 17| 60| 61| 62| 63| 64| 65| | 67|
|
||||||
* |-----------------------------------------------------------| `---'
|
* |-----------------------------------------------------------| `---'
|
||||||
* | 20| 21| 22| 23| 24| 25| 26| 27| 70| 71| 72| 73| 75|
|
* | 20| 21| 22| 23| 24| 25| 26| 27| 70| 71| 72| 73| 75|
|
||||||
* |-------------------------------------------------------------.
|
* |--------------------------------------------------------------.
|
||||||
* | 30| 32| 33| 34| 35| 36| 37| 80| 81| 82| 83| 85| 86|
|
* | 30 | 32| 33| 34| 35| 36| 37| 80| 81| 82| 83| 85 |86|
|
||||||
* |-----------------------------------------------------------------.
|
* |------------------------------------------------------------------.
|
||||||
* | 40| 41| 42| 45| 46| 90| 92| 93| 94| 95| 96| 97|
|
* | 40| 41| 42| 45| 46| 90| 92| 93| 94| 95|96| 97|
|
||||||
* `-----------------------------------------------------------------'
|
* `------------------------------------------------------------------'
|
||||||
* ,-----------------------------------------------------------. ,---.
|
* ,-----------------------------------------------------------. ,---.
|
||||||
* | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |Ins|
|
* | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |Ins|
|
||||||
* |-----------------------------------------------------------| |---|
|
* |-----------------------------------------------------------| |---|
|
||||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|
|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|
|
||||||
* |-----------------------------------------------------------| `---'
|
* |-----------------------------------------------------------| `---'
|
||||||
* |Caps | A| S| D| F| G| H| J| k| L| ;| '|Enter |
|
* |Caps | A| S| D| F| G| H| J| k| L| ;| '|Enter |
|
||||||
* |-------------------------------------------------------------.
|
* |--------------------------------------------------------------.
|
||||||
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |
|
* |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift| Up|
|
||||||
* |-----------------------------------------------------------------.
|
* |------------------------------------------------------------------.
|
||||||
* |Ctrl|Alt |Gui | Space| Space|Gui |Alt |Fn |Ctrl|Lft|Dwn|Rgt|
|
* |Ctrl|Alt|Gui | Space| Space|Gui |Alt |Fn |Ctrl|Left|Down|Rgt|
|
||||||
* `-----------------------------------------------------------------'
|
* `------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
// The first section contains all of the arguments
|
// The first section contains all of the arguments
|
||||||
// The second converts the arguments into a two-dimensional array
|
// The second converts the arguments into a two-dimensional array
|
||||||
|
|
||||||
#define LAYOUT( \
|
#define LAYOUT( \
|
||||||
k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k56, k57, \
|
k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k55, k57, \
|
||||||
k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k65, k67, \
|
k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k65, k67, \
|
||||||
k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k75, \
|
k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k75, \
|
||||||
k30, k32, k33, k34, k35, k36, k37, k80, k81, k82, k83, k85, k86, \
|
k30, k32, k33, k34, k35, k36, k37, k80, k81, k82, k83, k85, k86, \
|
||||||
k40, k41, k42, k45, k46, k90, k92, k93, k94, k95, k96, k97 \
|
k40, k41, k42, k45, k46, k90, k92, k93, k94, k95, k96, k97 \
|
||||||
) { \
|
) { \
|
||||||
{ k00, k01, k02, k03, k04, k05, k06, k07 }, \
|
{ k00, k01, k02, k03, k04, k05, k06, k07 }, \
|
||||||
{ k10, k11, k12, k13, k14, k15, k16, k17 }, \
|
{ k10, k11, k12, k13, k14, k15, k16, k17 }, \
|
||||||
{ k20, k21, k22, k23, k24, k25, k26, k27 }, \
|
{ k20, k21, k22, k23, k24, k25, k26, k27 }, \
|
||||||
{ k30, KC_NO, k32, k33, k34, k35, k36, k37 }, \
|
{ k30, KC_NO, k32, k33, k34, k35, k36, k37 }, \
|
||||||
{ k40, k41, k42, KC_NO, KC_NO, k45, k46, KC_NO }, \
|
{ k40, k41, k42, KC_NO, KC_NO, k45, k46, KC_NO }, \
|
||||||
{ k50, k51, k52, k53, k54, KC_NO, k56, k57 }, \
|
{ k50, k51, k52, k53, k54, k55, KC_NO, k57 }, \
|
||||||
{ k60, k61, k62, k63, k64, k65, KC_NO, k67 }, \
|
{ k60, k61, k62, k63, k64, k65, KC_NO, k67 }, \
|
||||||
{ k70, k71, k72, k73, KC_NO, k75, KC_NO, KC_NO }, \
|
{ k70, k71, k72, k73, KC_NO, k75, KC_NO, KC_NO }, \
|
||||||
{ k80, k81, k82, k83, KC_NO, k85, k86, KC_NO }, \
|
{ k80, k81, k82, k83, KC_NO, k85, k86, KC_NO }, \
|
||||||
{ k90, KC_NO, k92, k93, k94, k95, k96, k97 } \
|
{ k90, KC_NO, k92, k93, k94, k95, k96, k97 } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LAYOUT_66_ansi( \
|
#define LAYOUT_66_ansi( \
|
||||||
k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k56, k57, \
|
k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k55, k57, \
|
||||||
k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k65, k67, \
|
k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k65, k67, \
|
||||||
k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k75, \
|
k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k75, \
|
||||||
k30, k32, k33, k34, k35, k36, k37, k80, k81, k82, k83, k85, k86, \
|
k30, k32, k33, k34, k35, k36, k37, k80, k81, k82, k83, k85, k86, \
|
||||||
k40, k41, k42, k46, k92, k93, k94, k95, k96, k97 \
|
k40, k41, k42, k46, k92, k93, k94, k95, k96, k97 \
|
||||||
) { \
|
) { \
|
||||||
{ k00, k01, k02, k03, k04, k05, k06, k07 }, \
|
{ k00, k01, k02, k03, k04, k05, k06, k07 }, \
|
||||||
{ k10, k11, k12, k13, k14, k15, k16, k17 }, \
|
{ k10, k11, k12, k13, k14, k15, k16, k17 }, \
|
||||||
{ k20, k21, k22, k23, k24, k25, k26, k27 }, \
|
{ k20, k21, k22, k23, k24, k25, k26, k27 }, \
|
||||||
{ k30, KC_NO, k32, k33, k34, k35, k36, k37 }, \
|
{ k30, KC_NO, k32, k33, k34, k35, k36, k37 }, \
|
||||||
{ k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO }, \
|
{ k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO }, \
|
||||||
{ k50, k51, k52, k53, k54, KC_NO, k56, k57 }, \
|
{ k50, k51, k52, k53, k54, k55, KC_NO, k57 }, \
|
||||||
{ k60, k61, k62, k63, k64, k65, KC_NO, k67 }, \
|
{ k60, k61, k62, k63, k64, k65, KC_NO, k67 }, \
|
||||||
{ k70, k71, k72, k73, KC_NO, k75, KC_NO, KC_NO }, \
|
{ k70, k71, k72, k73, KC_NO, k75, KC_NO, KC_NO }, \
|
||||||
{ k80, k81, k82, k83, KC_NO, k85, k86, KC_NO }, \
|
{ k80, k81, k82, k83, KC_NO, k85, k86, KC_NO }, \
|
||||||
{ KC_NO, KC_NO, k92, k93, k94, k95, k96, k97 } \
|
{ KC_NO, KC_NO, k92, k93, k94, k95, k96, k97 } \
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,388 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file templates/halconf.h
|
||||||
|
* @brief HAL configuration header.
|
||||||
|
* @details HAL configuration file, this file allows to enable or disable the
|
||||||
|
* various device drivers from your application. You may also use
|
||||||
|
* this file in order to override the device drivers default settings.
|
||||||
|
*
|
||||||
|
* @addtogroup HAL_CONF
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef HALCONF_H
|
||||||
|
#define HALCONF_H
|
||||||
|
|
||||||
|
#include "mcuconf.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the PAL subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_PAL TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the ADC subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_ADC FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the CAN subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_CAN FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the DAC subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_DAC TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the EXT subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_EXT FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the GPT subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_GPT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the I2C subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_I2C TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the I2S subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_I2S FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the ICU subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_ICU FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the MAC subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_MAC FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the MMC_SPI subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_MMC_SPI FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the PWM subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_PWM FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the QSPI subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_QSPI FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the RTC subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_RTC FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SDC subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_SDC FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SERIAL subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_SERIAL FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SERIAL over USB subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_SERIAL_USB FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SPI subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_SPI FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the UART subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_UART FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the USB subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_USB TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the WDG subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_WDG FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* ADC driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
#define ADC_USE_WAIT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
#define ADC_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* CAN driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sleep mode related APIs inclusion switch.
|
||||||
|
*/
|
||||||
|
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
|
||||||
|
#define CAN_USE_SLEEP_MODE TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* I2C driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the mutual exclusion APIs on the I2C bus.
|
||||||
|
*/
|
||||||
|
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
#define I2C_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* MAC driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables an event sources for incoming packets.
|
||||||
|
*/
|
||||||
|
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
|
||||||
|
#define MAC_USE_ZERO_COPY FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables an event sources for incoming packets.
|
||||||
|
*/
|
||||||
|
#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
|
||||||
|
#define MAC_USE_EVENTS TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* MMC_SPI driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Delays insertions.
|
||||||
|
* @details If enabled this options inserts delays into the MMC waiting
|
||||||
|
* routines releasing some extra CPU time for the threads with
|
||||||
|
* lower priority, this may slow down the driver a bit however.
|
||||||
|
* This option is recommended also if the SPI driver does not
|
||||||
|
* use a DMA channel and heavily loads the CPU.
|
||||||
|
*/
|
||||||
|
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
|
||||||
|
#define MMC_NICE_WAITING TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SDC driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Number of initialization attempts before rejecting the card.
|
||||||
|
* @note Attempts are performed at 10mS intervals.
|
||||||
|
*/
|
||||||
|
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
|
||||||
|
#define SDC_INIT_RETRY 100
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Include support for MMC cards.
|
||||||
|
* @note MMC support is not yet implemented so this option must be kept
|
||||||
|
* at @p FALSE.
|
||||||
|
*/
|
||||||
|
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
|
||||||
|
#define SDC_MMC_SUPPORT FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Delays insertions.
|
||||||
|
* @details If enabled this options inserts delays into the MMC waiting
|
||||||
|
* routines releasing some extra CPU time for the threads with
|
||||||
|
* lower priority, this may slow down the driver a bit however.
|
||||||
|
*/
|
||||||
|
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
|
||||||
|
#define SDC_NICE_WAITING TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SERIAL driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Default bit rate.
|
||||||
|
* @details Configuration parameter, this is the baud rate selected for the
|
||||||
|
* default configuration.
|
||||||
|
*/
|
||||||
|
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
|
||||||
|
#define SERIAL_DEFAULT_BITRATE 38400
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Serial buffers size.
|
||||||
|
* @details Configuration parameter, you can change the depth of the queue
|
||||||
|
* buffers depending on the requirements of your application.
|
||||||
|
* @note The default is 16 bytes for both the transmission and receive
|
||||||
|
* buffers.
|
||||||
|
*/
|
||||||
|
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||||
|
#define SERIAL_BUFFERS_SIZE 16
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SERIAL_USB driver related setting. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Serial over USB buffers size.
|
||||||
|
* @details Configuration parameter, the buffer size must be a multiple of
|
||||||
|
* the USB data endpoint maximum packet size.
|
||||||
|
* @note The default is 256 bytes for both the transmission and receive
|
||||||
|
* buffers.
|
||||||
|
*/
|
||||||
|
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||||
|
#define SERIAL_USB_BUFFERS_SIZE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Serial over USB number of buffers.
|
||||||
|
* @note The default is 2 buffers.
|
||||||
|
*/
|
||||||
|
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
|
||||||
|
#define SERIAL_USB_BUFFERS_NUMBER 2
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SPI driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
#define SPI_USE_WAIT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
#define SPI_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* UART driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
#define UART_USE_WAIT FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
#define UART_USE_MUTUAL_EXCLUSION FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* USB driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
#define USB_USE_WAIT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* HALCONF_H */
|
||||||
|
|
||||||
|
/** @} */
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [{"x": 0, "y": 0, "w": 1, "label": "GRAVE"}, {"x": 1, "y": 0, "w": 1, "label": "1"}, {"x": 2, "y": 0, "w": 1, "label": "2"}, {"x": 3, "y": 0, "w": 1, "label": "3"}, {"x": 4, "y": 0, "w": 1, "label": "4"}, {"x": 5, "y": 0, "w": 1, "label": "5"}, {"x": 6, "y": 0, "w": 1, "label": "6"}, {"x": 7, "y": 0, "w": 1, "label": "7"}, {"x": 8, "y": 0, "w": 1, "label": "8"}, {"x": 9, "y": 0, "w": 1, "label": "9"}, {"x": 10, "y": 0, "w": 1, "label": "0"}, {"x": 11, "y": 0, "w": 1, "label": "DASH"}, {"x": 12, "y": 0, "w": 1, "label": "EQUALSIGN"}, {"x": 13, "y": 0, "w": 1, "label": "YEN"}, {"x": 14, "y": 0, "w": 1, "label": "BACKSPACE"}, {"x": 15.5, "y": 0, "w": 1, "label": "PAGEUP"}, {"x": 0, "y": 1, "w": 1.5, "label": "TAB"}, {"x": 1.5, "y": 1, "w": 1, "label": "Q"}, {"x": 2.5, "y": 1, "w": 1, "label": "W"}, {"x": 3.5, "y": 1, "w": 1, "label": "E"}, {"x": 4.5, "y": 1, "w": 1, "label": "R"}, {"x": 5.5, "y": 1, "w": 1, "label": "T"}, {"x": 6.5, "y": 1, "w": 1, "label": "Y"}, {"x": 7.5, "y": 1, "w": 1, "label": "U"}, {"x": 8.5, "y": 1, "w": 1, "label": "I"}, {"x": 9.5, "y": 1, "w": 1, "label": "O"}, {"x": 10.5, "y": 1, "w": 1, "label": "P"}, {"x": 11.5, "y": 1, "w": 1, "label": "LBRACKET"}, {"x": 12.5, "y": 1, "w": 1, "label": "RBRACKET"}, {"x": 13.5, "y": 1, "w": 1.5, "label": "BACKSLASH"}, {"x": 15.5, "y": 1, "w": 1, "label": "PAGEDOWN"}, {"x": 0, "y": 2, "w": 1.75, "label": "CAPSLOCK"}, {"x": 1.75, "y": 2, "w": 1, "label": "A"}, {"x": 2.75, "y": 2, "w": 1, "label": "S"}, {"x": 3.75, "y": 2, "w": 1, "label": "D"}, {"x": 4.75, "y": 2, "w": 1, "label": "F"}, {"x": 5.75, "y": 2, "w": 1, "label": "G"}, {"x": 6.75, "y": 2, "w": 1, "label": "H"}, {"x": 7.75, "y": 2, "w": 1, "label": "J"}, {"x": 8.75, "y": 2, "w": 1, "label": "K"}, {"x": 9.75, "y": 2, "w": 1, "label": "L"}, {"x": 10.75, "y": 2, "w": 1, "label": "SEMICOLON"}, {"x": 11.75, "y": 2, "w": 1, "label": "QUOTE"}, {"x": 13.75, "y": 2, "w": 1.25, "label": "ENTER"}, {"x": 0, "y": 3, "w": 1.25, "label": "LSHIFT"}, {"x": 2.25, "y": 3, "w": 1, "label": "Z"}, {"x": 3.25, "y": 3, "w": 1, "label": "X"}, {"x": 4.25, "y": 3, "w": 1, "label": "C"}, {"x": 5.25, "y": 3, "w": 1, "label": "V"}, {"x": 6.25, "y": 3, "w": 1, "label": "B"}, {"x": 7.25, "y": 3, "w": 1, "label": "N"}, {"x": 8.25, "y": 3, "w": 1, "label": "M"}, {"x": 9.25, "y": 3, "w": 1, "label": "COMMA"}, {"x": 10.25, "y": 3, "w": 1, "label": "PERIOD"}, {"x": 11.25, "y": 3, "w": 1, "label": "SLASH"}, {"x": 13.25, "y": 3, "w": 1.25, "label": "RSHIFT"}, {"x": 14.5, "y": 3, "w": 1, "label": "UP"}, {"x": 0, "y": 4, "w": 1.25, "label": "LCTRL"}, {"x": 1.25, "y": 4, "w": 1, "label": "LALT"}, {"x": 2.25, "y": 4, "w": 1.25, "label": "LCMD"}, {"x": 3.5, "y": 4, "w": 1.25, "label": "MUHENKAN"}, {"x": 4.75, "y": 4, "w": 2, "label": "SPACE1"}, {"x": 6.75, "y": 4, "w": 2, "label": "SPACE2"}, {"x": 8.75, "y": 4, "w": 1.25, "label": "HENKAN"}, {"x": 10, "y": 4, "w": 1.25, "label": "RCMD"}, {"x": 11.25, "y": 4, "w": 1, "label": "RCTRL"}, {"x": 12.25, "y": 4, "w": 1.25, "label": "FN"}, {"x": 13.5, "y": 4, "w": 1, "label": "LEFT"}, {"x": 14.5, "y": 4, "w": 1, "label": "DOWN"}, {"x": 15.5, "y": 4, "w": 1, "label": "RIGHT"}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"LAYOUT_66_ansi": {
|
||||||
|
"layout": [{"label":"~", "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":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"x":15.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.25}, {"x":14.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4}, {"label":"Menu", "x":12.25, "y":4, "w":1.25}, {"x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2017 skully <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "hal.h"
|
||||||
|
#include "backlight.h"
|
||||||
|
#include "led.h"
|
||||||
|
#include "printf.h"
|
||||||
@@ -0,0 +1,160 @@
|
|||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include "hal.h"
|
||||||
|
#include "timer.h"
|
||||||
|
#include "wait.h"
|
||||||
|
#include "printf.h"
|
||||||
|
#include "backlight.h"
|
||||||
|
#include "matrix.h"
|
||||||
|
#include "action.h"
|
||||||
|
#include "keycode.h"
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* #define MATRIX_ROW_PINS { PB11, PA6, PA3, PA2, PA1, PB5, PB6, PC15, PC14, PC13 }
|
||||||
|
* #define MATRIX_COL_PINS { PB10, PB2, PB1, PB0, PA7, PB4, PB3, PB7 }
|
||||||
|
*/
|
||||||
|
/* matrix state(1:on, 0:off) */
|
||||||
|
static matrix_row_t matrix[MATRIX_ROWS];
|
||||||
|
static matrix_row_t matrix_debouncing[MATRIX_COLS];
|
||||||
|
static bool debouncing = false;
|
||||||
|
static uint16_t debouncing_time = 0;
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_init_user(void) {}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_scan_user(void) {}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init(void) {
|
||||||
|
printf("matrix init\n");
|
||||||
|
//debug_matrix = true;
|
||||||
|
|
||||||
|
// actual matrix setup
|
||||||
|
palSetPadMode(GPIOB, 10, PAL_MODE_OUTPUT_PUSHPULL);
|
||||||
|
palSetPadMode(GPIOB, 2, PAL_MODE_OUTPUT_PUSHPULL);
|
||||||
|
palSetPadMode(GPIOB, 1, PAL_MODE_OUTPUT_PUSHPULL);
|
||||||
|
palSetPadMode(GPIOB, 0, PAL_MODE_OUTPUT_PUSHPULL);
|
||||||
|
palSetPadMode(GPIOA, 7, PAL_MODE_OUTPUT_PUSHPULL);
|
||||||
|
palSetPadMode(GPIOB, 4, PAL_MODE_OUTPUT_PUSHPULL);
|
||||||
|
palSetPadMode(GPIOB, 3, PAL_MODE_OUTPUT_PUSHPULL);
|
||||||
|
palSetPadMode(GPIOB, 7, PAL_MODE_OUTPUT_PUSHPULL);
|
||||||
|
|
||||||
|
palSetPadMode(GPIOB, 11, PAL_MODE_INPUT_PULLDOWN);
|
||||||
|
palSetPadMode(GPIOA, 6, PAL_MODE_INPUT_PULLDOWN);
|
||||||
|
palSetPadMode(GPIOA, 3, PAL_MODE_INPUT_PULLDOWN);
|
||||||
|
palSetPadMode(GPIOA, 2, PAL_MODE_INPUT_PULLDOWN);
|
||||||
|
palSetPadMode(GPIOA, 1, PAL_MODE_INPUT_PULLDOWN);
|
||||||
|
palSetPadMode(GPIOB, 5, PAL_MODE_INPUT_PULLDOWN);
|
||||||
|
palSetPadMode(GPIOB, 6, PAL_MODE_INPUT_PULLDOWN);
|
||||||
|
palSetPadMode(GPIOC, 15, PAL_MODE_INPUT_PULLDOWN);
|
||||||
|
palSetPadMode(GPIOC, 14, PAL_MODE_INPUT_PULLDOWN);
|
||||||
|
palSetPadMode(GPIOC, 13, PAL_MODE_INPUT_PULLDOWN);
|
||||||
|
|
||||||
|
memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t));
|
||||||
|
memset(matrix_debouncing, 0, MATRIX_COLS * sizeof(matrix_row_t));
|
||||||
|
|
||||||
|
matrix_init_quantum();
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t matrix_scan(void) {
|
||||||
|
// actual matrix
|
||||||
|
for (int col = 0; col < MATRIX_COLS; col++) {
|
||||||
|
matrix_row_t data = 0;
|
||||||
|
|
||||||
|
// strobe col { PB10, PB2, PB1, PB0, PA7, PB4, PB3, PB7 }
|
||||||
|
switch (col) {
|
||||||
|
case 0: palSetPad(GPIOB, 10); break;
|
||||||
|
case 1: palSetPad(GPIOB, 2); break;
|
||||||
|
case 2: palSetPad(GPIOB, 1); break;
|
||||||
|
case 3: palSetPad(GPIOB, 0); break;
|
||||||
|
case 4: palSetPad(GPIOA, 7); break;
|
||||||
|
case 5: palSetPad(GPIOB, 4); break;
|
||||||
|
case 6: palSetPad(GPIOB, 3); break;
|
||||||
|
case 7: palSetPad(GPIOB, 7); break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// need wait to settle pin state
|
||||||
|
wait_us(20);
|
||||||
|
|
||||||
|
// read row data { PB11, PA6, PA3, PA2, PA1, PB5, PB6, PC15, PC14, PC13 }
|
||||||
|
data = (
|
||||||
|
(palReadPad(GPIOB, 11) << 0 ) |
|
||||||
|
(palReadPad(GPIOA, 6) << 1 ) |
|
||||||
|
(palReadPad(GPIOA, 3) << 2 ) |
|
||||||
|
(palReadPad(GPIOA, 2) << 3 ) |
|
||||||
|
(palReadPad(GPIOA, 1) << 4 ) |
|
||||||
|
(palReadPad(GPIOB, 5) << 5 ) |
|
||||||
|
(palReadPad(GPIOB, 6) << 6 ) |
|
||||||
|
(palReadPad(GPIOC, 15) << 7 ) |
|
||||||
|
(palReadPad(GPIOC, 14) << 8 ) |
|
||||||
|
(palReadPad(GPIOC, 13) << 9 )
|
||||||
|
);
|
||||||
|
|
||||||
|
// unstrobe col { B11, B10, B2, B1, A7, B0 }
|
||||||
|
switch (col) {
|
||||||
|
case 0: palClearPad(GPIOB, 10); break;
|
||||||
|
case 1: palClearPad(GPIOB, 2); break;
|
||||||
|
case 2: palClearPad(GPIOB, 1); break;
|
||||||
|
case 3: palClearPad(GPIOB, 0); break;
|
||||||
|
case 4: palClearPad(GPIOA, 7); break;
|
||||||
|
case 5: palClearPad(GPIOB, 4); break;
|
||||||
|
case 6: palClearPad(GPIOB, 3); break;
|
||||||
|
case 7: palClearPad(GPIOB, 7); break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (matrix_debouncing[col] != data) {
|
||||||
|
matrix_debouncing[col] = data;
|
||||||
|
debouncing = true;
|
||||||
|
debouncing_time = timer_read();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) {
|
||||||
|
for (int row = 0; row < MATRIX_ROWS; row++) {
|
||||||
|
matrix[row] = 0;
|
||||||
|
for (int col = 0; col < MATRIX_COLS; col++) {
|
||||||
|
matrix[row] |= ((matrix_debouncing[col] & (1 << row) ? 1 : 0) << col);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
debouncing = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
matrix_scan_quantum();
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool matrix_is_on(uint8_t row, uint8_t col) {
|
||||||
|
return (matrix[row] & (1<<col));
|
||||||
|
}
|
||||||
|
|
||||||
|
matrix_row_t matrix_get_row(uint16_t row) {
|
||||||
|
return matrix[row];
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_print(void) {
|
||||||
|
printf("\nr/c 01234567\n");
|
||||||
|
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||||
|
printf("%X0: ", row);
|
||||||
|
matrix_row_t data = matrix_get_row(row);
|
||||||
|
for (int col = 0; col < MATRIX_COLS; col++) {
|
||||||
|
if (data & (1<<col))
|
||||||
|
printf("1");
|
||||||
|
else
|
||||||
|
printf("0");
|
||||||
|
}
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,257 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MCUCONF_H
|
||||||
|
#define MCUCONF_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
* STM32F3xx drivers configuration.
|
||||||
|
* The following settings override the default settings present in
|
||||||
|
* the various device driver implementation headers.
|
||||||
|
* Note that the settings for each driver only have effect if the whole
|
||||||
|
* driver is enabled in halconf.h.
|
||||||
|
*
|
||||||
|
* IRQ priorities:
|
||||||
|
* 15...0 Lowest...Highest.
|
||||||
|
*
|
||||||
|
* DMA priorities:
|
||||||
|
* 0...3 Lowest...Highest.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define STM32F3xx_MCUCONF
|
||||||
|
|
||||||
|
/*
|
||||||
|
* HAL driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_NO_INIT FALSE
|
||||||
|
#define STM32_PVD_ENABLE FALSE
|
||||||
|
#define STM32_PLS STM32_PLS_LEV0
|
||||||
|
#define STM32_HSI_ENABLED TRUE
|
||||||
|
#define STM32_LSI_ENABLED TRUE
|
||||||
|
#define STM32_HSE_ENABLED TRUE
|
||||||
|
#define STM32_LSE_ENABLED FALSE
|
||||||
|
#define STM32_SW STM32_SW_PLL
|
||||||
|
#define STM32_PLLSRC STM32_PLLSRC_HSE
|
||||||
|
#define STM32_PREDIV_VALUE 1
|
||||||
|
#define STM32_PLLMUL_VALUE 9
|
||||||
|
#define STM32_HPRE STM32_HPRE_DIV1
|
||||||
|
#define STM32_PPRE1 STM32_PPRE1_DIV2
|
||||||
|
#define STM32_PPRE2 STM32_PPRE2_DIV2
|
||||||
|
#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK
|
||||||
|
#define STM32_ADC12PRES STM32_ADC12PRES_DIV1
|
||||||
|
#define STM32_ADC34PRES STM32_ADC34PRES_DIV1
|
||||||
|
#define STM32_USART1SW STM32_USART1SW_PCLK
|
||||||
|
#define STM32_USART2SW STM32_USART2SW_PCLK
|
||||||
|
#define STM32_USART3SW STM32_USART3SW_PCLK
|
||||||
|
#define STM32_UART4SW STM32_UART4SW_PCLK
|
||||||
|
#define STM32_UART5SW STM32_UART5SW_PCLK
|
||||||
|
#define STM32_I2C1SW STM32_I2C1SW_SYSCLK
|
||||||
|
#define STM32_I2C2SW STM32_I2C2SW_SYSCLK
|
||||||
|
#define STM32_TIM1SW STM32_TIM1SW_PCLK2
|
||||||
|
#define STM32_TIM8SW STM32_TIM8SW_PCLK2
|
||||||
|
#define STM32_RTCSEL STM32_RTCSEL_LSI
|
||||||
|
#define STM32_USB_CLOCK_REQUIRED TRUE
|
||||||
|
#define STM32_USBPRE STM32_USBPRE_DIV1P5
|
||||||
|
|
||||||
|
#undef STM32_HSE_BYPASS
|
||||||
|
// #error "oh no"
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ADC driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_ADC_DUAL_MODE FALSE
|
||||||
|
#define STM32_ADC_COMPACT_SAMPLES FALSE
|
||||||
|
#define STM32_ADC_USE_ADC1 FALSE
|
||||||
|
#define STM32_ADC_USE_ADC2 FALSE
|
||||||
|
#define STM32_ADC_USE_ADC3 FALSE
|
||||||
|
#define STM32_ADC_USE_ADC4 FALSE
|
||||||
|
#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1)
|
||||||
|
#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 1)
|
||||||
|
#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 5)
|
||||||
|
#define STM32_ADC_ADC4_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
|
||||||
|
#define STM32_ADC_ADC1_DMA_PRIORITY 2
|
||||||
|
#define STM32_ADC_ADC2_DMA_PRIORITY 2
|
||||||
|
#define STM32_ADC_ADC3_DMA_PRIORITY 2
|
||||||
|
#define STM32_ADC_ADC4_DMA_PRIORITY 2
|
||||||
|
#define STM32_ADC_ADC12_IRQ_PRIORITY 5
|
||||||
|
#define STM32_ADC_ADC3_IRQ_PRIORITY 5
|
||||||
|
#define STM32_ADC_ADC4_IRQ_PRIORITY 5
|
||||||
|
#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 5
|
||||||
|
#define STM32_ADC_ADC2_DMA_IRQ_PRIORITY 5
|
||||||
|
#define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 5
|
||||||
|
#define STM32_ADC_ADC4_DMA_IRQ_PRIORITY 5
|
||||||
|
#define STM32_ADC_ADC12_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1
|
||||||
|
#define STM32_ADC_ADC34_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1
|
||||||
|
|
||||||
|
/*
|
||||||
|
* CAN driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_CAN_USE_CAN1 FALSE
|
||||||
|
#define STM32_CAN_CAN1_IRQ_PRIORITY 11
|
||||||
|
|
||||||
|
/*
|
||||||
|
* DAC driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_DAC_DUAL_MODE FALSE
|
||||||
|
#define STM32_DAC_USE_DAC1_CH1 TRUE
|
||||||
|
#define STM32_DAC_USE_DAC1_CH2 TRUE
|
||||||
|
#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10
|
||||||
|
#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10
|
||||||
|
#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2
|
||||||
|
#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2
|
||||||
|
|
||||||
|
/*
|
||||||
|
* EXT driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_EXT_EXTI0_IRQ_PRIORITY 6
|
||||||
|
#define STM32_EXT_EXTI1_IRQ_PRIORITY 6
|
||||||
|
#define STM32_EXT_EXTI2_IRQ_PRIORITY 6
|
||||||
|
#define STM32_EXT_EXTI3_IRQ_PRIORITY 6
|
||||||
|
#define STM32_EXT_EXTI4_IRQ_PRIORITY 6
|
||||||
|
#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6
|
||||||
|
#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6
|
||||||
|
#define STM32_EXT_EXTI16_IRQ_PRIORITY 6
|
||||||
|
#define STM32_EXT_EXTI17_IRQ_PRIORITY 6
|
||||||
|
#define STM32_EXT_EXTI18_IRQ_PRIORITY 6
|
||||||
|
#define STM32_EXT_EXTI19_IRQ_PRIORITY 6
|
||||||
|
#define STM32_EXT_EXTI20_IRQ_PRIORITY 6
|
||||||
|
#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6
|
||||||
|
#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6
|
||||||
|
#define STM32_EXT_EXTI33_IRQ_PRIORITY 6
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GPT driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_GPT_USE_TIM1 FALSE
|
||||||
|
#define STM32_GPT_USE_TIM2 FALSE
|
||||||
|
#define STM32_GPT_USE_TIM3 FALSE
|
||||||
|
#define STM32_GPT_USE_TIM4 FALSE
|
||||||
|
#define STM32_GPT_USE_TIM6 TRUE
|
||||||
|
#define STM32_GPT_USE_TIM7 TRUE
|
||||||
|
#define STM32_GPT_USE_TIM8 TRUE
|
||||||
|
#define STM32_GPT_TIM1_IRQ_PRIORITY 7
|
||||||
|
#define STM32_GPT_TIM2_IRQ_PRIORITY 7
|
||||||
|
#define STM32_GPT_TIM3_IRQ_PRIORITY 7
|
||||||
|
#define STM32_GPT_TIM4_IRQ_PRIORITY 7
|
||||||
|
#define STM32_GPT_TIM6_IRQ_PRIORITY 7
|
||||||
|
#define STM32_GPT_TIM7_IRQ_PRIORITY 7
|
||||||
|
#define STM32_GPT_TIM8_IRQ_PRIORITY 7
|
||||||
|
|
||||||
|
/*
|
||||||
|
* I2C driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_I2C_USE_I2C1 TRUE
|
||||||
|
#define STM32_I2C_USE_I2C2 FALSE
|
||||||
|
#define STM32_I2C_BUSY_TIMEOUT 50
|
||||||
|
#define STM32_I2C_I2C1_IRQ_PRIORITY 10
|
||||||
|
#define STM32_I2C_I2C2_IRQ_PRIORITY 10
|
||||||
|
#define STM32_I2C_USE_DMA TRUE
|
||||||
|
#define STM32_I2C_I2C1_DMA_PRIORITY 1
|
||||||
|
#define STM32_I2C_I2C2_DMA_PRIORITY 1
|
||||||
|
#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ICU driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_ICU_USE_TIM1 FALSE
|
||||||
|
#define STM32_ICU_USE_TIM2 FALSE
|
||||||
|
#define STM32_ICU_USE_TIM3 FALSE
|
||||||
|
#define STM32_ICU_USE_TIM4 FALSE
|
||||||
|
#define STM32_ICU_USE_TIM8 FALSE
|
||||||
|
#define STM32_ICU_TIM1_IRQ_PRIORITY 7
|
||||||
|
#define STM32_ICU_TIM2_IRQ_PRIORITY 7
|
||||||
|
#define STM32_ICU_TIM3_IRQ_PRIORITY 7
|
||||||
|
#define STM32_ICU_TIM4_IRQ_PRIORITY 7
|
||||||
|
#define STM32_ICU_TIM8_IRQ_PRIORITY 7
|
||||||
|
|
||||||
|
/*
|
||||||
|
* PWM driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_PWM_USE_ADVANCED FALSE
|
||||||
|
#define STM32_PWM_USE_TIM1 FALSE
|
||||||
|
#define STM32_PWM_USE_TIM2 FALSE
|
||||||
|
#define STM32_PWM_USE_TIM3 FALSE
|
||||||
|
#define STM32_PWM_USE_TIM4 FALSE
|
||||||
|
#define STM32_PWM_USE_TIM8 FALSE
|
||||||
|
#define STM32_PWM_TIM1_IRQ_PRIORITY 7
|
||||||
|
#define STM32_PWM_TIM2_IRQ_PRIORITY 7
|
||||||
|
#define STM32_PWM_TIM3_IRQ_PRIORITY 7
|
||||||
|
#define STM32_PWM_TIM4_IRQ_PRIORITY 7
|
||||||
|
#define STM32_PWM_TIM8_IRQ_PRIORITY 7
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SERIAL driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_SERIAL_USE_USART1 FALSE
|
||||||
|
#define STM32_SERIAL_USE_USART2 FALSE
|
||||||
|
#define STM32_SERIAL_USE_USART3 FALSE
|
||||||
|
#define STM32_SERIAL_USE_UART4 FALSE
|
||||||
|
#define STM32_SERIAL_USE_UART5 FALSE
|
||||||
|
#define STM32_SERIAL_USART1_PRIORITY 12
|
||||||
|
#define STM32_SERIAL_USART2_PRIORITY 12
|
||||||
|
#define STM32_SERIAL_USART3_PRIORITY 12
|
||||||
|
#define STM32_SERIAL_UART4_PRIORITY 12
|
||||||
|
#define STM32_SERIAL_UART5_PRIORITY 12
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPI driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_SPI_USE_SPI1 FALSE
|
||||||
|
#define STM32_SPI_USE_SPI2 FALSE
|
||||||
|
#define STM32_SPI_USE_SPI3 FALSE
|
||||||
|
#define STM32_SPI_SPI1_DMA_PRIORITY 1
|
||||||
|
#define STM32_SPI_SPI2_DMA_PRIORITY 1
|
||||||
|
#define STM32_SPI_SPI3_DMA_PRIORITY 1
|
||||||
|
#define STM32_SPI_SPI1_IRQ_PRIORITY 10
|
||||||
|
#define STM32_SPI_SPI2_IRQ_PRIORITY 10
|
||||||
|
#define STM32_SPI_SPI3_IRQ_PRIORITY 10
|
||||||
|
#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ST driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_ST_IRQ_PRIORITY 8
|
||||||
|
#define STM32_ST_USE_TIMER 2
|
||||||
|
|
||||||
|
/*
|
||||||
|
* UART driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_UART_USE_USART1 FALSE
|
||||||
|
#define STM32_UART_USE_USART2 FALSE
|
||||||
|
#define STM32_UART_USE_USART3 FALSE
|
||||||
|
#define STM32_UART_USART1_IRQ_PRIORITY 12
|
||||||
|
#define STM32_UART_USART2_IRQ_PRIORITY 12
|
||||||
|
#define STM32_UART_USART3_IRQ_PRIORITY 12
|
||||||
|
#define STM32_UART_USART1_DMA_PRIORITY 0
|
||||||
|
#define STM32_UART_USART2_DMA_PRIORITY 0
|
||||||
|
#define STM32_UART_USART3_DMA_PRIORITY 0
|
||||||
|
#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* USB driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_USB_USE_USB1 TRUE
|
||||||
|
#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE
|
||||||
|
#define STM32_USB_USB1_HP_IRQ_PRIORITY 13
|
||||||
|
#define STM32_USB_USB1_LP_IRQ_PRIORITY 14
|
||||||
|
|
||||||
|
/*
|
||||||
|
* WDG driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_WDG_USE_IWDG FALSE
|
||||||
|
|
||||||
|
#endif /* MCUCONF_H */
|
||||||
@@ -1,24 +1,58 @@
|
|||||||
EXTRAFLAGS += -flto
|
# project specific files
|
||||||
LAYOUTS = 66_ansi
|
SRC = led.c
|
||||||
MCU = atmega32u4
|
LAYOUTS += 66_ansi
|
||||||
F_CPU = 16000000
|
|
||||||
ARCH = AVR8
|
## chip/board settings
|
||||||
F_USB = $(F_CPU)
|
# - the next two should match the directories in
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
||||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
MCU_FAMILY = STM32
|
||||||
|
MCU_SERIES = STM32F3xx
|
||||||
|
|
||||||
|
# Linker script to use
|
||||||
|
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
||||||
|
# or <this_dir>/ld/
|
||||||
|
MCU_LDSCRIPT = STM32F303xC
|
||||||
|
|
||||||
|
# Startup code to use
|
||||||
|
# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
|
||||||
|
MCU_STARTUP = stm32f3xx
|
||||||
|
|
||||||
|
# Board: it should exist either in <chibios>/os/hal/boards/
|
||||||
|
# or <this_dir>/boards
|
||||||
|
BOARD = GENERIC_STM32_F303XC
|
||||||
|
|
||||||
|
# Cortex version
|
||||||
|
MCU = cortex-m4
|
||||||
|
|
||||||
|
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
||||||
|
ARMV = 7
|
||||||
|
|
||||||
|
USE_FPU = yes
|
||||||
|
|
||||||
|
# Vector table for application
|
||||||
|
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
|
||||||
|
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
|
||||||
|
# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000
|
||||||
|
OPT_DEFS =
|
||||||
|
|
||||||
|
# Options to pass to dfu-util when flashing
|
||||||
|
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
|
||||||
|
|
||||||
|
# LED Configuration
|
||||||
|
LED_MATRIX_ENABLE = IS31FL3731
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# comment out to disable the options.
|
# comment out to disable the options.
|
||||||
#
|
#
|
||||||
BACKLIGHT_ENABLE = yes
|
BACKLIGHT_ENABLE = yes
|
||||||
BOOTMAGIC_ENABLE = no
|
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
||||||
MOUSEKEY_ENABLE = no
|
## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
|
||||||
EXTRAKEY_ENABLE = yes
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
CONSOLE_ENABLE = yes
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
COMMAND_ENABLE = no
|
CONSOLE_ENABLE = yes # Console for debug
|
||||||
NKRO_ENABLE = yes
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||||
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
|
#CUSTOM_MATRIX = yes # Custom matrix file
|
||||||
AUDIO_ENABLE = yes
|
AUDIO_ENABLE = yes
|
||||||
RGBLIGHT_ENABLE = yes
|
# SERIAL_LINK_ENABLE = yes
|
||||||
MIDI_ENABLE = no
|
|
||||||
UNICODE_ENABLE = no
|
|
||||||
BLUETOOTH_ENABLE = no
|
|
||||||
@@ -6,6 +6,30 @@
|
|||||||
#define _FL 1
|
#define _FL 1
|
||||||
#define _CL 2
|
#define _CL 2
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
S_BSKTC = SAFE_RANGE,
|
||||||
|
S_ODEJY,
|
||||||
|
S_RCKBY,
|
||||||
|
S_DOEDR,
|
||||||
|
S_SCALE,
|
||||||
|
S_ONEUP,
|
||||||
|
S_COIN,
|
||||||
|
S_SONIC,
|
||||||
|
S_ZELDA
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
float song_basketcase[][2] = SONG(BASKET_CASE);
|
||||||
|
float song_ode_to_joy[][2] = SONG(ODE_TO_JOY);
|
||||||
|
float song_rock_a_bye_baby[][2] = SONG(ROCK_A_BYE_BABY);
|
||||||
|
float song_doe_a_deer[][2] = SONG(DOE_A_DEER);
|
||||||
|
float song_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||||
|
float song_coin[][2] = SONG(COIN_SOUND);
|
||||||
|
float song_one_up[][2] = SONG(ONE_UP_SOUND);
|
||||||
|
float song_sonic_ring[][2] = SONG(SONIC_RING);
|
||||||
|
float song_zelda_puzzle[][2] = SONG(ZELDA_PUZZLE);
|
||||||
|
#endif
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
/* Keymap _BL: Base Layer (Default Layer)
|
/* Keymap _BL: Base Layer (Default Layer)
|
||||||
*/
|
*/
|
||||||
@@ -28,9 +52,72 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
/* Keymap _CL: Control layer
|
/* Keymap _CL: Control layer
|
||||||
*/
|
*/
|
||||||
[_CL] = LAYOUT(
|
[_CL] = LAYOUT(
|
||||||
BL_STEP,RGB_M_P,RGB_M_B,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______,_______,_______,_______, RGB_TOG, RGB_VAI, \
|
BL_STEP,S_ONEUP,S_SCALE,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______,_______,_______,_______, BL_TOGG, BL_INC, \
|
||||||
_______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, \
|
_______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC, \
|
||||||
_______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
|
_______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
|
||||||
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, RGB_SAI, \
|
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, RGB_SAI, \
|
||||||
_______,_______,_______, RGB_MOD,RGB_MOD, _______,_______,MO(_FL),_______,RGB_HUD,RGB_SAD,RGB_HUI),
|
_______,_______,_______, BL_BRTG,BL_BRTG, _______,_______,MO(_FL),_______,RGB_HUD,RGB_SAD,RGB_HUI),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
case S_BSKTC:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_SONG(song_basketcase);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case S_ODEJY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_SONG(song_ode_to_joy);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case S_RCKBY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_SONG(song_rock_a_bye_baby);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case S_DOEDR:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_SONG(song_doe_a_deer);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case S_SCALE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_SONG(song_scale);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case S_ONEUP:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_SONG(song_one_up);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case S_COIN:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_SONG(song_coin);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case S_SONIC:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_SONG(song_sonic_ring);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case S_ZELDA:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_SONG(song_zelda_puzzle);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
#define PRODUCT_ID 0x2390
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 10
|
||||||
|
#define MATRIX_COLS 8
|
||||||
|
|
||||||
|
// ROWS: Top to bottom, COLS: Left to right
|
||||||
|
/* Row pin configuration
|
||||||
|
* row: 0 1 2 3 4 5 6 7 8 9
|
||||||
|
* pin: B2 C7 C6 B6 B5 B0 B3 D5 D3 D2
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define MATRIX_ROW_PINS { B2, C7, C6, B6, B5, B0, B3, D5, D3, D2 }
|
||||||
|
/* Column pin configuration
|
||||||
|
* col: 0 1 2 3 4 5 6 7
|
||||||
|
* pin: F0 F1 F4 F5 F6 F7 E6 B1
|
||||||
|
*/
|
||||||
|
#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, E6, B1 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* Speaker configuration
|
||||||
|
*/
|
||||||
|
#define B7_AUDIO
|
||||||
|
#define NO_MUSIC_MODE
|
||||||
|
#define AUDIO_CLICKY
|
||||||
|
|
||||||
|
/* Space savings
|
||||||
|
*/
|
||||||
|
#define NO_ACTION_TAPPING
|
||||||
|
|
||||||
|
/* Backlight configuration
|
||||||
|
*/
|
||||||
|
#define BACKLIGHT_LEVELS 1
|
||||||
|
|
||||||
|
/* Underlight configuration
|
||||||
|
*/
|
||||||
|
#define RGB_DI_PIN D7
|
||||||
|
#define RGBLED_NUM 26 // Number of LEDs
|
||||||
|
#define RGBLIGHT_HUE_STEP 32
|
||||||
|
#define RGBLIGHT_SAT_STEP 17
|
||||||
|
#define RGBLIGHT_VAL_STEP 17
|
||||||
|
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
||||||
|
#define RGBLIGHT_EFFECT_BREATHE_MAX 200
|
||||||
|
#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 666*2
|
||||||
|
#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1
|
||||||
|
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 4 // How many LEDs wide to light up
|
||||||
|
#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 16 // The led to start at
|
||||||
|
#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 8 // How many LEDs to travel
|
||||||
|
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // How many LEDs wide to light up
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
#include "prototype.h"
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include "backlight.h"
|
||||||
|
#include "print.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();
|
||||||
|
|
||||||
|
// JTAG disable for PORT F. write JTD bit twice within four cycles.
|
||||||
|
MCUCR |= (1<<JTD);
|
||||||
|
MCUCR |= (1<<JTD);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void backlight_init_ports(void) {
|
||||||
|
print("init_backlight_pin()\n");
|
||||||
|
// Set our LED pins as output
|
||||||
|
DDRD |= (1<<0); // Esc
|
||||||
|
DDRD |= (1<<4); // Page Up
|
||||||
|
DDRD |= (1<<1); // Arrows
|
||||||
|
|
||||||
|
// Set our LED pins low
|
||||||
|
PORTD &= ~(1<<0); // Esc
|
||||||
|
PORTD &= ~(1<<4); // Page Up
|
||||||
|
PORTD &= ~(1<<1); // Arrows
|
||||||
|
}
|
||||||
|
|
||||||
|
void backlight_set(uint8_t level) {
|
||||||
|
if ( level == 0 ) {
|
||||||
|
// Turn off light
|
||||||
|
PORTD |= (1<<0); // Esc
|
||||||
|
PORTD |= (1<<4); // Page Up
|
||||||
|
PORTD |= (1<<1); // Arrows
|
||||||
|
} else {
|
||||||
|
// Turn on light
|
||||||
|
PORTD &= ~(1<<0); // Esc
|
||||||
|
PORTD &= ~(1<<4); // Page Up
|
||||||
|
PORTD &= ~(1<<1); // Arrows
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_init_ports() {
|
||||||
|
// * Set our LED pins as output
|
||||||
|
DDRB |= (1<<4);
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
DDRB |= (1<<4);
|
||||||
|
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||||
|
// Turn capslock on
|
||||||
|
PORTB |= (1<<4);
|
||||||
|
} else {
|
||||||
|
// Turn capslock off
|
||||||
|
PORTB &= ~(1<<4);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
/* Clueboard matrix layout
|
||||||
|
* ,-----------------------------------------------------------. ,---.
|
||||||
|
* | 00| 01| 02| 03| 04| 05| 06| 07| 50| 51| 52| 53| 54| 56 | | 57|
|
||||||
|
* |-----------------------------------------------------------| |---|
|
||||||
|
* | 10| 11| 12| 13| 14| 15| 16| 17| 60| 61| 62| 63| 64| 65| | 67|
|
||||||
|
* |-----------------------------------------------------------| `---'
|
||||||
|
* | 20| 21| 22| 23| 24| 25| 26| 27| 70| 71| 72| 73| 74| 75|
|
||||||
|
* |------------------------------------------------------------.
|
||||||
|
* | 30| 31| 32| 33| 34| 35| 36| 37| 80| 81| 82| 83| 84| 85|86|
|
||||||
|
* |------------------------------------------------------------------.
|
||||||
|
* | 40| 41| 42| 43| 45| 46| 90| 92| 93| 94| 95| 96| 97|
|
||||||
|
* `------------------------------------------------------------------'
|
||||||
|
* ,-----------------------------------------------------------. ,---.
|
||||||
|
* | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |Ins|
|
||||||
|
* |-----------------------------------------------------------| |---|
|
||||||
|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|
|
||||||
|
* |-----------------------------------------------------------| `---'
|
||||||
|
* |Caps | A| S| D| F| G| H| J| k| L| ;| '|Enter |
|
||||||
|
* |--------------------------------------------------------------.
|
||||||
|
* |Shift| \| Z| X| C| V| B| N| M| ,| .| /| \|Shift| Up|
|
||||||
|
* |------------------------------------------------------------------.
|
||||||
|
* |Ctrl|Alt|Gui | Space| Space|Gui |Alt |Fn |Ctrl|Left|Down|Rgt|
|
||||||
|
* `------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
// The first section contains all of the arguments
|
||||||
|
// The second converts the arguments into a two-dimensional array
|
||||||
|
|
||||||
|
#define LAYOUT_all( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k56, k57, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k65, k67, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k75, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k80, k81, k82, k83, k84, k85, k86, \
|
||||||
|
k40, k41, k42, k45, k46, k90, k92, k93, k94, k95, k96, k97 \
|
||||||
|
) { \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, k07 }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15, k16, k17 }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25, k26, k27 }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35, k36, k37 }, \
|
||||||
|
{ k40, k41, k42, KC_NO, KC_NO, k45, k46, KC_NO }, \
|
||||||
|
{ k50, k51, k52, k53, k54, KC_NO, k56, k57 }, \
|
||||||
|
{ k60, k61, k62, k63, k64, k65, KC_NO, k67 }, \
|
||||||
|
{ k70, k71, k72, k73, KC_NO, k75, KC_NO, KC_NO }, \
|
||||||
|
{ k80, k81, k82, k83, k84, k85, k86, KC_NO }, \
|
||||||
|
{ k90, KC_NO, k92, k93, k94, k95, k96, k97 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k56, k57, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k65, k67, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k75, \
|
||||||
|
k30, k32, k33, k34, k35, k36, k37, k80, k81, k82, k83, k85, k86, \
|
||||||
|
k40, k41, k42, k45, k46, k90, k92, k93, k94, k95, k96, k97 \
|
||||||
|
) { \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, k07 }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15, k16, k17 }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25, k26, k27 }, \
|
||||||
|
{ k30, KC_NO, k32, k33, k34, k35, k36, k37 }, \
|
||||||
|
{ k40, k41, k42, KC_NO, KC_NO, k45, k46, KC_NO }, \
|
||||||
|
{ k50, k51, k52, k53, k54, KC_NO, k56, k57 }, \
|
||||||
|
{ k60, k61, k62, k63, k64, k65, KC_NO, k67 }, \
|
||||||
|
{ k70, k71, k72, k73, KC_NO, k75, KC_NO, KC_NO }, \
|
||||||
|
{ k80, k81, k82, k83, KC_NO, k85, k86, KC_NO }, \
|
||||||
|
{ k90, KC_NO, k92, k93, k94, k95, k96, k97 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_66_ansi( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k56, k57, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k65, k67, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k75, \
|
||||||
|
k30, k32, k33, k34, k35, k36, k37, k80, k81, k82, k83, k85, k86, \
|
||||||
|
k40, k41, k42, k46, k92, k93, k94, k95, k96, k97 \
|
||||||
|
) { \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, k07 }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15, k16, k17 }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25, k26, k27 }, \
|
||||||
|
{ k30, KC_NO, k32, k33, k34, k35, k36, k37 }, \
|
||||||
|
{ k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO }, \
|
||||||
|
{ k50, k51, k52, k53, k54, KC_NO, k56, k57 }, \
|
||||||
|
{ k60, k61, k62, k63, k64, k65, KC_NO, k67 }, \
|
||||||
|
{ k70, k71, k72, k73, KC_NO, k75, KC_NO, KC_NO }, \
|
||||||
|
{ k80, k81, k82, k83, KC_NO, k85, k86, KC_NO }, \
|
||||||
|
{ KC_NO, KC_NO, k92, k93, k94, k95, k96, k97 } \
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
EXTRAFLAGS += -flto
|
||||||
|
LAYOUTS = 66_ansi
|
||||||
|
MCU = atmega32u4
|
||||||
|
F_CPU = 16000000
|
||||||
|
ARCH = AVR8
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# comment out to disable the options.
|
||||||
|
#
|
||||||
|
BACKLIGHT_ENABLE = yes
|
||||||
|
BOOTMAGIC_ENABLE = no
|
||||||
|
MOUSEKEY_ENABLE = no
|
||||||
|
EXTRAKEY_ENABLE = yes
|
||||||
|
CONSOLE_ENABLE = yes
|
||||||
|
COMMAND_ENABLE = no
|
||||||
|
NKRO_ENABLE = yes
|
||||||
|
AUDIO_ENABLE = yes
|
||||||
|
RGBLIGHT_ENABLE = yes
|
||||||
|
MIDI_ENABLE = no
|
||||||
|
UNICODE_ENABLE = no
|
||||||
|
BLUETOOTH_ENABLE = no
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2019 Adam Newbold <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x0000
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER Apple Inc.
|
||||||
|
#define PRODUCT Numeric Keypad IIe
|
||||||
|
#define DESCRIPTION "Numeric Keypad IIe, A2M2003"
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
Pin Mappings
|
||||||
|
============
|
||||||
|
|
||||||
|
Dsub-15 Connection
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Dsub-15 (female)
|
||||||
|
,-------------------------.
|
||||||
|
\ 08 07 06 05 04 03 02 01 /
|
||||||
|
\ 15 14 13 12 11 10 09 /
|
||||||
|
`---------------------'
|
||||||
|
|
||||||
|
Header Pins
|
||||||
|
-----------
|
||||||
|
_____________________________________
|
||||||
|
| |
|
||||||
|
| 11 10 9 8 7 6 5 4 3 2 1 |
|
||||||
|
|_____________________________________|
|
||||||
|
|
||||||
|
|
||||||
|
Header / Matrix
|
||||||
|
---------------
|
||||||
|
|
||||||
|
Pin Name Description
|
||||||
|
--------------------------------------------------------------
|
||||||
|
1,2,5,3,4,6 Y0-Y5 Y-direction key-matrix connections
|
||||||
|
7 NC
|
||||||
|
9,11,10,8 X4-X7 X-direction key-matrix connections
|
||||||
|
|
||||||
|
|
||||||
|
Microcontroller Configuration
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
(Pins are for an Arduino Micro)
|
||||||
|
|
||||||
|
+-----------------------------------+
|
||||||
|
| Dsub-15 | Header | Matrix | Micro |
|
||||||
|
|---------+--------+--------+-------|
|
||||||
|
| 12 | 11 | X5 | B0 |
|
||||||
|
| 11 | 10 | X6 | D3 |
|
||||||
|
| 10 | 9 | X4 | B2 |
|
||||||
|
| 9 | 8 | X7 | D2 |
|
||||||
|
| NC | 7 | NC | -- |
|
||||||
|
| 7 | 6 | Y5 | E6 |
|
||||||
|
| 6 | 5 | Y2 | D4 |
|
||||||
|
| 5 | 4 | Y4 | D7 |
|
||||||
|
| 3 | 3 | Y3 | C6 |
|
||||||
|
| 2 | 2 | Y1 | D0 |
|
||||||
|
| 1 | 1 | Y0 | D1 |
|
||||||
|
+-----------------------------------+
|
||||||
|
|
||||||
|
Note: Dsub-15 pins 4, 8, 13, 14, and 15 are unused
|
||||||
|
|
||||||
|
Reference
|
||||||
|
---------
|
||||||
|
|
||||||
|
https://deskthority.net/wiki/Apple_Numeric_Keypad_IIe
|
||||||
|
https://geekhack.org/index.php?topic=78048.0
|
||||||
|
http://wiki.apple2.org/index.php?title=Pinouts#Apple_.2F.2Fe_Numeric_Keypad_connector
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define MATRIX_ROWS 4
|
||||||
|
#define MATRIX_COLS 6
|
||||||
|
#define MATRIX_ROW_PINS { B0, B2, D2, D3 }
|
||||||
|
#define MATRIX_COL_PINS { D1, D0, D4, C6, D7, E6 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
#define SOFT_SERIAL_PIN D0
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Numeric Keypad IIe",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 7.5,
|
||||||
|
"height": 4,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"7", "x":2, "y":0}, {"label":"8", "x":3, "y":0}, {"label":"9", "x":4, "y":0}, {"label":"(", "x":5.5, "y":0}, {"label":")", "x":6.5, "y":0}, {"label":"\u2190", "x":0, "y":1}, {"label":"4", "x":2, "y":1}, {"label":"5", "x":3, "y":1}, {"label":"6", "x":4, "y":1}, {"label":"\u2212", "x":5.5, "y":1}, {"label":"\u00f7", "x":6.5, "y":1}, {"label":"\u2192", "x":0, "y":2}, {"label":"1", "x":2, "y":2}, {"label":"2", "x":3, "y":2}, {"label":"3", "x":4, "y":2}, {"label":"+", "x":5.5, "y":2}, {"label":"\u00d7", "x":6.5, "y":2}, {"label":"Space", "x":0, "y":3}, {"label":"0", "x":1.5, "y":3, "w":1.5}, {"label":",", "x":3, "y":3}, {"label":".", "x":4, "y":3}, {"label":"Ret", "x":5.5, "y":3}, {"label":"Print", "x":6.5, "y":3}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
/* Copyright 2019 Adam Newbold <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
// place overrides here
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
/* Copyright 2019 Adam Newbold <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Defines the keycodes used by our macros in process_record_user
|
||||||
|
enum custom_keycodes {
|
||||||
|
QMKBEST = SAFE_RANGE,
|
||||||
|
QMKURL
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/*
|
||||||
|
+-------+ +-------+-------+-------+ +-------+-------+
|
||||||
|
| Esc | | 7 | 8 | 9 | | ( | ) |
|
||||||
|
+-------+ +-------+-------+-------+ +-------+-------+
|
||||||
|
| <-- | | 4 | 5 | 6 | | - | / |
|
||||||
|
+-------+ +-------+-------+-------+ +-------+-------+
|
||||||
|
| --> | | 1 | 2 | 3 | | + | * |
|
||||||
|
+-------+ +--+-------+-------+-------+ +-------+-------+
|
||||||
|
| Space | | 0 | , | . | | Ret | Print |
|
||||||
|
+-------+ +----------+-------+-------+ +-------+-------+
|
||||||
|
*/
|
||||||
|
[0] = LAYOUT(
|
||||||
|
KC_ESCAPE, KC_KP_7, KC_KP_8, KC_KP_9, KC_LEFT_PAREN, KC_RIGHT_PAREN, \
|
||||||
|
KC_LEFT, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_MINUS, KC_KP_SLASH, \
|
||||||
|
KC_RIGHT, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_PLUS, KC_KP_ASTERISK, \
|
||||||
|
KC_SPACE, KC_KP_0, KC_KP_COMMA, KC_KP_DOT, KC_RETURN, KC_QUESTION \
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void keyboard_post_init_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
|
||||||
|
}
|
||||||
Loaded 100 of 489 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user