Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
28fbf84cc5 | ||
|
|
8b6cdd1788 | ||
|
|
d46d304395 | ||
|
|
b11c332477 | ||
|
|
200ee8e797 | ||
|
|
7c63c0a950 | ||
|
|
a5a46f3d36 | ||
|
|
fb900e2ad1 | ||
|
|
930e1dfc4c | ||
|
|
cce19d265d | ||
|
|
a003be1e9c | ||
|
|
3bef186ea6 | ||
|
|
e5380795b9 | ||
|
|
4a5e68f4f2 | ||
|
|
e99615b2ac | ||
|
|
090c30212e | ||
|
|
753f57ee00 | ||
|
|
fd3b0787ed | ||
|
|
16302be5ad | ||
|
|
b8db0b26b1 | ||
|
|
614b3a0f7c |
No files matched your search
@@ -68,7 +68,7 @@ These allow you to combine a modifier with a keycode. When pressed, the keydown
|
|||||||
|`LGUI(kc)`|`LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
|`LGUI(kc)`|`LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
||||||
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
||||||
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
||||||
|`RALT(kc)`| |Hold Right Alt and press `kc` |
|
|`RALT(kc)`|`ALGR(kc)` |Hold Right Alt and press `kc` |
|
||||||
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)`|Hold Right GUI and press `kc` |
|
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)`|Hold Right GUI and press `kc` |
|
||||||
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`|
|
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`|
|
||||||
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|
||||||
@@ -92,7 +92,7 @@ The modifiers this keycode and `OSM()` accept are prefixed with `MOD_`, not `KC_
|
|||||||
|`MOD_LGUI`|Left GUI (Windows/Command/Meta key) |
|
|`MOD_LGUI`|Left GUI (Windows/Command/Meta key) |
|
||||||
|`MOD_RCTL`|Right Control |
|
|`MOD_RCTL`|Right Control |
|
||||||
|`MOD_RSFT`|Right Shift |
|
|`MOD_RSFT`|Right Shift |
|
||||||
|`MOD_RALT`|Right Alt |
|
|`MOD_RALT`|Right Alt (AltGr) |
|
||||||
|`MOD_RGUI`|Right GUI (Windows/Command/Meta key) |
|
|`MOD_RGUI`|Right GUI (Windows/Command/Meta key) |
|
||||||
|`MOD_HYPR`|Hyper (Left Control, Shift, Alt and GUI)|
|
|`MOD_HYPR`|Hyper (Left Control, Shift, Alt and GUI)|
|
||||||
|`MOD_MEH` |Meh (Left Control, Shift, and Alt) |
|
|`MOD_MEH` |Meh (Left Control, Shift, and Alt) |
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ and this to your `config.h`:
|
|||||||
Each PAD_A/B variable defines an array so multiple encoders can be defined, e.g.:
|
Each PAD_A/B variable defines an array so multiple encoders can be defined, e.g.:
|
||||||
|
|
||||||
#define ENCODERS_PAD_A { encoder1a, encoder2a }
|
#define ENCODERS_PAD_A { encoder1a, encoder2a }
|
||||||
#define ENCODERS_PAD_B { encoder1a, encoder2b }
|
#define ENCODERS_PAD_B { encoder1b, encoder2b }
|
||||||
|
|
||||||
If your encoder's clockwise directions are incorrect, you can swap the A & B pad definitions.
|
If your encoder's clockwise directions are incorrect, you can swap the A & B pad definitions.
|
||||||
|
|
||||||
|
|||||||
+88
-70
@@ -12,24 +12,28 @@ Here is an example `keymap.c` for a two-key keyboard:
|
|||||||
|
|
||||||
```c
|
```c
|
||||||
enum custom_keycodes {
|
enum custom_keycodes {
|
||||||
MY_CUSTOM_MACRO = SAFE_RANGE
|
QMKBEST = SAFE_RANGE,
|
||||||
};
|
};
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
if (record->event.pressed) {
|
switch (keycode) {
|
||||||
switch(keycode) {
|
case QMKBEST:
|
||||||
case MY_CUSTOM_MACRO:
|
if (record->event.pressed) {
|
||||||
SEND_STRING("QMK is the best thing ever!"); // this is our macro!
|
// when keycode QMKBEST is pressed
|
||||||
return false;
|
SEND_STRING("QMK is the best thing ever!");
|
||||||
}
|
} else {
|
||||||
}
|
// when keycode QMKBEST is released
|
||||||
return true;
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
{MY_CUSTOM_MACRO, KC_ESC}
|
{QMKBEST, KC_ESC}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -37,7 +41,7 @@ What happens here is this:
|
|||||||
We first define a new custom keycode in the range not occupied by any other keycodes.
|
We first define a new custom keycode in the range not occupied by any other keycodes.
|
||||||
Then we use the `process_record_user` function, which is called whenever a key is pressed or released, to check if our custom keycode has been activated.
|
Then we use the `process_record_user` function, which is called whenever a key is pressed or released, to check if our custom keycode has been activated.
|
||||||
If yes, we send the string `"QMK is the best thing ever!"` to the computer via the `SEND_STRING` macro (this is a C preprocessor macro, not to be confused with QMK macros).
|
If yes, we send the string `"QMK is the best thing ever!"` to the computer via the `SEND_STRING` macro (this is a C preprocessor macro, not to be confused with QMK macros).
|
||||||
We return `false` to indicate to the caller that the key press we just processed need not be processed any further.
|
We return `true` to indicate to the caller that the key press we just processed should continue to be processed as normal (as we didn't replace or alter the functionality).
|
||||||
Finally, we define the keymap so that the first button activates our macro and the second button is just an escape button.
|
Finally, we define the keymap so that the first button activates our macro and the second button is just an escape button.
|
||||||
|
|
||||||
You might want to add more than one macro.
|
You might want to add more than one macro.
|
||||||
@@ -45,28 +49,42 @@ You can do that by adding another keycode and adding another case to the switch
|
|||||||
|
|
||||||
```c
|
```c
|
||||||
enum custom_keycodes {
|
enum custom_keycodes {
|
||||||
MY_CUSTOM_MACRO = SAFE_RANGE,
|
QMKBEST = SAFE_RANGE,
|
||||||
MY_OTHER_MACRO
|
QMKURL,
|
||||||
|
MY_OTHER_MACRO
|
||||||
};
|
};
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
if (record->event.pressed) {
|
switch (keycode) {
|
||||||
switch(keycode) {
|
case QMKBEST:
|
||||||
case MY_CUSTOM_MACRO:
|
if (record->event.pressed) {
|
||||||
SEND_STRING("QMK is the best thing ever!");
|
// when keycode QMKBEST is pressed
|
||||||
return false;
|
SEND_STRING("QMK is the best thing ever!");
|
||||||
case MY_OTHER_MACRO:
|
} else {
|
||||||
SEND_STRING(SS_LCTRL("ac")); // selects all and copies
|
// when keycode QMKBEST is released
|
||||||
return false;
|
}
|
||||||
}
|
break;
|
||||||
}
|
case QMKURL:
|
||||||
return true;
|
if (record->event.pressed) {
|
||||||
|
// when keycode QMKURL is pressed
|
||||||
|
SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
|
||||||
|
} else {
|
||||||
|
// when keycode QMKURL is released
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MY_OTHER_MACRO:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING(SS_LCTRL("ac")); // selects all and copies
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
{MY_CUSTOM_MACRO, MY_OTHER_MACRO}
|
{MY_CUSTOM_MACRO, MY_OTHER_MACRO}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -136,21 +154,21 @@ By default QMK assumes you don't have any macros. To define your macros you crea
|
|||||||
|
|
||||||
```c
|
```c
|
||||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
switch(id) {
|
switch(id) {
|
||||||
case 0:
|
case 0:
|
||||||
return MACRO(D(LSFT), T(H), U(LSFT), T(I), D(LSFT), T(1), U(LSFT), END);
|
return MACRO(D(LSFT), T(H), U(LSFT), T(I), D(LSFT), T(1), U(LSFT), END);
|
||||||
case 1:
|
case 1:
|
||||||
return MACRO(D(LSFT), T(B), U(LSFT), T(Y), T(E), D(LSFT), T(1), U(LSFT), END);
|
return MACRO(D(LSFT), T(B), U(LSFT), T(Y), T(E), D(LSFT), T(1), U(LSFT), END);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return MACRO_NONE;
|
return MACRO_NONE;
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
This defines two macros which will be run when the key they are assigned to is pressed. If instead you'd like them to run when the key is released you can change the if statement:
|
This defines two macros which will be run when the key they are assigned to is pressed. If instead you'd like them to run when the key is released you can change the if statement:
|
||||||
|
|
||||||
if (!record->event.pressed) {
|
if (!record->event.pressed) {
|
||||||
|
|
||||||
### Macro Commands
|
### Macro Commands
|
||||||
|
|
||||||
@@ -169,21 +187,21 @@ Use the `M()` function within your `KEYMAP()` to call a macro. For example, here
|
|||||||
|
|
||||||
```c
|
```c
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[0] = KEYMAP(
|
[0] = KEYMAP(
|
||||||
M(0), M(1)
|
M(0), M(1)
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
switch(id) {
|
switch(id) {
|
||||||
case 0:
|
case 0:
|
||||||
return MACRO(D(LSFT), T(H), U(LSFT), T(I), D(LSFT), T(1), U(LSFT), END);
|
return MACRO(D(LSFT), T(H), U(LSFT), T(I), D(LSFT), T(1), U(LSFT), END);
|
||||||
case 1:
|
case 1:
|
||||||
return MACRO(D(LSFT), T(B), U(LSFT), T(Y), T(E), D(LSFT), T(1), U(LSFT), END);
|
return MACRO(D(LSFT), T(B), U(LSFT), T(Y), T(E), D(LSFT), T(1), U(LSFT), END);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return MACRO_NONE;
|
return MACRO_NONE;
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -198,9 +216,9 @@ If you have a bunch of macros you want to refer to from your keymap while keepin
|
|||||||
#define M_BYE M(1)
|
#define M_BYE M(1)
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[0] = KEYMAP(
|
[0] = KEYMAP(
|
||||||
M_HI, M_BYE
|
M_HI, M_BYE
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -213,11 +231,11 @@ There are some functions you may find useful in macro-writing. Keep in mind that
|
|||||||
This is a boolean value that can be tested to see if the switch is being pressed or released. An example of this is
|
This is a boolean value that can be tested to see if the switch is being pressed or released. An example of this is
|
||||||
|
|
||||||
```c
|
```c
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
// on keydown
|
// on keydown
|
||||||
} else {
|
} else {
|
||||||
// on keyup
|
// on keyup
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### `register_code(<kc>);`
|
### `register_code(<kc>);`
|
||||||
@@ -250,16 +268,16 @@ This example defines a macro which sends `Ctrl-C` when pressed down, and `Ctrl-V
|
|||||||
|
|
||||||
```c
|
```c
|
||||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||||
switch(id) {
|
switch(id) {
|
||||||
case 0: {
|
case 0: {
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
return MACRO( D(LCTL), T(C), U(LCTL), END );
|
return MACRO( D(LCTL), T(C), U(LCTL), END );
|
||||||
} else {
|
} else {
|
||||||
return MACRO( D(LCTL), T(V), U(LCTL), END );
|
return MACRO( D(LCTL), T(V), U(LCTL), END );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return MACRO_NONE;
|
return MACRO_NONE;
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
+2
-2
@@ -177,7 +177,7 @@ This is a reference only. Each group of keys links to the page documenting their
|
|||||||
|`KC_LGUI` |`KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) |
|
|`KC_LGUI` |`KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) |
|
||||||
|`KC_RCTRL` |`KC_RCTL` |Right Control |
|
|`KC_RCTRL` |`KC_RCTL` |Right Control |
|
||||||
|`KC_RSHIFT` |`KC_RSFT` |Right Shift |
|
|`KC_RSHIFT` |`KC_RSFT` |Right Shift |
|
||||||
|`KC_RALT` | |Right Alt |
|
|`KC_RALT` |`KC_ALGR` |Right Alt (AltGr) |
|
||||||
|`KC_RGUI` |`KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key) |
|
|`KC_RGUI` |`KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key) |
|
||||||
|`KC_SYSTEM_POWER` |`KC_PWR` |System Power Down |
|
|`KC_SYSTEM_POWER` |`KC_PWR` |System Power Down |
|
||||||
|`KC_SYSTEM_SLEEP` |`KC_SLEP` |System Sleep |
|
|`KC_SYSTEM_SLEEP` |`KC_SLEP` |System Sleep |
|
||||||
@@ -331,7 +331,7 @@ This is a reference only. Each group of keys links to the page documenting their
|
|||||||
|`LGUI(kc)`|`LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
|`LGUI(kc)`|`LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
||||||
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
||||||
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
||||||
|`RALT(kc)`| |Hold Right Alt and press `kc` |
|
|`RALT(kc)`|`ALGR(kc)` |Hold Right Alt and press `kc` |
|
||||||
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)`|Hold Right GUI and press `kc` |
|
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)`|Hold Right GUI and press `kc` |
|
||||||
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`|
|
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`|
|
||||||
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07
|
|||||||
|`KC_LGUI` |`KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) |
|
|`KC_LGUI` |`KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) |
|
||||||
|`KC_RCTRL` |`KC_RCTL` |Right Control |
|
|`KC_RCTRL` |`KC_RCTL` |Right Control |
|
||||||
|`KC_RSHIFT`|`KC_RSFT` |Right Shift |
|
|`KC_RSHIFT`|`KC_RSFT` |Right Shift |
|
||||||
|`KC_RALT` | |Right Alt |
|
|`KC_RALT` |`KC_ALGR` |Right Alt (AltGr) |
|
||||||
|`KC_RGUI` |`KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key)|
|
|`KC_RGUI` |`KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key)|
|
||||||
|
|
||||||
## International
|
## International
|
||||||
|
|||||||
@@ -0,0 +1,196 @@
|
|||||||
|
// this is the style you want to emulate.
|
||||||
|
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
#define _QWERTY 0
|
||||||
|
#define _LOWER 1
|
||||||
|
#define _RAISE 2
|
||||||
|
#define _MOUSE 8
|
||||||
|
#define _ADJUST 16
|
||||||
|
|
||||||
|
|
||||||
|
enum dichotomy_keycodes
|
||||||
|
{
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
ADJUST,
|
||||||
|
MOUKEY,
|
||||||
|
MS_BTN1,
|
||||||
|
MS_BTN2,
|
||||||
|
MS_BTN3
|
||||||
|
};
|
||||||
|
|
||||||
|
#define RED_BRIGHTNESS 3
|
||||||
|
#define GREEN_BRIGHTNESS 2
|
||||||
|
#define BLUE_BRIGHTNESS 2
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
|
||||||
|
[_QWERTY] = LAYOUT( /* Base layout, nearly qwerty but with modifications because it's not a full keyboard. Obviously. */
|
||||||
|
KC_ESCAPE, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||||
|
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MOUKEY,
|
||||||
|
KC_LCTL, KC_LALT, MOUKEY, KC_RGUI, KC_RALT, KC_RCTL,
|
||||||
|
MS_BTN3, SFT_T(KC_ESCAPE), KC_LGUI, KC_BSPC, KC_SPC, RAISE, LOWER, MS_BTN3
|
||||||
|
),
|
||||||
|
|
||||||
|
[_RAISE] = LAYOUT( /* Shifted layout, small changes (because angle brackets have been moved to thumb cluster buttons) */
|
||||||
|
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
|
||||||
|
_______, _______, KC_VOLD, KC_VOLU, KC_MPLY, KC_MFFD, KC_MUTE, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______,
|
||||||
|
_______, _______, _______, _______, _______, KC_MRWD, _______, _______, _______, KC_BSLS, KC_QUOT, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, KC_LABK, _______, _______, KC_RABK, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[_LOWER] = LAYOUT( /* Number layout, basically the main function layer */
|
||||||
|
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
|
||||||
|
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______,
|
||||||
|
_______, KC_TILD, KC_GRV, KC_F13, KC_F14, KC_F15, KC_F16, KC_F7, KC_F8, KC_F9, KC_F10, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______,
|
||||||
|
_______, RAISE, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[_ADJUST] = LAYOUT( /* Shifted number/function layout, for per-key control. Only active when shift is held, and number is toggled or held */
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[_MOUSE] = LAYOUT( /* Mouse layer, including buttons for clicking. */
|
||||||
|
_______, _______, _______, _______, _______, _______, KC_VOLU, KC_HOME, KC_PGUP, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, MS_BTN1, MS_BTN2, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, KC_VOLD, KC_END, KC_PGDN, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, KC_UP, _______,
|
||||||
|
_______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______
|
||||||
|
)
|
||||||
|
|
||||||
|
}; // end keymaps block
|
||||||
|
|
||||||
|
static bool shift_held = false;
|
||||||
|
static bool shift_suspended = false;
|
||||||
|
report_mouse_t currentReport = {};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case QWERTY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
set_single_persistent_default_layer(_QWERTY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case LOWER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_LOWER);
|
||||||
|
grn_led_on();
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_LOWER);
|
||||||
|
grn_led_off();
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
//SHIFT is handled as LSHIFT in the general case - 'toggle' shoudl activate caps, while the layer is only active when shift is held.
|
||||||
|
case RAISE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_RAISE);
|
||||||
|
red_led_on();
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_RAISE);
|
||||||
|
red_led_off();
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case ADJUST:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
//MOUSE layer needs to be handled the same way as NUMKEY, but differently from shift
|
||||||
|
case MOUKEY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_MOUSE);
|
||||||
|
blu_led_on();
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_MOUSE);
|
||||||
|
blu_led_off();
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
|
||||||
|
//mouse buttons, for 1-3, to update the mouse report:
|
||||||
|
case MS_BTN1:
|
||||||
|
currentReport = pointing_device_get_report();
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (shift_held && shift_suspended){
|
||||||
|
register_code(KC_LSFT);
|
||||||
|
shift_suspended = false;
|
||||||
|
}
|
||||||
|
//update mouse report here
|
||||||
|
currentReport.buttons |= MOUSE_BTN1; //MOUSE_BTN1 is a const defined in report.h
|
||||||
|
} else {
|
||||||
|
//update mouse report here
|
||||||
|
currentReport.buttons &= ~MOUSE_BTN1;
|
||||||
|
}
|
||||||
|
pointing_device_set_report(currentReport);
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case MS_BTN2:
|
||||||
|
currentReport = pointing_device_get_report();
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (shift_held && shift_suspended){
|
||||||
|
register_code(KC_LSFT);
|
||||||
|
shift_suspended = false;
|
||||||
|
}
|
||||||
|
//update mouse report here
|
||||||
|
currentReport.buttons |= MOUSE_BTN2; //MOUSE_BTN2 is a const defined in report.h
|
||||||
|
} else {
|
||||||
|
//update mouse report here
|
||||||
|
currentReport.buttons &= ~MOUSE_BTN2;
|
||||||
|
}
|
||||||
|
pointing_device_set_report(currentReport);
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case MS_BTN3:
|
||||||
|
currentReport = pointing_device_get_report();
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (shift_held && shift_suspended){
|
||||||
|
register_code(KC_LSFT);
|
||||||
|
shift_suspended = false;
|
||||||
|
}
|
||||||
|
//update mouse report here
|
||||||
|
currentReport.buttons |= MOUSE_BTN3; //MOUSE_BTN3 is a const defined in report.h
|
||||||
|
} else {
|
||||||
|
//update mouse report here
|
||||||
|
currentReport.buttons &= ~MOUSE_BTN3;
|
||||||
|
}
|
||||||
|
pointing_device_set_report(currentReport);
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
//Additionally, if NS_ keys are in use, then shift may be held (but is
|
||||||
|
//disabled for the unshifted keycodes to be send. Check the bool and
|
||||||
|
//register shift as necessary.
|
||||||
|
// default:
|
||||||
|
// if (shift_held){
|
||||||
|
// register_code(KC_LSFT);
|
||||||
|
// }
|
||||||
|
// break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
Executable
+11
@@ -0,0 +1,11 @@
|
|||||||
|
# **DREWSKY'S DZ60 ANSI Layout**
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
Layer 1 is default configuration, for the exception of the Space cadet shifts. Layer 2 is for WASD arrows and Media, which I have included both PREV and NEXT for Windows and macOS. Layer 3 is for RGB underglow. Legends in picture follow Layers. Modifier one is momentary, and the RGB layer is TT (TAP_TOGGLE)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make dz60:drewsky
|
||||||
|
|
||||||
|
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).
|
||||||
Executable
+34
@@ -0,0 +1,34 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Helpful defines
|
||||||
|
#define _L0 0
|
||||||
|
#define _L1 1
|
||||||
|
#define _L2 2
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_L0] = LAYOUT_60_ansi(
|
||||||
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||||
|
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, TT(2), KC_RALT, MO(1), KC_RCTL),
|
||||||
|
|
||||||
|
[_L1] = LAYOUT_60_ansi(
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,
|
||||||
|
KC_NO, KC_NO, KC_UP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGUP,
|
||||||
|
KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGDN,
|
||||||
|
KC_NO, KC_MRWD, KC_MFFD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_MSTP, KC_VOLD, KC_VOLU, KC_MPLY, KC__VOLDOWN, KC__VOLUP, KC_TRNS, KC_NO),
|
||||||
|
|
||||||
|
[_L2] = LAYOUT_60_ansi(
|
||||||
|
KC_ESC, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, RGB_HUD, RGB_HUI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, RGB_SAD, RGB_SAI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, RGB_VAD, RGB_VAI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_SPD, RGB_SPI, KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_NO, RGB_TOG, KC_TRNS, KC_NO, KC_NO, DEBUG)
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -71,5 +71,5 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
{{ RANDOM_STRING_MACRO }}
|
LAYOUT( RANDOM_STRING_MACRO )
|
||||||
};
|
};
|
||||||
@@ -1 +1,12 @@
|
|||||||
#include "quantum.h"
|
#ifndef NICEKEY_H
|
||||||
|
#define NICEKEY_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
k00 \
|
||||||
|
) { \
|
||||||
|
{ k00 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
Custom handwired nicekey, a one key keyboard that writes random compliments.
|
Custom handwired nicekey, a one key keyboard that writes random compliments.
|
||||||
|
|
||||||
Keyboard Maintainer: spydon
|
Keyboard Maintainer: [spydon](https://github.com/spydon)
|
||||||
Hardware Supported: Custom handwired one key
|
Hardware Supported: Custom handwired one key
|
||||||
Hardware Availability:
|
Hardware Availability:
|
||||||
|
|
||||||
@@ -15,4 +15,4 @@ Make example for this keyboard (after setting up your build environment):
|
|||||||
|
|
||||||
make handwired/nicekey:default
|
make handwired/nicekey:default
|
||||||
|
|
||||||
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "numpad20 handwired",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 4,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"K00", "x":0, "y":0},
|
||||||
|
{"label":"K01", "x":1, "y":0},
|
||||||
|
{"label":"K02", "x":2, "y":0},
|
||||||
|
{"label":"K03", "x":3, "y":0},
|
||||||
|
{"label":"K10", "x":0, "y":1},
|
||||||
|
{"label":"K11", "x":1, "y":1},
|
||||||
|
{"label":"K12", "x":2, "y":1},
|
||||||
|
{"label":"K13", "x":3, "y":1},
|
||||||
|
{"label":"K20", "x":0, "y":2},
|
||||||
|
{"label":"K21", "x":1, "y":2},
|
||||||
|
{"label":"K22", "x":2, "y":2},
|
||||||
|
{"label":"K23", "x":3, "y":2},
|
||||||
|
{"label":"K30", "x":0, "y":3},
|
||||||
|
{"label":"K31", "x":1, "y":3},
|
||||||
|
{"label":"K32", "x":2, "y":3},
|
||||||
|
{"label":"K33", "x":3, "y":3},
|
||||||
|
{"label":"K40", "x":0, "y":4},
|
||||||
|
{"label":"K41", "x":1, "y":4},
|
||||||
|
{"label":"K42", "x":2, "y":4},
|
||||||
|
{"label":"K43", "x":3, "y":4}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,16 +1,11 @@
|
|||||||
#include "numpad20.h"
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
#define KC_ KC_TRNS
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[0] = LAYOUT(
|
[0] = LAYOUT(
|
||||||
LEFT,RGHT, UP ,DOWN, \
|
KC_LEFT, KC_RGHT, KC_UP, KC_DOWN, \
|
||||||
P7 , P8 , P9 ,PLUS, \
|
KC_P7, KC_P8, KC_P9, KC_PLUS, \
|
||||||
P4 , P5 , P6 ,MINS, \
|
KC_P4, KC_P5, KC_P6, KC_MINS, \
|
||||||
P1 , P2 , P3 , ENT, \
|
KC_P1, KC_P2, KC_P3, KC_ENT, \
|
||||||
P0 ,DOT ,RGHT, TAB \
|
KC_P0, KC_DOT, KC_RGHT, KC_TAB \
|
||||||
)
|
)
|
||||||
};
|
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
|
||||||
};
|
};
|
||||||
@@ -10,11 +10,11 @@
|
|||||||
K30, K31, K32, K33, \
|
K30, K31, K32, K33, \
|
||||||
K40, K41, K42, K43 \
|
K40, K41, K42, K43 \
|
||||||
) { \
|
) { \
|
||||||
{ KC_##K00, KC_##K01, KC_##K02, KC_##K03 }, \
|
{ K00, K01, K02, K03 }, \
|
||||||
{ KC_##K10, KC_##K11, KC_##K12, KC_##K13 }, \
|
{ K10, K11, K12, K13 }, \
|
||||||
{ KC_##K20, KC_##K21, KC_##K22, KC_##K23 }, \
|
{ K20, K21, K22, K23 }, \
|
||||||
{ KC_##K30, KC_##K31, KC_##K32, KC_##K33 }, \
|
{ K30, K31, K32, K33 }, \
|
||||||
{ KC_##K40, KC_##K41, KC_##K42, KC_##K43 } \
|
{ K40, K41, K42, K43 } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#include "onekey.h"
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
{{ KC_A }}
|
LAYOUT( KC_A )
|
||||||
};
|
};
|
||||||
@@ -1 +1,12 @@
|
|||||||
#include "quantum.h"
|
#ifndef ONEKEY_H
|
||||||
|
#define ONEKEY_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
k00 \
|
||||||
|
) { \
|
||||||
|
{ k00 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment):
|
|||||||
|
|
||||||
make handwired/onekey:default
|
make handwired/onekey:default
|
||||||
|
|
||||||
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "pilcrow",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 10,
|
||||||
|
"height": 4,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"Q", "x":0, "y":0},
|
||||||
|
{"label":"W", "x":1, "y":0},
|
||||||
|
{"label":"E", "x":2, "y":0},
|
||||||
|
{"label":"R", "x":3, "y":0},
|
||||||
|
{"label":"T", "x":4, "y":0},
|
||||||
|
{"label":"Y", "x":5, "y":0},
|
||||||
|
{"label":"U", "x":6, "y":0},
|
||||||
|
{"label":"I", "x":7, "y":0},
|
||||||
|
{"label":"O", "x":8, "y":0},
|
||||||
|
{"label":"P", "x":9, "y":0},
|
||||||
|
{"label":"A", "x":0, "y":1},
|
||||||
|
{"label":"S", "x":1, "y":1},
|
||||||
|
{"label":"D", "x":2, "y":1},
|
||||||
|
{"label":"F", "x":3, "y":1},
|
||||||
|
{"label":"G", "x":4, "y":1},
|
||||||
|
{"label":"H", "x":5, "y":1},
|
||||||
|
{"label":"J", "x":6, "y":1},
|
||||||
|
{"label":"K", "x":7, "y":1},
|
||||||
|
{"label":"L", "x":8, "y":1},
|
||||||
|
{"label":";", "x":9, "y":1},
|
||||||
|
{"label":"Z", "x":0, "y":2},
|
||||||
|
{"label":"X", "x":1, "y":2},
|
||||||
|
{"label":"C", "x":2, "y":2},
|
||||||
|
{"label":"V", "x":3, "y":2},
|
||||||
|
{"label":"B", "x":4, "y":2},
|
||||||
|
{"label":"N", "x":5, "y":2},
|
||||||
|
{"label":"M", "x":6, "y":2},
|
||||||
|
{"label":",", "x":7, "y":2},
|
||||||
|
{"label":".", "x":8, "y":2},
|
||||||
|
{"label":"/", "x":9, "y":2},
|
||||||
|
{"label":"Ctrl", "x":0, "y":3},
|
||||||
|
{"label":"Alt", "x":1, "y":3},
|
||||||
|
{"label":"GUI", "x":2, "y":3},
|
||||||
|
{"label":"MO(1)", "x":3, "y":3},
|
||||||
|
{"label":"Space", "x":4, "y":3},
|
||||||
|
{"label":"Shift / Space", "x":5, "y":3},
|
||||||
|
{"label":"MO(2)", "x":6, "y":3},
|
||||||
|
{"label":"MO(3)", "x":7, "y":3},
|
||||||
|
{"label":"Delete", "x":8, "y":3},
|
||||||
|
{"label":"Esc", "x":9, "y":3}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,8 +1,3 @@
|
|||||||
#ifndef CONFIG_USER_H
|
#pragma once
|
||||||
#define CONFIG_USER_H
|
|
||||||
|
|
||||||
#include "../../config.h"
|
|
||||||
|
|
||||||
// place overrides here
|
// place overrides here
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,76 +1,58 @@
|
|||||||
#include "pilcrow.h"
|
#include QMK_KEYBOARD_H
|
||||||
#define _______ KC_TRNS
|
|
||||||
|
#define SFT_SPC MT(MOD_LSFT, KC_SPC)
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[0] = KEYMAP( \
|
[0] = LAYOUT( \
|
||||||
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \
|
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \
|
||||||
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \
|
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \
|
||||||
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, \
|
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, \
|
||||||
KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, MT(MOD_LSFT, KC_SPC), MO(2), MO(3), KC_DEL, KC_ESC \
|
KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, SFT_SPC, MO(2), MO(3), KC_DEL, KC_ESC \
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Colemak
|
/* Colemak
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
|
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
|
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
|
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[1] = KEYMAP( \
|
[1] = LAYOUT( \
|
||||||
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, \
|
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, \
|
||||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, \
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, \
|
||||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_PIPE, S(KC_QUOT), \
|
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_PIPE, S(KC_QUOT), \
|
||||||
_______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_GRV \
|
_______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_GRV \
|
||||||
),
|
),
|
||||||
[2] = KEYMAP( \
|
[2] = LAYOUT( \
|
||||||
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \
|
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \
|
||||||
KC_TAB, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, \
|
KC_TAB, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, \
|
||||||
OSM(MOD_LSFT), KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_BSLS, KC_QUOT, \
|
OSM(MOD_LSFT), KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_BSLS, KC_QUOT, \
|
||||||
_______, _______, _______, _______, KC_ENT, KC_ENT, _______, KC_MNXT, KC_VOLD, KC_VOLU \
|
_______, _______, _______, _______, KC_ENT, KC_ENT, _______, KC_MNXT, KC_VOLD, KC_VOLU \
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Adjust (Lower + Raise)
|
/* Adjust (Lower + Raise)
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
* | | Reset| | | | | | | | | | Del |
|
* | | Reset| | | | | | | | | | Del |
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
|
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
* | | | | | | | | | | | | |
|
* | | | | | | | | | | | | |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* | | | | | | | | | | | |
|
* | | | | | | | | | | | |
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[3] = KEYMAP( \
|
[3] = LAYOUT( \
|
||||||
RESET, KC_UP, _______, _______, _______, _______, _______, KC_MS_WH_DOWN, KC_MS_U, KC_MS_WH_UP, \
|
RESET, KC_UP, _______, _______, _______, _______, _______, KC_WH_D, KC_MS_U, KC_WH_U, \
|
||||||
KC_LEFT, KC_DOWN, KC_RIGHT, AU_ON, AU_OFF, AG_NORM, AG_SWAP, KC_MS_L,KC_MS_D, KC_MS_R, \
|
KC_LEFT, KC_DOWN, KC_RGHT, AU_ON, AU_OFF, AG_NORM, AG_SWAP, KC_MS_L, KC_MS_D, KC_MS_R, \
|
||||||
RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, \
|
RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, \
|
||||||
_______, _______, _______, _______, KC_MS_BTN1, KC_MS_BTN2, _______, _______, _______, _______ \
|
_______, _______, _______, _______, KC_BTN1, KC_BTN2, _______, _______, _______, _______ \
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|
||||||
{
|
|
||||||
// MACRODOWN only works in this function
|
|
||||||
switch(id) {
|
|
||||||
case 0:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
register_code(KC_RSFT);
|
|
||||||
} else {
|
|
||||||
unregister_code(KC_RSFT);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return MACRO_NONE;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
void matrix_init_user(void) {
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
// The following is an example using the Planck MIT layout
|
// The following is an example using the Planck MIT layout
|
||||||
// The first section contains all of the arguements
|
// The first section contains all of the arguements
|
||||||
// The second converts the arguments into a two-dimensional array
|
// The second converts the arguments into a two-dimensional array
|
||||||
#define KEYMAP( \
|
#define LAYOUT( \
|
||||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \
|
||||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \
|
||||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \
|
||||||
|
|||||||
@@ -1,28 +1,14 @@
|
|||||||
pilcrow keyboard firmware
|
# pilcrow
|
||||||
======================
|
|
||||||
|
|
||||||
## Quantum MK Firmware
|

|
||||||
|
|
||||||
For the full Quantum feature list, see [the parent readme](/).
|
A 4x10 ortholinear keyboard powered by a Teensy.
|
||||||
|
|
||||||
## Building
|
Keyboard Maintainer: [The QMK Community](https://github.com/qmk)
|
||||||
|
Hardware Supported: Teensy-powered pilcrow
|
||||||
|
|
||||||
Download or clone the whole firmware and navigate to the keyboards/pilcrow folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file.
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
Depending on which keymap you would like to use, you will have to compile slightly differently.
|
make handwired/pilcrow:default
|
||||||
|
|
||||||
### Default
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
|
|
||||||
To build with the default keymap, simply run `make default`.
|
|
||||||
|
|
||||||
### Other Keymaps
|
|
||||||
|
|
||||||
Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files.
|
|
||||||
|
|
||||||
To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ make [default|jack|<name>]
|
|
||||||
```
|
|
||||||
|
|
||||||
Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
|
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Practice 60",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 15,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_60_ansi": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"`", "x":0, "y":0},
|
||||||
|
{"label":"1", "x":1, "y":0},
|
||||||
|
{"label":"2", "x":2, "y":0},
|
||||||
|
{"label":"3", "x":3, "y":0},
|
||||||
|
{"label":"4", "x":4, "y":0},
|
||||||
|
{"label":"5", "x":5, "y":0},
|
||||||
|
{"label":"6", "x":6, "y":0},
|
||||||
|
{"label":"7", "x":7, "y":0},
|
||||||
|
{"label":"8", "x":8, "y":0},
|
||||||
|
{"label":"9", "x":9, "y":0},
|
||||||
|
{"label":"0", "x":10, "y":0},
|
||||||
|
{"label":"-", "x":11, "y":0},
|
||||||
|
{"label":"=", "x":12, "y":0},
|
||||||
|
{"label":"Backspace", "x":13, "y":0, "w":2},
|
||||||
|
{"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},
|
||||||
|
{"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},
|
||||||
|
{"label":"Ctrl", "x":0, "y":4, "w":1.25},
|
||||||
|
{"label":"GUI", "x":1.25, "y":4, "w":1.25},
|
||||||
|
{"label":"Alt", "x":2.5, "y":4, "w":1.25},
|
||||||
|
{"label":"Space", "x":3.75, "y":4, "w":6.25},
|
||||||
|
{"label":"Alt", "x":10, "y":4, "w":1.25},
|
||||||
|
{"label":"GUI", "x":11.25, "y":4, "w":1.25},
|
||||||
|
{"label":"Menu", "x":12.5, "y":4, "w":1.25},
|
||||||
|
{"label":"Ctrl", "x":13.75, "y":4, "w":1.25}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -31,18 +31,18 @@ enum custom_keycodes {
|
|||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[_BASE] = LAYOUT_60_ansi(
|
[_BASE] = LAYOUT_60_ansi(
|
||||||
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
|
||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MT(MOD_LSFT, KC_Y), KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MT(MOD_LSFT, KC_Y), KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
|
||||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
|
||||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
|
||||||
KC_LCTL , KC_LGUI , KC_LALT , KC_SPC , KC_RALT , KC_RGUI , MO(_FN1) , KC_RCTL
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FN1), KC_RCTL
|
||||||
),
|
),
|
||||||
|
|
||||||
[_FN1] = LAYOUT_60_ansi(
|
[_FN1] = LAYOUT_60_ansi(
|
||||||
KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, \
|
KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, \
|
||||||
RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
|
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
KC_GRV, _______, _______, _______, _______, _______, _______, _______
|
KC_GRV, _______, _______, _______, _______, _______, _______, _______
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
@@ -3,16 +3,15 @@
|
|||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#define LAYOUT_60_ansi( \
|
#define LAYOUT_60_ansi( \
|
||||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
|
||||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
|
||||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
|
||||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, \
|
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, \
|
||||||
K40, K41, K42, K43, K49, K4A, K4B, K4C \
|
K40, K41, K42, K43, K49, K4A, K4B, K4C \
|
||||||
) { \
|
) { \
|
||||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
|
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
|
||||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
|
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
|
||||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C }, \
|
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO }, \
|
||||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B }, \
|
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, KC_NO }, \
|
||||||
{ K40, K41, K42, K43, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, K4C }, \
|
{ K40, K41, K42, K43, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, K4C, KC_NO } \
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "pteron",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "FSund",
|
||||||
|
"width": 17,
|
||||||
|
"height": 5.95,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"K000", "x":0, "y":0.75},
|
||||||
|
{"label":"K001", "x":1, "y":0.75},
|
||||||
|
{"label":"K002", "x":2, "y":0.25},
|
||||||
|
{"label":"K003", "x":3, "y":0},
|
||||||
|
{"label":"K004", "x":4, "y":0.35},
|
||||||
|
{"label":"K005", "x":5, "y":0.45},
|
||||||
|
|
||||||
|
{"label":"K006", "x":11, "y":0.45},
|
||||||
|
{"label":"K007", "x":12, "y":0.35},
|
||||||
|
{"label":"K008", "x":13, "y":0},
|
||||||
|
{"label":"K009", "x":14, "y":0.25},
|
||||||
|
{"label":"K010", "x":15, "y":0.75},
|
||||||
|
{"label":"K011", "x":16, "y":0.75},
|
||||||
|
|
||||||
|
{"label":"K100", "x":0, "y":1.75},
|
||||||
|
{"label":"K101", "x":1, "y":1.75},
|
||||||
|
{"label":"K102", "x":2, "y":1.25},
|
||||||
|
{"label":"K103", "x":3, "y":1},
|
||||||
|
{"label":"K104", "x":4, "y":1.35},
|
||||||
|
{"label":"K105", "x":5, "y":1.45},
|
||||||
|
|
||||||
|
{"label":"K106", "x":11, "y":1.45},
|
||||||
|
{"label":"K107", "x":12, "y":1.35},
|
||||||
|
{"label":"K108", "x":13, "y":1},
|
||||||
|
{"label":"K109", "x":14, "y":1.25},
|
||||||
|
{"label":"K110", "x":15, "y":1.75},
|
||||||
|
{"label":"K111", "x":16, "y":1.75},
|
||||||
|
|
||||||
|
{"label":"K200", "x":0, "y":2.75},
|
||||||
|
{"label":"K201", "x":1, "y":2.75},
|
||||||
|
{"label":"K202", "x":2, "y":2.25},
|
||||||
|
{"label":"K203", "x":3, "y":2},
|
||||||
|
{"label":"K204", "x":4, "y":2.35},
|
||||||
|
{"label":"K205", "x":5, "y":2.45},
|
||||||
|
|
||||||
|
{"label":"K206", "x":11, "y":2.45},
|
||||||
|
{"label":"K207", "x":12, "y":2.35},
|
||||||
|
{"label":"K208", "x":13, "y":2},
|
||||||
|
{"label":"K209", "x":14, "y":2.25},
|
||||||
|
{"label":"K210", "x":15, "y":2.75},
|
||||||
|
{"label":"K211", "x":16, "y":2.75},
|
||||||
|
|
||||||
|
{"label":"K300", "x":0, "y":3.75},
|
||||||
|
{"label":"K301", "x":1, "y":3.75},
|
||||||
|
{"label":"K302", "x":2, "y":3.25},
|
||||||
|
{"label":"K303", "x":3, "y":3},
|
||||||
|
{"label":"K304", "x":4, "y":3.35},
|
||||||
|
{"label":"K305", "x":5, "y":3.45},
|
||||||
|
|
||||||
|
{"label":"K306", "x":11, "y":3.45},
|
||||||
|
{"label":"K307", "x":12, "y":3.35},
|
||||||
|
{"label":"K308", "x":13, "y":3},
|
||||||
|
{"label":"K309", "x":14, "y":3.25},
|
||||||
|
{"label":"K310", "x":15, "y":3.75},
|
||||||
|
{"label":"K311", "x":16, "y":3.75},
|
||||||
|
|
||||||
|
{"label":"K402", "x":4, "y":4.35},
|
||||||
|
{"label":"K403", "x":5, "y":4.45},
|
||||||
|
{"label":"K404", "x":6, "y":4.65},
|
||||||
|
{"label":"K405", "x":7, "y":4.95},
|
||||||
|
|
||||||
|
{"label":"K406", "x":9, "y":4.95},
|
||||||
|
{"label":"K407", "x":10, "y":4.65},
|
||||||
|
{"label":"K408", "x":11, "y":4.45},
|
||||||
|
{"label":"K409", "x":12, "y":4.35}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,14 +8,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_LALT, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_BSPACE, KC_DELETE, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPRN, FR_EQL, KC_INSERT, KC_HOME, KC_PGUP,\
|
KC_LALT, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_BSPACE, KC_DELETE, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPRN, FR_EQL, KC_INSERT, KC_HOME, KC_PGUP,\
|
||||||
KC_LGUI, FR_A, FR_Z, KC_E, KC_R, KC_T, KC_LSFT, KC_ENT, KC_Y, KC_U, KC_I, KC_O, KC_P, FR_CIRC, FR_DLR, KC_DELETE, KC_END, KC_PGDOWN, KC_KP_PLUS,\
|
KC_LGUI, FR_A, FR_Z, KC_E, KC_R, KC_T, KC_LSFT, KC_ENT, KC_Y, KC_U, KC_I, KC_O, KC_P, FR_CIRC, FR_DLR, KC_DELETE, KC_END, KC_PGDOWN, KC_KP_PLUS,\
|
||||||
KC_LCTL, FR_Q, KC_S, KC_D, KC_F, KC_G, KC_ENT, KC_H, KC_J, KC_K, KC_L, FR_M, FR_UGRV, FR_ASTR, KC_KP_1, KC_UP, KC_KP_3,\
|
KC_LCTL, FR_Q, KC_S, KC_D, KC_F, KC_G, KC_ENT, KC_H, KC_J, KC_K, KC_L, FR_M, FR_UGRV, FR_ASTR, KC_KP_1, KC_UP, KC_KP_3,\
|
||||||
FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPACE, KC_SPACE, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, NO_ALGR, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER),
|
FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPACE, KC_SPACE, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, FR_ALGR, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER),
|
||||||
|
|
||||||
[1] = KEYMAP(
|
[1] = KEYMAP(
|
||||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TAB, KC_CAPS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_FN0, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS,\
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TAB, KC_CAPS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_FN0, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS,\
|
||||||
KC_LALT, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_BSPACE, KC_DELETE, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPRN, FR_EQL, KC_7, KC_8, KC_9,\
|
KC_LALT, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_BSPACE, KC_DELETE, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPRN, FR_EQL, KC_7, KC_8, KC_9,\
|
||||||
KC_LGUI, FR_A, FR_Z, KC_E, KC_R, KC_T, KC_LSFT, KC_ENT, KC_Y, KC_U, KC_I, KC_O, KC_P, FR_CIRC, FR_DLR, KC_4, KC_5, KC_6, KC_KP_PLUS,\
|
KC_LGUI, FR_A, FR_Z, KC_E, KC_R, KC_T, KC_LSFT, KC_ENT, KC_Y, KC_U, KC_I, KC_O, KC_P, FR_CIRC, FR_DLR, KC_4, KC_5, KC_6, KC_KP_PLUS,\
|
||||||
KC_LCTL, FR_Q, KC_S, KC_D, KC_F, KC_G, KC_ENT, KC_H, KC_J, KC_K, KC_L, FR_M, FR_UGRV, FR_ASTR, KC_1, KC_2, KC_3,\
|
KC_LCTL, FR_Q, KC_S, KC_D, KC_F, KC_G, KC_ENT, KC_H, KC_J, KC_K, KC_L, FR_M, FR_UGRV, FR_ASTR, KC_1, KC_2, KC_3,\
|
||||||
FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPACE, KC_SPACE, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, NO_ALGR, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER),
|
FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPACE, KC_SPACE, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, FR_ALGR, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -593,19 +593,39 @@ void matrix_scan_user(void) {
|
|||||||
if(!RGBAnimation){
|
if(!RGBAnimation){
|
||||||
switch (layer_state) {
|
switch (layer_state) {
|
||||||
case L_BASE:
|
case L_BASE:
|
||||||
led_ripple_effect(0,112,127);
|
#ifdef RGBLED_BACK
|
||||||
|
led_ripple_effect(0,112,127);
|
||||||
|
#else
|
||||||
|
rgblight_setrgb(0,112,127);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case L_OPT:
|
case L_OPT:
|
||||||
led_ripple_effect(127,0,100);
|
#ifdef RGBLED_BACK
|
||||||
|
led_ripple_effect(127,0,100);
|
||||||
|
#else
|
||||||
|
rgblight_setrgb(127,0,100);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case L_NUM:
|
case L_NUM:
|
||||||
led_ripple_effect(127,23,0);
|
#ifdef RGBLED_BACK
|
||||||
|
led_ripple_effect(127,23,0);
|
||||||
|
#else
|
||||||
|
rgblight_setrgb(127,23,0);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case L_SYM:
|
case L_SYM:
|
||||||
led_ripple_effect(0,127,0);
|
#ifdef RGBLED_BACK
|
||||||
|
led_ripple_effect(0,127,0);
|
||||||
|
#else
|
||||||
|
rgblight_setrgb(0,127,0);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case L_FUNC:
|
case L_FUNC:
|
||||||
led_ripple_effect(127,0,61);
|
#ifdef RGBLED_BACK
|
||||||
|
led_ripple_effect(127,0,61);
|
||||||
|
#else
|
||||||
|
rgblight_setrgb(127,0,61);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -169,8 +169,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
//#define NO_ACTION_LAYER
|
//#define NO_ACTION_LAYER
|
||||||
//#define NO_ACTION_TAPPING
|
//#define NO_ACTION_TAPPING
|
||||||
//#define NO_ACTION_ONESHOT
|
//#define NO_ACTION_ONESHOT
|
||||||
//#define NO_ACTION_MACRO
|
#define NO_ACTION_MACRO
|
||||||
//#define NO_ACTION_FUNCTION
|
#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MIDI options
|
* MIDI options
|
||||||
@@ -222,4 +222,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define LCD_E_PIN 1 //< pin for Enable line
|
#define LCD_E_PIN 1 //< pin for Enable line
|
||||||
#endif
|
#endif
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
[1] = LAYOUT(
|
[1] = LAYOUT(
|
||||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
|||||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
MOUSEKEY_ENABLE = no # 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 = yes # 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
|
||||||
|
|||||||
@@ -9,8 +9,15 @@ extern keymap_config_t keymap_config;
|
|||||||
TD(DA_UPLY), MO(_VL), KC_TAB, KC_BSPACE, KC_ESC, /**/KC_INS, KC_HOME, KC_PGUP, MO(_VL), TD(DA_UPLY), \
|
TD(DA_UPLY), MO(_VL), KC_TAB, KC_BSPACE, KC_ESC, /**/KC_INS, KC_HOME, KC_PGUP, MO(_VL), TD(DA_UPLY), \
|
||||||
TD(DA_DWLY), TD(DA_LCTL), KC_SPC, TD(DA_LSPR), LSFT_T(KC_CAPS),/**/SFT_T(KC_CAPS), TD(DA_RALT), KC_ENT, TD(DA_RCTL), TD(DA_DWLY))
|
TD(DA_DWLY), TD(DA_LCTL), KC_SPC, TD(DA_LSPR), LSFT_T(KC_CAPS),/**/SFT_T(KC_CAPS), TD(DA_RALT), KC_ENT, TD(DA_RCTL), TD(DA_DWLY))
|
||||||
|
|
||||||
|
#define _GMLayer LAYOUT( \
|
||||||
|
KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, /**/KC_F, KC_G, KC_C, KC_R, KC_L, \
|
||||||
|
KC_A, KC_O, KC_E, KC_U, KC_I, /**/KC_D, KC_H, ALT_T(KC_T), SFT_T(KC_N), CTL_T(KC_S), \
|
||||||
|
KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, /**/KC_B, KC_M, KC_W, KC_V, KC_Z, \
|
||||||
|
TD(DA_UPLY), MO(_VL), KC_TAB, KC_BSPACE, KC_ESC, /**/KC_INS, KC_HOME, KC_PGUP, MO(_VL), TD(DA_UPLY), \
|
||||||
|
TD(DA_DWLY), TD(DA_LCTL), KC_SPC, TD(DA_LSPR), LSFT_T(KC_CAPS),/**/SFT_T(KC_CAPS), TD(DA_RALT), KC_ENT, TD(DA_RCTL), TD(DA_DWLY))
|
||||||
|
|
||||||
#define _upLayer LAYOUT( \
|
#define _upLayer LAYOUT( \
|
||||||
KC_4, KC_5, KC_6, _______, _______,/**/ _______, KC_RBRC, _______, _______, _______, \
|
KC_4, KC_5, KC_6, KC_YREG, _______,/**/ _______, KC_RBRC, _______, _______, _______, \
|
||||||
LCTL_T(KC_1), LSFT_T(KC_2), LALT_T(KC_3), _______, _______,/**/ KC_LBRC, KC_BSLS, _______, _______, _______, \
|
LCTL_T(KC_1), LSFT_T(KC_2), LALT_T(KC_3), _______, _______,/**/ KC_LBRC, KC_BSLS, _______, _______, _______, \
|
||||||
KC_7, KC_8, KC_9, KC_0, KC_GRV, /**/ KC_SLSH, _______, _______, _______, _______, \
|
KC_7, KC_8, KC_9, KC_0, KC_GRV, /**/ KC_SLSH, _______, _______, _______, _______, \
|
||||||
_______, _______, _______, _______, _______,/**/ KC_DEL, KC_END, KC_PGDN, _______, _______, \
|
_______, _______, _______, _______, _______,/**/ KC_DEL, KC_END, KC_PGDN, _______, _______, \
|
||||||
@@ -35,4 +42,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
[_UL] = _upLayer,
|
[_UL] = _upLayer,
|
||||||
[_DL] = _downLayer,
|
[_DL] = _downLayer,
|
||||||
[_VL] = _upLayer,
|
[_VL] = _upLayer,
|
||||||
[_AL] = _astdLayer};
|
[_AL] = _astdLayer,
|
||||||
|
[_GM] = _GMLayer};
|
||||||
|
|
||||||
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
if (record->event.pressed) {
|
||||||
|
switch (keycode) {
|
||||||
|
case YREG:
|
||||||
|
SEND_STRING("\"0p");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -39,11 +39,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] =
|
|||||||
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||||
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_P, KC_QUOT,
|
KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RSFT,
|
||||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
KC_LGUI, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT,
|
||||||
//├────────┼────────┼────────┼────────┼────────┼────────┼ ┼────────┼────────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────────┼────────┼ ┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
KC_LGUI, KC_Z, KC_LALT, KC_LCTL, LOWER, KC_SPC, KC_ENT, RAISE, KC_RCTL, KC_RALT, EXT_QWE, KC_RGUI
|
KC_LALT, KC_MINUS, KC_TAB, KC_LCTL, LOWER, KC_SPC, KC_ENT, RAISE, KC_RCTL, KC_RGUI, EXT_QWE, KC_RALT
|
||||||
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴ ┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴ ┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
||||||
|
|
||||||
),
|
),
|
||||||
@@ -76,15 +76,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] =
|
|||||||
|
|
||||||
[_ADJUST] = LAYOUT(
|
[_ADJUST] = LAYOUT(
|
||||||
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||||
KC_GRV, KC_HOME, KC_LBRC, KC_RBRC, KC_PIPE, KC_APP, KC_SLCK, _______, _______, _______, _______, _______,
|
_______, _______, KC_CAPS, KC_MENU, KC_APP, KC_PSCR, _______, _______, _______, _______, _______, _______,
|
||||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
KC_PSCR, KC_END, KC_LCBR, KC_RCBR, KC_PLUS, KC_EQL, KC_PAUS, _______, _______, _______, _______, _______,
|
_______, _______,_______, _______, _______, KC_PAUS, _______, _______, _______, _______, _______, _______,
|
||||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
_______, _______, _______, KC_BSLS, KC_MINS, KC_UNDS, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, KC_SLCK, _______, _______, _______, _______, _______, _______,
|
||||||
//├────────┼────────┼────────┼────────┼────────┼────────┼ ┼────────┼────────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────────┼────────┼ ┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴ ┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴ ┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -23,19 +23,6 @@ ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be di
|
|||||||
WATCHDOG_ENABLE = yes # Resets keyboard if matrix_scan isn't run every 250ms
|
WATCHDOG_ENABLE = yes # Resets keyboard if matrix_scan isn't run every 250ms
|
||||||
|
|
||||||
|
|
||||||
ifndef QUANTUM_DIR
|
|
||||||
include ../../../../Makefile
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(ISSI_ENABLE)), yes)
|
|
||||||
TMK_COMMON_DEFS += -DISSI_ENABLE
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
|
|
||||||
TMK_COMMON_DEFS += -DWATCHDOG_ENABLE
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
# # Set the LFK78 hardware version. This is defined in rules.mk, but can be overidden here if desired
|
# # Set the LFK78 hardware version. This is defined in rules.mk, but can be overidden here if desired
|
||||||
# #
|
# #
|
||||||
# # RevB - first public release, uses atmega32u4, has audio, ISSI matrix split between RGB and backlight
|
# # RevB - first public release, uses atmega32u4, has audio, ISSI matrix split between RGB and backlight
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = yes # Audio output on port C6
|
AUDIO_ENABLE = yes # Audio output on port C6
|
||||||
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
|
||||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||||
RGBLIGHT_CUSTOM_DRIVER = yes # RGB code is implemented in lefkeyboards, not qmk base
|
RGBLIGHT_CUSTOM_DRIVER = yes # RGB code is implemented in lefkeyboards, not qmk base
|
||||||
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||||
TAP_DANCE_ENABLE = no
|
TAP_DANCE_ENABLE = no
|
||||||
@@ -23,21 +23,6 @@ ISSI_ENABLE = yes # If the I2C pullup resistors aren't install thi
|
|||||||
WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
|
WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
|
||||||
CAPSLOCK_LED = no # Toggle back light LED of Caps Lock
|
CAPSLOCK_LED = no # Toggle back light LED of Caps Lock
|
||||||
|
|
||||||
ifndef QUANTUM_DIR
|
|
||||||
include ../../../../Makefile
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(ISSI_ENABLE)), yes)
|
|
||||||
TMK_COMMON_DEFS += -DISSI_ENABLE
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
|
|
||||||
TMK_COMMON_DEFS += -DWATCHDOG_ENABLE
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(CAPSLOCK_LED)), yes)
|
|
||||||
TMK_COMMON_DEFS += -DCAPSLOCK_LED
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Override the LFK78 hardware version:
|
# Override the LFK78 hardware version:
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = yes # Audio output on port C6
|
AUDIO_ENABLE = yes # Audio output on port C6
|
||||||
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
|
||||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||||
RGBLIGHT_CUSTOM_DRIVER = yes # RGB code is implemented in lefkeyboards, not qmk base
|
RGBLIGHT_CUSTOM_DRIVER = yes # RGB code is implemented in lefkeyboards, not qmk base
|
||||||
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||||
TAP_DANCE_ENABLE = no
|
TAP_DANCE_ENABLE = no
|
||||||
@@ -23,18 +23,6 @@ ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this mu
|
|||||||
WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
|
WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
|
||||||
|
|
||||||
|
|
||||||
ifndef QUANTUM_DIR
|
|
||||||
include ../../../../Makefile
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(ISSI_ENABLE)), yes)
|
|
||||||
TMK_COMMON_DEFS += -DISSI_ENABLE
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
|
|
||||||
TMK_COMMON_DEFS += -DWATCHDOG_ENABLE
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
# # Set the LFK78 hardware version. This is defined in rules.mk, but can be overidden here if desired
|
# # Set the LFK78 hardware version. This is defined in rules.mk, but can be overidden here if desired
|
||||||
# #
|
# #
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = yes # Audio output on port C6
|
AUDIO_ENABLE = yes # Audio output on port C6
|
||||||
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
|
||||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||||
RGBLIGHT_CUSTOM_DRIVER = yes # RGB code is implemented in lefkeyboards, not qmk base
|
RGBLIGHT_CUSTOM_DRIVER = yes # RGB code is implemented in lefkeyboards, not qmk base
|
||||||
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||||
TAP_DANCE_ENABLE = no
|
TAP_DANCE_ENABLE = no
|
||||||
@@ -23,22 +23,6 @@ ISSI_ENABLE = yes # If the I2C pullup resistors aren't install thi
|
|||||||
WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
|
WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
|
||||||
CAPSLOCK_LED = no # Toggle back light LED of Caps Lock
|
CAPSLOCK_LED = no # Toggle back light LED of Caps Lock
|
||||||
|
|
||||||
ifndef QUANTUM_DIR
|
|
||||||
include ../../../../Makefile
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(ISSI_ENABLE)), yes)
|
|
||||||
TMK_COMMON_DEFS += -DISSI_ENABLE
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
|
|
||||||
TMK_COMMON_DEFS += -DWATCHDOG_ENABLE
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(CAPSLOCK_LED)), yes)
|
|
||||||
TMK_COMMON_DEFS += -DCAPSLOCK_LED
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Override the LFK78 hardware version:
|
# Override the LFK78 hardware version:
|
||||||
#
|
#
|
||||||
# B - first public release, uses atmega32u4, has audio, ISSI matrix split between RGB and backlight
|
# B - first public release, uses atmega32u4, has audio, ISSI matrix split between RGB and backlight
|
||||||
|
|||||||
@@ -13,6 +13,15 @@ uint16_t click_hz = CLICK_HZ;
|
|||||||
uint16_t click_time = CLICK_MS;
|
uint16_t click_time = CLICK_MS;
|
||||||
uint8_t click_toggle = CLICK_ENABLED;
|
uint8_t click_toggle = CLICK_ENABLED;
|
||||||
|
|
||||||
|
__attribute__((weak))
|
||||||
|
const Layer_Info layer_info[] = {
|
||||||
|
// Layer Mask Red Green Blue
|
||||||
|
{0x00000000, 0xFFFFFFFF, {0x0000, 0x0FFF, 0x0000}}, // base layer - green
|
||||||
|
{0x00000002, 0xFFFFFFFE, {0x0000, 0x0000, 0x0FFF}}, // function layer - blue
|
||||||
|
{0x00000004, 0xFFFFFFFC, {0x0FFF, 0x0000, 0x0FFF}}, // settings layer - magenta
|
||||||
|
{0xFFFFFFFF, 0xFFFFFFFF, {0x0FFF, 0x0FFF, 0x0FFF}}, // unknown layer - REQUIRED - white
|
||||||
|
};
|
||||||
|
|
||||||
void matrix_init_kb(void)
|
void matrix_init_kb(void)
|
||||||
{
|
{
|
||||||
matrix_init_user();
|
matrix_init_user();
|
||||||
|
|||||||
@@ -32,3 +32,52 @@ F_USB = $(F_CPU)
|
|||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
# Interrupt driven control endpoint task(+60)
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
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 = no # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = yes # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||||
|
RGBLIGHT_CUSTOM_DRIVER = yes # RGB code is implemented in lefkeyboards, not qmk base
|
||||||
|
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||||
|
TAP_DANCE_ENABLE = no
|
||||||
|
|
||||||
|
ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled
|
||||||
|
WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
|
||||||
|
CAPSLOCK_LED = no # Toggle back light LED of Caps Lock
|
||||||
|
|
||||||
|
|
||||||
|
ifeq ($(strip $(ISSI_ENABLE)), yes)
|
||||||
|
TMK_COMMON_DEFS += -DISSI_ENABLE
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
|
||||||
|
TMK_COMMON_DEFS += -DWATCHDOG_ENABLE
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(CAPSLOCK_LED)), yes)
|
||||||
|
TMK_COMMON_DEFS += -DCAPSLOCK_LED
|
||||||
|
endif
|
||||||
|
|
||||||
|
# # Set the LFK78 hardware version. This is defined in rules.mk, but can be overidden here if desired
|
||||||
|
# #
|
||||||
|
# # RevB - first public release, uses atmega32u4, has audio, ISSI matrix split between RGB and backlight
|
||||||
|
# # RevC/D - at90usb1286, no audio, ISSI device 0 is backlight, 4 is RGB
|
||||||
|
# #
|
||||||
|
# # Set to B, C or D
|
||||||
|
# LFK_REV = D
|
||||||
|
|
||||||
|
# ifeq ($(LFK_REV), B)
|
||||||
|
# MCU = atmega32u4
|
||||||
|
# else
|
||||||
|
# MCU = at90usb1286
|
||||||
|
# endif
|
||||||
|
# OPT_DEFS += -DLFK_REV_$(LFK_REV)
|
||||||
|
# OPT_DEFS += -DUSB_PRODUCT=\"LFK_Rev$(LFK_REV)\"
|
||||||
@@ -23,17 +23,6 @@ ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be di
|
|||||||
WATCHDOG_ENABLE = yes # Resets keyboard if matrix_scan isn't run every 250ms
|
WATCHDOG_ENABLE = yes # Resets keyboard if matrix_scan isn't run every 250ms
|
||||||
|
|
||||||
|
|
||||||
ifndef QUANTUM_DIR
|
|
||||||
include ../../../../Makefile
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(ISSI_ENABLE)), yes)
|
|
||||||
TMK_COMMON_DEFS += -DISSI_ENABLE
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
|
|
||||||
TMK_COMMON_DEFS += -DWATCHDOG_ENABLE
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
# # Set the LFK78 hardware version. This is defined in rules.mk, but can be overidden here if desired
|
# # Set the LFK78 hardware version. This is defined in rules.mk, but can be overidden here if desired
|
||||||
|
|||||||
@@ -23,17 +23,6 @@ ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be di
|
|||||||
WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
|
WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
|
||||||
|
|
||||||
|
|
||||||
ifndef QUANTUM_DIR
|
|
||||||
include ../../../../Makefile
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(ISSI_ENABLE)), yes)
|
|
||||||
TMK_COMMON_DEFS += -DISSI_ENABLE
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
|
|
||||||
TMK_COMMON_DEFS += -DWATCHDOG_ENABLE
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
# Override the LFK87 hardware version.
|
# Override the LFK87 hardware version.
|
||||||
|
|||||||
@@ -23,19 +23,6 @@ ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be di
|
|||||||
WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
|
WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
|
||||||
|
|
||||||
|
|
||||||
ifndef QUANTUM_DIR
|
|
||||||
include ../../../../Makefile
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(ISSI_ENABLE)), yes)
|
|
||||||
TMK_COMMON_DEFS += -DISSI_ENABLE
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
|
|
||||||
TMK_COMMON_DEFS += -DWATCHDOG_ENABLE
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
# Override the LFK87 hardware version.
|
# Override the LFK87 hardware version.
|
||||||
#
|
#
|
||||||
# A - Green PCB. at90usb1286 Only 3 exist
|
# A - Green PCB. at90usb1286 Only 3 exist
|
||||||
|
|||||||
@@ -23,17 +23,6 @@ ISSI_ENABLE = yes # If the I2C pullup resistors aren't install thi
|
|||||||
WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
|
WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
|
||||||
|
|
||||||
|
|
||||||
ifndef QUANTUM_DIR
|
|
||||||
include ../../../../Makefile
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(ISSI_ENABLE)), yes)
|
|
||||||
TMK_COMMON_DEFS += -DISSI_ENABLE
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
|
|
||||||
TMK_COMMON_DEFS += -DWATCHDOG_ENABLE
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
# # Set the LFK78 hardware version. This is defined in rules.mk, but can be overidden here if desired
|
# # Set the LFK78 hardware version. This is defined in rules.mk, but can be overidden here if desired
|
||||||
|
|||||||
@@ -14,6 +14,15 @@ uint16_t click_hz = CLICK_HZ;
|
|||||||
uint16_t click_time = CLICK_MS;
|
uint16_t click_time = CLICK_MS;
|
||||||
uint8_t click_toggle = CLICK_ENABLED;
|
uint8_t click_toggle = CLICK_ENABLED;
|
||||||
|
|
||||||
|
__attribute__((weak))
|
||||||
|
const Layer_Info layer_info[] = {
|
||||||
|
// Layer Mask Red Green Blue
|
||||||
|
{0x00000000, 0xFFFFFFFF, {0x00, 0xFF, 0x00}}, // base layers - green
|
||||||
|
{0x00000002, 0xFFFFFFFE, {0x00, 0x00, 0xFF}}, // function layer - blue
|
||||||
|
{0x00000004, 0xFFFFFFFC, {0xFF, 0x00, 0xFF}}, // settings layer - magenta
|
||||||
|
{0xFFFFFFFF, 0xFFFFFFFF, {0xFF, 0xFF, 0xFF}}, // unknown layer - REQUIRED - white
|
||||||
|
};
|
||||||
|
|
||||||
void matrix_init_kb(void)
|
void matrix_init_kb(void)
|
||||||
{
|
{
|
||||||
// put your keyboard start-up code here
|
// put your keyboard start-up code here
|
||||||
|
|||||||
@@ -31,3 +31,37 @@ F_USB = $(F_CPU)
|
|||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
LAYOUTS = tkl_ansi tkl_iso
|
LAYOUTS = tkl_ansi tkl_iso
|
||||||
|
|
||||||
|
# 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 = no # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = yes # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable RGB underlight
|
||||||
|
RGBLIGHT_CUSTOM_DRIVER = yes # RGB code is implemented in lefkeyboards, not WS2812
|
||||||
|
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||||
|
TAP_DANCE_ENABLE = no
|
||||||
|
|
||||||
|
ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled
|
||||||
|
WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ifeq ($(strip $(ISSI_ENABLE)), yes)
|
||||||
|
OPT_DEFS += -DISSI_ENABLE
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
|
||||||
|
OPT_DEFS += -DWATCHDOG_ENABLE
|
||||||
|
endif
|
||||||
@@ -14,7 +14,7 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
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
|
||||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||||
RGBLIGHT_CUSTOM_DRIVER = yes # RGB code is implemented in lefkeyboards, not qmk base
|
RGBLIGHT_CUSTOM_DRIVER = yes # RGB code is implemented in lefkeyboards, not qmk base
|
||||||
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||||
TAP_DANCE_ENABLE = no
|
TAP_DANCE_ENABLE = no
|
||||||
@@ -23,17 +23,6 @@ ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this mu
|
|||||||
WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
|
WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
|
||||||
|
|
||||||
|
|
||||||
ifndef QUANTUM_DIR
|
|
||||||
include ../../../../Makefile
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(ISSI_ENABLE)), yes)
|
|
||||||
TMK_COMMON_DEFS += -DISSI_ENABLE
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
|
|
||||||
TMK_COMMON_DEFS += -DWATCHDOG_ENABLE
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
# # Set the LFK78 hardware version. This is defined in rules.mk, but can be overidden here if desired
|
# # Set the LFK78 hardware version. This is defined in rules.mk, but can be overidden here if desired
|
||||||
|
|||||||
@@ -11,3 +11,31 @@ ARCH = AVR8
|
|||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
LAYOUTS = numpad_6x4
|
LAYOUTS = numpad_6x4
|
||||||
|
|
||||||
|
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 = no # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||||
|
RGBLIGHT_CUSTOM_DRIVER = yes # RGB code is implemented in lefkeyboards, not qmk base
|
||||||
|
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||||
|
TAP_DANCE_ENABLE = no
|
||||||
|
|
||||||
|
ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled
|
||||||
|
WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
|
||||||
|
|
||||||
|
|
||||||
|
ifeq ($(strip $(ISSI_ENABLE)), yes)
|
||||||
|
TMK_COMMON_DEFS += -DISSI_ENABLE
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
|
||||||
|
TMK_COMMON_DEFS += -DWATCHDOG_ENABLE
|
||||||
|
endif
|
||||||
@@ -23,9 +23,6 @@ ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be di
|
|||||||
WATCHDOG_ENABLE = yes # Resets keyboard if matrix_scan isn't run every 250ms
|
WATCHDOG_ENABLE = yes # Resets keyboard if matrix_scan isn't run every 250ms
|
||||||
|
|
||||||
|
|
||||||
ifndef QUANTUM_DIR
|
|
||||||
include ../../../../Makefile
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(ISSI_ENABLE)), yes)
|
ifeq ($(strip $(ISSI_ENABLE)), yes)
|
||||||
TMK_COMMON_DEFS += -DISSI_ENABLE
|
TMK_COMMON_DEFS += -DISSI_ENABLE
|
||||||
|
|||||||
@@ -23,10 +23,6 @@ ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be di
|
|||||||
WATCHDOG_ENABLE = yes # Resets keyboard if matrix_scan isn't run every 250ms
|
WATCHDOG_ENABLE = yes # Resets keyboard if matrix_scan isn't run every 250ms
|
||||||
|
|
||||||
|
|
||||||
ifndef QUANTUM_DIR
|
|
||||||
include ../../../../Makefile
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(ISSI_ENABLE)), yes)
|
ifeq ($(strip $(ISSI_ENABLE)), yes)
|
||||||
TMK_COMMON_DEFS += -DISSI_ENABLE
|
TMK_COMMON_DEFS += -DISSI_ENABLE
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -17,6 +17,16 @@ uint16_t click_time = CLICK_MS;
|
|||||||
uint8_t click_toggle = CLICK_ENABLED;
|
uint8_t click_toggle = CLICK_ENABLED;
|
||||||
float my_song[][2] = SONG(ZELDA_PUZZLE);
|
float my_song[][2] = SONG(ZELDA_PUZZLE);
|
||||||
|
|
||||||
|
// Colors of the layer indicator LED
|
||||||
|
// This list needs to define layer 0xFFFFFFFF, it is the end of the list, and the unknown layer
|
||||||
|
__attribute__((weak))
|
||||||
|
const Layer_Info layer_info[] = {
|
||||||
|
// Layer Mask Red Green Blue
|
||||||
|
{0x00000000, 0xFFFFFFFF, {0x00, 0xFF, 0x00}}, // base layers - green
|
||||||
|
{0x00000002, 0xFFFFFFFE, {0x00, 0x00, 0xFF}}, // function layer - blue
|
||||||
|
{0x00000004, 0xFFFFFFFC, {0xFF, 0x00, 0xFF}}, // settings layer - magenta
|
||||||
|
{0xFFFFFFFF, 0xFFFFFFFF, {0xFF, 0xFF, 0xFF}}, // unknown layer - REQUIRED - white
|
||||||
|
};
|
||||||
|
|
||||||
void matrix_init_kb(void)
|
void matrix_init_kb(void)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -32,17 +32,64 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_ROWS 5
|
#define MATRIX_ROWS 5
|
||||||
#define MATRIX_COLS 15
|
#define MATRIX_COLS 15
|
||||||
|
|
||||||
|
/* MCU Port name definitions */
|
||||||
#define PA 0
|
#define PA 0
|
||||||
#define PB 1
|
#define PB 1
|
||||||
|
|
||||||
|
/* Port and Pin definition of key row hardware configuration */
|
||||||
#define MATRIX_ROW_PORTS PA, PA, PA, PA, PA
|
#define MATRIX_ROW_PORTS PA, PA, PA, PA, PA
|
||||||
#define MATRIX_ROW_PINS 0, 1, 2, 3, 4
|
#define MATRIX_ROW_PINS 0, 1, 2, 3, 4
|
||||||
|
|
||||||
|
/* Port and Pin definition of key column hardware configuration */
|
||||||
#define MATRIX_COL_PORTS PB, PB, PB, PB, PB, PB, PB, PB, PB, PB, PA, PA, PA, PA, PA
|
#define MATRIX_COL_PORTS PB, PB, PB, PB, PB, PB, PB, PB, PB, PB, PA, PA, PA, PA, PA
|
||||||
#define MATRIX_COL_PINS 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 5, 6, 7, 10, 11
|
#define MATRIX_COL_PINS 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 5, 6, 7, 10, 11
|
||||||
|
|
||||||
/* Print boot debug codes using debug LED when M28 and M30 shorted */
|
/* This Shift Register expands available hardware output lines to control additional peripherals */
|
||||||
#define DEBUG_BOOT_TRACING
|
/* It uses four lines from the MCU to provide 16 output lines */
|
||||||
|
/* Shift Register Clock configuration (MCU to ShiftRegister.RCLK) */
|
||||||
|
#define SR_EXP_RCLK_PORT PB
|
||||||
|
#define SR_EXP_RCLK_PIN 14
|
||||||
|
/* Shift Register Output Enable configuration (MCU to ShiftRegister.OE_N) */
|
||||||
|
#define SR_EXP_OE_N_PORT PB
|
||||||
|
#define SR_EXP_OE_N_PIN 15
|
||||||
|
/* SERCOM port to use for Shift Register SPI */
|
||||||
|
/* DATAOUT and SCLK must be configured to use hardware pins of this port */
|
||||||
|
#define SR_EXP_SERCOM SERCOM2
|
||||||
|
/* Shift Register SPI Data Out configuration (MCU.SERCOMx.PAD[0] to ShiftRegister.SER) */
|
||||||
|
#define SR_EXP_DATAOUT_PORT PA
|
||||||
|
#define SR_EXP_DATAOUT_PIN 12
|
||||||
|
#define SR_EXP_DATAOUT_MUX 2
|
||||||
|
/* Shift Register SPI Serial Clock configuration (MCU.SERCOMx.PAD[1] to ShiftRegister.SRCLK) */
|
||||||
|
#define SR_EXP_SCLK_PORT PA
|
||||||
|
#define SR_EXP_SCLK_PIN 13
|
||||||
|
#define SR_EXP_SCLK_MUX 2
|
||||||
|
|
||||||
|
/* Debug LED (Small LED Located near MCU) */
|
||||||
|
#define DEBUG_LED_ENABLE 1
|
||||||
|
#define DEBUG_LED_PORT PA
|
||||||
|
#define DEBUG_LED_PIN 27
|
||||||
|
|
||||||
|
/* Additional debugging ports */
|
||||||
|
/* PCB M21 */
|
||||||
|
#define DEBUG_PORT1_ENABLE 1
|
||||||
|
#define DEBUG_PORT1_PORT PB
|
||||||
|
#define DEBUG_PORT1_PIN 3
|
||||||
|
/* PCB M23 */
|
||||||
|
#define DEBUG_PORT2_ENABLE 1
|
||||||
|
#define DEBUG_PORT2_PORT PB
|
||||||
|
#define DEBUG_PORT2_PIN 17
|
||||||
|
/* PCB M25 */
|
||||||
|
#define DEBUG_PORT3_ENABLE 1
|
||||||
|
#define DEBUG_PORT3_PORT PA
|
||||||
|
#define DEBUG_PORT3_PIN 20
|
||||||
|
|
||||||
|
/* Debug Boot Tracing - During boot sequence, ground this pin to halt and display debug code using Debug LED */
|
||||||
|
/* This is useful in determining which hardware device may have malfunctioned or is improperly configured */
|
||||||
|
/* Feature is automatically disabled after successful boot */
|
||||||
|
/* PCB M27 */
|
||||||
|
#define DEBUG_BOOT_TRACING_ENABLE 1
|
||||||
|
#define DEBUG_BOOT_TRACING_PORT PB
|
||||||
|
#define DEBUG_BOOT_TRACING_PIN 23
|
||||||
|
|
||||||
/* 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
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ void matrix_init(void)
|
|||||||
PORT->Group[col_ports[col]].DIRSET.reg = 1 << col_pins[col]; //Output
|
PORT->Group[col_ports[col]].DIRSET.reg = 1 << col_pins[col]; //Output
|
||||||
PORT->Group[col_ports[col]].OUTCLR.reg = 1 << col_pins[col]; //Low
|
PORT->Group[col_ports[col]].OUTCLR.reg = 1 << col_pins[col]; //Low
|
||||||
}
|
}
|
||||||
|
|
||||||
matrix_init_quantum();
|
matrix_init_quantum();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@ uint8_t matrix_scan(void)
|
|||||||
|
|
||||||
if (CLK_get_ms() < mdebouncing) return 1; //mdebouncing == 0 when no debouncing active
|
if (CLK_get_ms() < mdebouncing) return 1; //mdebouncing == 0 when no debouncing active
|
||||||
|
|
||||||
//m15_off; //Profiling scans
|
//DBG_1_OFF; //Profiling scans
|
||||||
|
|
||||||
memset(mlatest, 0, MATRIX_ROWS * sizeof(matrix_row_t)); //Zero the result buffer
|
memset(mlatest, 0, MATRIX_ROWS * sizeof(matrix_row_t)); //Zero the result buffer
|
||||||
|
|
||||||
@@ -135,7 +135,7 @@ uint8_t matrix_scan(void)
|
|||||||
mdebouncing = CLK_get_ms() + DEBOUNCING_DELAY;
|
mdebouncing = CLK_get_ms() + DEBOUNCING_DELAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
//m15_on; //Profiling scans
|
//DBG_1_ON; //Profiling scans
|
||||||
|
|
||||||
matrix_scan_quantum();
|
matrix_scan_quantum();
|
||||||
|
|
||||||
|
|||||||
@@ -32,17 +32,64 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_ROWS 11
|
#define MATRIX_ROWS 11
|
||||||
#define MATRIX_COLS 8
|
#define MATRIX_COLS 8
|
||||||
|
|
||||||
|
/* MCU Port name definitions */
|
||||||
#define PA 0
|
#define PA 0
|
||||||
#define PB 1
|
#define PB 1
|
||||||
|
|
||||||
|
/* Port and Pin definition of key row hardware configuration */
|
||||||
#define MATRIX_ROW_PORTS PB, PB, PB, PB, PB, PB, PA, PA, PB, PB, PB
|
#define MATRIX_ROW_PORTS PB, PB, PB, PB, PB, PB, PA, PA, PB, PB, PB
|
||||||
#define MATRIX_ROW_PINS 4, 5, 6, 7, 8, 9, 10, 11, 10, 11, 12
|
#define MATRIX_ROW_PINS 4, 5, 6, 7, 8, 9, 10, 11, 10, 11, 12
|
||||||
|
|
||||||
|
/* Port and Pin definition of key column hardware configuration */
|
||||||
#define MATRIX_COL_PORTS PA, PA, PA, PA, PA, PA, PA, PA
|
#define MATRIX_COL_PORTS PA, PA, PA, PA, PA, PA, PA, PA
|
||||||
#define MATRIX_COL_PINS 0, 1, 2, 3, 4, 5, 6, 7
|
#define MATRIX_COL_PINS 0, 1, 2, 3, 4, 5, 6, 7
|
||||||
|
|
||||||
/* Print boot debug codes using debug LED when M28 and M30 shorted */
|
/* This Shift Register expands available hardware output lines to control additional peripherals */
|
||||||
#define DEBUG_BOOT_TRACING
|
/* It uses four lines from the MCU to provide 16 output lines */
|
||||||
|
/* Shift Register Clock configuration (MCU to ShiftRegister.RCLK) */
|
||||||
|
#define SR_EXP_RCLK_PORT PB
|
||||||
|
#define SR_EXP_RCLK_PIN 14
|
||||||
|
/* Shift Register Output Enable configuration (MCU to ShiftRegister.OE_N) */
|
||||||
|
#define SR_EXP_OE_N_PORT PB
|
||||||
|
#define SR_EXP_OE_N_PIN 15
|
||||||
|
/* SERCOM port to use for Shift Register SPI */
|
||||||
|
/* DATAOUT and SCLK must be configured to use hardware pins of this port */
|
||||||
|
#define SR_EXP_SERCOM SERCOM2
|
||||||
|
/* Shift Register SPI Data Out configuration (MCU.SERCOMx.PAD[0] to ShiftRegister.SER) */
|
||||||
|
#define SR_EXP_DATAOUT_PORT PA
|
||||||
|
#define SR_EXP_DATAOUT_PIN 12
|
||||||
|
#define SR_EXP_DATAOUT_MUX 2
|
||||||
|
/* Shift Register SPI Serial Clock configuration (MCU.SERCOMx.PAD[1] to ShiftRegister.SRCLK) */
|
||||||
|
#define SR_EXP_SCLK_PORT PA
|
||||||
|
#define SR_EXP_SCLK_PIN 13
|
||||||
|
#define SR_EXP_SCLK_MUX 2
|
||||||
|
|
||||||
|
/* Debug LED (Small LED Located near MCU) */
|
||||||
|
#define DEBUG_LED_ENABLE 1
|
||||||
|
#define DEBUG_LED_PORT PA
|
||||||
|
#define DEBUG_LED_PIN 27
|
||||||
|
|
||||||
|
/* Additional debugging ports */
|
||||||
|
/* PCB M21 */
|
||||||
|
#define DEBUG_PORT1_ENABLE 1
|
||||||
|
#define DEBUG_PORT1_PORT PB
|
||||||
|
#define DEBUG_PORT1_PIN 3
|
||||||
|
/* PCB M23 */
|
||||||
|
#define DEBUG_PORT2_ENABLE 1
|
||||||
|
#define DEBUG_PORT2_PORT PB
|
||||||
|
#define DEBUG_PORT2_PIN 17
|
||||||
|
/* PCB M25 */
|
||||||
|
#define DEBUG_PORT3_ENABLE 1
|
||||||
|
#define DEBUG_PORT3_PORT PA
|
||||||
|
#define DEBUG_PORT3_PIN 20
|
||||||
|
|
||||||
|
/* Debug Boot Tracing - During boot sequence, ground this pin to halt and display debug code using Debug LED */
|
||||||
|
/* This is useful in determining which hardware device may have malfunctioned or is improperly configured */
|
||||||
|
/* Feature is automatically disabled after successful boot */
|
||||||
|
/* PCB M27 */
|
||||||
|
#define DEBUG_BOOT_TRACING_ENABLE 1
|
||||||
|
#define DEBUG_BOOT_TRACING_PORT PB
|
||||||
|
#define DEBUG_BOOT_TRACING_PIN 23
|
||||||
|
|
||||||
/* 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
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ void matrix_init(void)
|
|||||||
PORT->Group[col_ports[col]].DIRSET.reg = 1 << col_pins[col]; //Output
|
PORT->Group[col_ports[col]].DIRSET.reg = 1 << col_pins[col]; //Output
|
||||||
PORT->Group[col_ports[col]].OUTCLR.reg = 1 << col_pins[col]; //Low
|
PORT->Group[col_ports[col]].OUTCLR.reg = 1 << col_pins[col]; //Low
|
||||||
}
|
}
|
||||||
|
|
||||||
matrix_init_quantum();
|
matrix_init_quantum();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@ uint8_t matrix_scan(void)
|
|||||||
|
|
||||||
if (CLK_get_ms() < mdebouncing) return 1; //mdebouncing == 0 when no debouncing active
|
if (CLK_get_ms() < mdebouncing) return 1; //mdebouncing == 0 when no debouncing active
|
||||||
|
|
||||||
//m15_off; //Profiling scans
|
//DBG_1_OFF; //Profiling scans
|
||||||
|
|
||||||
memset(mlatest, 0, MATRIX_ROWS * sizeof(matrix_row_t)); //Zero the result buffer
|
memset(mlatest, 0, MATRIX_ROWS * sizeof(matrix_row_t)); //Zero the result buffer
|
||||||
|
|
||||||
@@ -135,7 +135,7 @@ uint8_t matrix_scan(void)
|
|||||||
mdebouncing = CLK_get_ms() + DEBOUNCING_DELAY;
|
mdebouncing = CLK_get_ms() + DEBOUNCING_DELAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
//m15_on; //Profiling scans
|
//DBG_1_ON; //Profiling scans
|
||||||
|
|
||||||
matrix_scan_quantum();
|
matrix_scan_quantum();
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"width": 12,
|
"width": 12,
|
||||||
"height": 5,
|
"height": 5,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"KEYMAP": {
|
"LAYOUT_preonic_1x2uC": {
|
||||||
"key_count": 59,
|
"key_count": 59,
|
||||||
"layout": [
|
"layout": [
|
||||||
{ "w": 1, "x": 0, "y": 0 },
|
{ "w": 1, "x": 0, "y": 0 },
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
{ "w": 1, "x": 10, "y": 4 },
|
{ "w": 1, "x": 10, "y": 4 },
|
||||||
{ "w": 1, "x": 11, "y": 4 } ]
|
{ "w": 1, "x": 11, "y": 4 } ]
|
||||||
},
|
},
|
||||||
"LAYOUT_preonic_grid": {
|
"LAYOUT_ortho_5x12": {
|
||||||
"key_count": 60,
|
"key_count": 60,
|
||||||
"layout": [
|
"layout": [
|
||||||
{ "w": 1, "x": 0, "y": 0 },
|
{ "w": 1, "x": 0, "y": 0 },
|
||||||
|
|||||||
+20
-143
@@ -1,149 +1,26 @@
|
|||||||
#ifndef PREONIC_H
|
#pragma once
|
||||||
#define PREONIC_H
|
|
||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#ifdef __AVR__
|
/**************************************************
|
||||||
|
** Include headers specific to keyboard revision **
|
||||||
#define LAYOUT_preonic_1x2uC( \
|
***************************************************/
|
||||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
#ifdef KEYBOARD_preonic_rev1
|
||||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
#include "rev1.h"
|
||||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
|
||||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
|
|
||||||
k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b \
|
|
||||||
) \
|
|
||||||
{ \
|
|
||||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
|
|
||||||
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
|
|
||||||
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
|
|
||||||
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b }, \
|
|
||||||
{ k40, k41, k42, k43, k44, k45, k45, k47, k48, k49, k4a, k4b } \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define LAYOUT_preonic_grid( \
|
|
||||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
|
||||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
|
||||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
|
||||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
|
|
||||||
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b \
|
|
||||||
) \
|
|
||||||
{ \
|
|
||||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
|
|
||||||
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
|
|
||||||
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
|
|
||||||
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b }, \
|
|
||||||
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b } \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define KEYMAP LAYOUT_preonic_1x2uC
|
|
||||||
#define LAYOUT_ortho_5x12 LAYOUT_preonic_grid
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#define LAYOUT_preonic_1x2uC( \
|
|
||||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
|
||||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
|
||||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
|
||||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
|
|
||||||
k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b \
|
|
||||||
) \
|
|
||||||
{ \
|
|
||||||
{ k00, k01, k02, k03, k04, k05 }, \
|
|
||||||
{ k10, k11, k12, k13, k14, k15 }, \
|
|
||||||
{ k20, k21, k22, k23, k24, k25 }, \
|
|
||||||
{ k30, k31, k32, k33, k34, k35 }, \
|
|
||||||
{ k06, k07, k08, k09, k0a, k0b }, \
|
|
||||||
{ k16, k17, k18, k19, k1a, k1b }, \
|
|
||||||
{ k26, k27, k28, k29, k2a, k2b }, \
|
|
||||||
{ k36, k37, k38, k39, k3a, k3b }, \
|
|
||||||
{ k40, k41, k42, k49, k4a, k4b }, \
|
|
||||||
{ k46, k47, k48, k43, k44, k45 } \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define LAYOUT_preonic_1x2uR( \
|
|
||||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
|
||||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
|
||||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
|
||||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
|
|
||||||
k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b \
|
|
||||||
) \
|
|
||||||
{ \
|
|
||||||
{ k00, k01, k02, k03, k04, k05 }, \
|
|
||||||
{ k10, k11, k12, k13, k14, k15 }, \
|
|
||||||
{ k20, k21, k22, k23, k24, k25 }, \
|
|
||||||
{ k30, k31, k32, k33, k34, k35 }, \
|
|
||||||
{ k06, k07, k08, k09, k0a, k0b }, \
|
|
||||||
{ k16, k17, k18, k19, k1a, k1b }, \
|
|
||||||
{ k26, k27, k28, k29, k2a, k2b }, \
|
|
||||||
{ k36, k37, k38, k39, k3a, k3b }, \
|
|
||||||
{ k40, k41, k42, k49, k4a, k4b }, \
|
|
||||||
{ k46, k47, k48, k43, k44, k45 } \
|
|
||||||
}
|
|
||||||
#define LAYOUT_preonic_1x2uL( \
|
|
||||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
|
||||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
|
||||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
|
||||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
|
|
||||||
k40, k41, k42, k43, k44, k46, k47, k48, k49, k4a, k4b \
|
|
||||||
) \
|
|
||||||
{ \
|
|
||||||
{ k00, k01, k02, k03, k04, k05 }, \
|
|
||||||
{ k10, k11, k12, k13, k14, k15 }, \
|
|
||||||
{ k20, k21, k22, k23, k24, k25 }, \
|
|
||||||
{ k30, k31, k32, k33, k34, k35 }, \
|
|
||||||
{ k06, k07, k08, k09, k0a, k0b }, \
|
|
||||||
{ k16, k17, k18, k19, k1a, k1b }, \
|
|
||||||
{ k26, k27, k28, k29, k2a, k2b }, \
|
|
||||||
{ k36, k37, k38, k39, k3a, k3b }, \
|
|
||||||
{ k40, k41, k42, k49, k4a, k4b }, \
|
|
||||||
{ k46, k47, k48, k43, k44, k45 } \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define LAYOUT_preonic_2x2u( \
|
|
||||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
|
||||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
|
||||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
|
||||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
|
|
||||||
k40, k41, k42, k43, k44, k46, k48, k49, k4a, k4b \
|
|
||||||
) \
|
|
||||||
{ \
|
|
||||||
{ k00, k01, k02, k03, k04, k05 }, \
|
|
||||||
{ k10, k11, k12, k13, k14, k15 }, \
|
|
||||||
{ k20, k21, k22, k23, k24, k25 }, \
|
|
||||||
{ k30, k31, k32, k33, k34, k35 }, \
|
|
||||||
{ k06, k07, k08, k09, k0a, k0b }, \
|
|
||||||
{ k16, k17, k18, k19, k1a, k1b }, \
|
|
||||||
{ k26, k27, k28, k29, k2a, k2b }, \
|
|
||||||
{ k36, k37, k38, k39, k3a, k3b }, \
|
|
||||||
{ k40, k41, k42, k49, k4a, k4b }, \
|
|
||||||
{ k46, k47, k48, k43, k44, k45 } \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define LAYOUT_preonic_grid( \
|
|
||||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
|
||||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
|
||||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
|
||||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
|
|
||||||
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b \
|
|
||||||
) \
|
|
||||||
{ \
|
|
||||||
{ k00, k01, k02, k03, k04, k05 }, \
|
|
||||||
{ k10, k11, k12, k13, k14, k15 }, \
|
|
||||||
{ k20, k21, k22, k23, k24, k25 }, \
|
|
||||||
{ k30, k31, k32, k33, k34, k35 }, \
|
|
||||||
{ k06, k07, k08, k09, k0a, k0b }, \
|
|
||||||
{ k16, k17, k18, k19, k1a, k1b }, \
|
|
||||||
{ k26, k27, k28, k29, k2a, k2b }, \
|
|
||||||
{ k36, k37, k38, k39, k3a, k3b }, \
|
|
||||||
{ k40, k41, k42, k49, k4a, k4b }, \
|
|
||||||
{ k46, k47, k48, k43, k44, k45 } \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define KEYMAP LAYOUT_preonic_grid
|
|
||||||
#define LAYOUT_ortho_4x12 LAYOUT_preonic_grid
|
|
||||||
#define KC_LAYOUT_ortho_4x12 KC_KEYMAP
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef KEYBOARD_preonic_rev2
|
||||||
|
#include "rev2.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef KEYBOARD_preonic_rev3
|
||||||
|
#include "rev3.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************************
|
||||||
|
** Layout macros aliases common to all revisions **
|
||||||
|
|
||||||
|
Name of Alias Matrix Name:
|
||||||
|
----------------- ------------------- ****/
|
||||||
|
#define LAYOUT_ortho_5x12 LAYOUT_preonic_grid
|
||||||
@@ -13,4 +13,41 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "preonic.h"
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "preonic.h"
|
||||||
|
|
||||||
|
#ifdef __AVR__ // Preonic revs. 1 & 2
|
||||||
|
|
||||||
|
#define LAYOUT_preonic_1x2uC( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
|
||||||
|
k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b }, \
|
||||||
|
{ k40, k41, k42, k43, k44, k45, k45, k47, k48, k49, k4a, k4b } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_preonic_grid( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
|
||||||
|
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b }, \
|
||||||
|
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -14,4 +14,40 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#include "preonic.h"
|
#include "preonic.h"
|
||||||
|
|
||||||
|
#ifdef __AVR__ // Preonic revs. 1 & 2
|
||||||
|
|
||||||
|
#define LAYOUT_preonic_1x2uC( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
|
||||||
|
k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b }, \
|
||||||
|
{ k40, k41, k42, k43, k44, k45, k45, k47, k48, k49, k4a, k4b } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_preonic_grid( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
|
||||||
|
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b }, \
|
||||||
|
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,330 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Preonic rev. 3",
|
||||||
|
"keyboard_folder": "preonic/rev3",
|
||||||
|
"url": "https://olkb.com/preonic",
|
||||||
|
"maintainer": "jackhumbert",
|
||||||
|
"width": 12,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_preonic_1x2uC": {
|
||||||
|
"key_count": 59,
|
||||||
|
"layout": [
|
||||||
|
{"label":"k00", "x":0, "y":0},
|
||||||
|
{"label":"k01", "x":1, "y":0},
|
||||||
|
{"label":"k02", "x":2, "y":0},
|
||||||
|
{"label":"k03", "x":3, "y":0},
|
||||||
|
{"label":"k04", "x":4, "y":0},
|
||||||
|
{"label":"k05", "x":5, "y":0},
|
||||||
|
{"label":"k06", "x":6, "y":0},
|
||||||
|
{"label":"k07", "x":7, "y":0},
|
||||||
|
{"label":"k08", "x":8, "y":0},
|
||||||
|
{"label":"k09", "x":9, "y":0},
|
||||||
|
{"label":"k0a", "x":10, "y":0},
|
||||||
|
{"label":"k0b", "x":11, "y":0},
|
||||||
|
{"label":"k10", "x":0, "y":1},
|
||||||
|
{"label":"k11", "x":1, "y":1},
|
||||||
|
{"label":"k12", "x":2, "y":1},
|
||||||
|
{"label":"k13", "x":3, "y":1},
|
||||||
|
{"label":"k14", "x":4, "y":1},
|
||||||
|
{"label":"k15", "x":5, "y":1},
|
||||||
|
{"label":"k16", "x":6, "y":1},
|
||||||
|
{"label":"k17", "x":7, "y":1},
|
||||||
|
{"label":"k18", "x":8, "y":1},
|
||||||
|
{"label":"k19", "x":9, "y":1},
|
||||||
|
{"label":"k1a", "x":10, "y":1},
|
||||||
|
{"label":"k1b", "x":11, "y":1},
|
||||||
|
{"label":"k20", "x":0, "y":2},
|
||||||
|
{"label":"k21", "x":1, "y":2},
|
||||||
|
{"label":"k22", "x":2, "y":2},
|
||||||
|
{"label":"k23", "x":3, "y":2},
|
||||||
|
{"label":"k24", "x":4, "y":2},
|
||||||
|
{"label":"k25", "x":5, "y":2},
|
||||||
|
{"label":"k26", "x":6, "y":2},
|
||||||
|
{"label":"k27", "x":7, "y":2},
|
||||||
|
{"label":"k28", "x":8, "y":2},
|
||||||
|
{"label":"k29", "x":9, "y":2},
|
||||||
|
{"label":"k2a", "x":10, "y":2},
|
||||||
|
{"label":"k2b", "x":11, "y":2},
|
||||||
|
{"label":"k30", "x":0, "y":3},
|
||||||
|
{"label":"k31", "x":1, "y":3},
|
||||||
|
{"label":"k32", "x":2, "y":3},
|
||||||
|
{"label":"k33", "x":3, "y":3},
|
||||||
|
{"label":"k34", "x":4, "y":3},
|
||||||
|
{"label":"k35", "x":5, "y":3},
|
||||||
|
{"label":"k36", "x":6, "y":3},
|
||||||
|
{"label":"k37", "x":7, "y":3},
|
||||||
|
{"label":"k38", "x":8, "y":3},
|
||||||
|
{"label":"k39", "x":9, "y":3},
|
||||||
|
{"label":"k3a", "x":10, "y":3},
|
||||||
|
{"label":"k3b", "x":11, "y":3},
|
||||||
|
{"label":"k40", "x":0, "y":4},
|
||||||
|
{"label":"k41", "x":1, "y":4},
|
||||||
|
{"label":"k42", "x":2, "y":4},
|
||||||
|
{"label":"k43", "x":3, "y":4},
|
||||||
|
{"label":"k44", "x":4, "y":4},
|
||||||
|
{"label":"k45", "x":5, "y":4, "w":2},
|
||||||
|
{"label":"k47", "x":7, "y":4},
|
||||||
|
{"label":"k48", "x":8, "y":4},
|
||||||
|
{"label":"k49", "x":9, "y":4},
|
||||||
|
{"label":"k4a", "x":10, "y":4},
|
||||||
|
{"label":"k4b", "x":11, "y":4}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"LAYOUT_preonic_1x2uR": {
|
||||||
|
"key_count": 59,
|
||||||
|
"layout": [
|
||||||
|
{"label":"k00", "x":0, "y":0},
|
||||||
|
{"label":"k01", "x":1, "y":0},
|
||||||
|
{"label":"k02", "x":2, "y":0},
|
||||||
|
{"label":"k03", "x":3, "y":0},
|
||||||
|
{"label":"k04", "x":4, "y":0},
|
||||||
|
{"label":"k05", "x":5, "y":0},
|
||||||
|
{"label":"k06", "x":6, "y":0},
|
||||||
|
{"label":"k07", "x":7, "y":0},
|
||||||
|
{"label":"k08", "x":8, "y":0},
|
||||||
|
{"label":"k09", "x":9, "y":0},
|
||||||
|
{"label":"k0a", "x":10, "y":0},
|
||||||
|
{"label":"k0b", "x":11, "y":0},
|
||||||
|
{"label":"k10", "x":0, "y":1},
|
||||||
|
{"label":"k11", "x":1, "y":1},
|
||||||
|
{"label":"k12", "x":2, "y":1},
|
||||||
|
{"label":"k13", "x":3, "y":1},
|
||||||
|
{"label":"k14", "x":4, "y":1},
|
||||||
|
{"label":"k15", "x":5, "y":1},
|
||||||
|
{"label":"k16", "x":6, "y":1},
|
||||||
|
{"label":"k17", "x":7, "y":1},
|
||||||
|
{"label":"k18", "x":8, "y":1},
|
||||||
|
{"label":"k19", "x":9, "y":1},
|
||||||
|
{"label":"k1a", "x":10, "y":1},
|
||||||
|
{"label":"k1b", "x":11, "y":1},
|
||||||
|
{"label":"k20", "x":0, "y":2},
|
||||||
|
{"label":"k21", "x":1, "y":2},
|
||||||
|
{"label":"k22", "x":2, "y":2},
|
||||||
|
{"label":"k23", "x":3, "y":2},
|
||||||
|
{"label":"k24", "x":4, "y":2},
|
||||||
|
{"label":"k25", "x":5, "y":2},
|
||||||
|
{"label":"k26", "x":6, "y":2},
|
||||||
|
{"label":"k27", "x":7, "y":2},
|
||||||
|
{"label":"k28", "x":8, "y":2},
|
||||||
|
{"label":"k29", "x":9, "y":2},
|
||||||
|
{"label":"k2a", "x":10, "y":2},
|
||||||
|
{"label":"k2b", "x":11, "y":2},
|
||||||
|
{"label":"k30", "x":0, "y":3},
|
||||||
|
{"label":"k31", "x":1, "y":3},
|
||||||
|
{"label":"k32", "x":2, "y":3},
|
||||||
|
{"label":"k33", "x":3, "y":3},
|
||||||
|
{"label":"k34", "x":4, "y":3},
|
||||||
|
{"label":"k35", "x":5, "y":3},
|
||||||
|
{"label":"k36", "x":6, "y":3},
|
||||||
|
{"label":"k37", "x":7, "y":3},
|
||||||
|
{"label":"k38", "x":8, "y":3},
|
||||||
|
{"label":"k39", "x":9, "y":3},
|
||||||
|
{"label":"k3a", "x":10, "y":3},
|
||||||
|
{"label":"k3b", "x":11, "y":3},
|
||||||
|
{"label":"k40", "x":0, "y":4},
|
||||||
|
{"label":"k41", "x":1, "y":4},
|
||||||
|
{"label":"k42", "x":2, "y":4},
|
||||||
|
{"label":"k43", "x":3, "y":4},
|
||||||
|
{"label":"k44", "x":4, "y":4},
|
||||||
|
{"label":"k45", "x":5, "y":4},
|
||||||
|
{"label":"k47", "x":6, "y":4, "w":2},
|
||||||
|
{"label":"k48", "x":8, "y":4},
|
||||||
|
{"label":"k49", "x":9, "y":4},
|
||||||
|
{"label":"k4a", "x":10, "y":4},
|
||||||
|
{"label":"k4b", "x":11, "y":4}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"LAYOUT_preonic_1x2uL": {
|
||||||
|
"key_count": 59,
|
||||||
|
"layout": [
|
||||||
|
{"label":"k00", "x":0, "y":0},
|
||||||
|
{"label":"k01", "x":1, "y":0},
|
||||||
|
{"label":"k02", "x":2, "y":0},
|
||||||
|
{"label":"k03", "x":3, "y":0},
|
||||||
|
{"label":"k04", "x":4, "y":0},
|
||||||
|
{"label":"k05", "x":5, "y":0},
|
||||||
|
{"label":"k06", "x":6, "y":0},
|
||||||
|
{"label":"k07", "x":7, "y":0},
|
||||||
|
{"label":"k08", "x":8, "y":0},
|
||||||
|
{"label":"k09", "x":9, "y":0},
|
||||||
|
{"label":"k0a", "x":10, "y":0},
|
||||||
|
{"label":"k0b", "x":11, "y":0},
|
||||||
|
{"label":"k10", "x":0, "y":1},
|
||||||
|
{"label":"k11", "x":1, "y":1},
|
||||||
|
{"label":"k12", "x":2, "y":1},
|
||||||
|
{"label":"k13", "x":3, "y":1},
|
||||||
|
{"label":"k14", "x":4, "y":1},
|
||||||
|
{"label":"k15", "x":5, "y":1},
|
||||||
|
{"label":"k16", "x":6, "y":1},
|
||||||
|
{"label":"k17", "x":7, "y":1},
|
||||||
|
{"label":"k18", "x":8, "y":1},
|
||||||
|
{"label":"k19", "x":9, "y":1},
|
||||||
|
{"label":"k1a", "x":10, "y":1},
|
||||||
|
{"label":"k1b", "x":11, "y":1},
|
||||||
|
{"label":"k20", "x":0, "y":2},
|
||||||
|
{"label":"k21", "x":1, "y":2},
|
||||||
|
{"label":"k22", "x":2, "y":2},
|
||||||
|
{"label":"k23", "x":3, "y":2},
|
||||||
|
{"label":"k24", "x":4, "y":2},
|
||||||
|
{"label":"k25", "x":5, "y":2},
|
||||||
|
{"label":"k26", "x":6, "y":2},
|
||||||
|
{"label":"k27", "x":7, "y":2},
|
||||||
|
{"label":"k28", "x":8, "y":2},
|
||||||
|
{"label":"k29", "x":9, "y":2},
|
||||||
|
{"label":"k2a", "x":10, "y":2},
|
||||||
|
{"label":"k2b", "x":11, "y":2},
|
||||||
|
{"label":"k30", "x":0, "y":3},
|
||||||
|
{"label":"k31", "x":1, "y":3},
|
||||||
|
{"label":"k32", "x":2, "y":3},
|
||||||
|
{"label":"k33", "x":3, "y":3},
|
||||||
|
{"label":"k34", "x":4, "y":3},
|
||||||
|
{"label":"k35", "x":5, "y":3},
|
||||||
|
{"label":"k36", "x":6, "y":3},
|
||||||
|
{"label":"k37", "x":7, "y":3},
|
||||||
|
{"label":"k38", "x":8, "y":3},
|
||||||
|
{"label":"k39", "x":9, "y":3},
|
||||||
|
{"label":"k3a", "x":10, "y":3},
|
||||||
|
{"label":"k3b", "x":11, "y":3},
|
||||||
|
{"label":"k40", "x":0, "y":4},
|
||||||
|
{"label":"k41", "x":1, "y":4},
|
||||||
|
{"label":"k42", "x":2, "y":4},
|
||||||
|
{"label":"k43", "x":3, "y":4},
|
||||||
|
{"label":"k44", "x":4, "y":4, "w":2},
|
||||||
|
{"label":"k46", "x":6, "y":4},
|
||||||
|
{"label":"k47", "x":7, "y":4},
|
||||||
|
{"label":"k48", "x":8, "y":4},
|
||||||
|
{"label":"k49", "x":9, "y":4},
|
||||||
|
{"label":"k4a", "x":10, "y":4},
|
||||||
|
{"label":"k4b", "x":11, "y":4}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"LAYOUT_preonic_2x2u": {
|
||||||
|
"key_count": 58,
|
||||||
|
"layout": [
|
||||||
|
{"label":"k00", "x":0, "y":0},
|
||||||
|
{"label":"k01", "x":1, "y":0},
|
||||||
|
{"label":"k02", "x":2, "y":0},
|
||||||
|
{"label":"k03", "x":3, "y":0},
|
||||||
|
{"label":"k04", "x":4, "y":0},
|
||||||
|
{"label":"k05", "x":5, "y":0},
|
||||||
|
{"label":"k06", "x":6, "y":0},
|
||||||
|
{"label":"k07", "x":7, "y":0},
|
||||||
|
{"label":"k08", "x":8, "y":0},
|
||||||
|
{"label":"k09", "x":9, "y":0},
|
||||||
|
{"label":"k0a", "x":10, "y":0},
|
||||||
|
{"label":"k0b", "x":11, "y":0},
|
||||||
|
{"label":"k10", "x":0, "y":1},
|
||||||
|
{"label":"k11", "x":1, "y":1},
|
||||||
|
{"label":"k12", "x":2, "y":1},
|
||||||
|
{"label":"k13", "x":3, "y":1},
|
||||||
|
{"label":"k14", "x":4, "y":1},
|
||||||
|
{"label":"k15", "x":5, "y":1},
|
||||||
|
{"label":"k16", "x":6, "y":1},
|
||||||
|
{"label":"k17", "x":7, "y":1},
|
||||||
|
{"label":"k18", "x":8, "y":1},
|
||||||
|
{"label":"k19", "x":9, "y":1},
|
||||||
|
{"label":"k1a", "x":10, "y":1},
|
||||||
|
{"label":"k1b", "x":11, "y":1},
|
||||||
|
{"label":"k20", "x":0, "y":2},
|
||||||
|
{"label":"k21", "x":1, "y":2},
|
||||||
|
{"label":"k22", "x":2, "y":2},
|
||||||
|
{"label":"k23", "x":3, "y":2},
|
||||||
|
{"label":"k24", "x":4, "y":2},
|
||||||
|
{"label":"k25", "x":5, "y":2},
|
||||||
|
{"label":"k26", "x":6, "y":2},
|
||||||
|
{"label":"k27", "x":7, "y":2},
|
||||||
|
{"label":"k28", "x":8, "y":2},
|
||||||
|
{"label":"k29", "x":9, "y":2},
|
||||||
|
{"label":"k2a", "x":10, "y":2},
|
||||||
|
{"label":"k2b", "x":11, "y":2},
|
||||||
|
{"label":"k30", "x":0, "y":3},
|
||||||
|
{"label":"k31", "x":1, "y":3},
|
||||||
|
{"label":"k32", "x":2, "y":3},
|
||||||
|
{"label":"k33", "x":3, "y":3},
|
||||||
|
{"label":"k34", "x":4, "y":3},
|
||||||
|
{"label":"k35", "x":5, "y":3},
|
||||||
|
{"label":"k36", "x":6, "y":3},
|
||||||
|
{"label":"k37", "x":7, "y":3},
|
||||||
|
{"label":"k38", "x":8, "y":3},
|
||||||
|
{"label":"k39", "x":9, "y":3},
|
||||||
|
{"label":"k3a", "x":10, "y":3},
|
||||||
|
{"label":"k3b", "x":11, "y":3},
|
||||||
|
{"label":"k40", "x":0, "y":4},
|
||||||
|
{"label":"k41", "x":1, "y":4},
|
||||||
|
{"label":"k42", "x":2, "y":4},
|
||||||
|
{"label":"k43", "x":3, "y":4},
|
||||||
|
{"label":"k44", "x":4, "y":4, "w":2},
|
||||||
|
{"label":"k46", "x":6, "y":4, "w":2},
|
||||||
|
{"label":"k48", "x":8, "y":4},
|
||||||
|
{"label":"k49", "x":9, "y":4},
|
||||||
|
{"label":"k4a", "x":10, "y":4},
|
||||||
|
{"label":"k4b", "x":11, "y":4}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"LAYOUT_ortho_5x12": {
|
||||||
|
"layout": [
|
||||||
|
"key_count": 60,
|
||||||
|
{"label":"k00", "x":0, "y":0},
|
||||||
|
{"label":"k01", "x":1, "y":0},
|
||||||
|
{"label":"k02", "x":2, "y":0},
|
||||||
|
{"label":"k03", "x":3, "y":0},
|
||||||
|
{"label":"k04", "x":4, "y":0},
|
||||||
|
{"label":"k05", "x":5, "y":0},
|
||||||
|
{"label":"k06", "x":6, "y":0},
|
||||||
|
{"label":"k07", "x":7, "y":0},
|
||||||
|
{"label":"k08", "x":8, "y":0},
|
||||||
|
{"label":"k09", "x":9, "y":0},
|
||||||
|
{"label":"k0a", "x":10, "y":0},
|
||||||
|
{"label":"k0b", "x":11, "y":0},
|
||||||
|
{"label":"k10", "x":0, "y":1},
|
||||||
|
{"label":"k11", "x":1, "y":1},
|
||||||
|
{"label":"k12", "x":2, "y":1},
|
||||||
|
{"label":"k13", "x":3, "y":1},
|
||||||
|
{"label":"k14", "x":4, "y":1},
|
||||||
|
{"label":"k15", "x":5, "y":1},
|
||||||
|
{"label":"k16", "x":6, "y":1},
|
||||||
|
{"label":"k17", "x":7, "y":1},
|
||||||
|
{"label":"k18", "x":8, "y":1},
|
||||||
|
{"label":"k19", "x":9, "y":1},
|
||||||
|
{"label":"k1a", "x":10, "y":1},
|
||||||
|
{"label":"k1b", "x":11, "y":1},
|
||||||
|
{"label":"k20", "x":0, "y":2},
|
||||||
|
{"label":"k21", "x":1, "y":2},
|
||||||
|
{"label":"k22", "x":2, "y":2},
|
||||||
|
{"label":"k23", "x":3, "y":2},
|
||||||
|
{"label":"k24", "x":4, "y":2},
|
||||||
|
{"label":"k25", "x":5, "y":2},
|
||||||
|
{"label":"k26", "x":6, "y":2},
|
||||||
|
{"label":"k27", "x":7, "y":2},
|
||||||
|
{"label":"k28", "x":8, "y":2},
|
||||||
|
{"label":"k29", "x":9, "y":2},
|
||||||
|
{"label":"k2a", "x":10, "y":2},
|
||||||
|
{"label":"k2b", "x":11, "y":2},
|
||||||
|
{"label":"k30", "x":0, "y":3},
|
||||||
|
{"label":"k31", "x":1, "y":3},
|
||||||
|
{"label":"k32", "x":2, "y":3},
|
||||||
|
{"label":"k33", "x":3, "y":3},
|
||||||
|
{"label":"k34", "x":4, "y":3},
|
||||||
|
{"label":"k35", "x":5, "y":3},
|
||||||
|
{"label":"k36", "x":6, "y":3},
|
||||||
|
{"label":"k37", "x":7, "y":3},
|
||||||
|
{"label":"k38", "x":8, "y":3},
|
||||||
|
{"label":"k39", "x":9, "y":3},
|
||||||
|
{"label":"k3a", "x":10, "y":3},
|
||||||
|
{"label":"k3b", "x":11, "y":3},
|
||||||
|
{"label":"k40", "x":0, "y":4},
|
||||||
|
{"label":"k41", "x":1, "y":4},
|
||||||
|
{"label":"k42", "x":2, "y":4},
|
||||||
|
{"label":"k43", "x":3, "y":4},
|
||||||
|
{"label":"k44", "x":4, "y":4},
|
||||||
|
{"label":"k45", "x":5, "y":4},
|
||||||
|
{"label":"k46", "x":6, "y":4},
|
||||||
|
{"label":"k47", "x":7, "y":4},
|
||||||
|
{"label":"k48", "x":8, "y":4},
|
||||||
|
{"label":"k49", "x":9, "y":4},
|
||||||
|
{"label":"k4a", "x":10, "y":4},
|
||||||
|
{"label":"k4b", "x":11, "y":4}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -13,9 +13,111 @@
|
|||||||
* 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 REV3_H
|
|
||||||
#define REV3_H
|
#pragma once
|
||||||
|
|
||||||
#include "preonic.h"
|
#include "preonic.h"
|
||||||
|
|
||||||
|
#ifndef __AVR__ // Preonic rev. 3 and later
|
||||||
|
|
||||||
|
#define LAYOUT_preonic_1x2uC( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
|
||||||
|
k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, k04, k05 }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15 }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25 }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35 }, \
|
||||||
|
{ k06, k07, k08, k09, k0a, k0b }, \
|
||||||
|
{ k16, k17, k18, k19, k1a, k1b }, \
|
||||||
|
{ k26, k27, k28, k29, k2a, k2b }, \
|
||||||
|
{ k36, k37, k38, k39, k3a, k3b }, \
|
||||||
|
{ k40, k41, k42, k49, k4a, k4b }, \
|
||||||
|
{ k45, k47, k48, k43, k44, k45 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_preonic_1x2uR( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
|
||||||
|
k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, k04, k05 }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15 }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25 }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35 }, \
|
||||||
|
{ k06, k07, k08, k09, k0a, k0b }, \
|
||||||
|
{ k16, k17, k18, k19, k1a, k1b }, \
|
||||||
|
{ k26, k27, k28, k29, k2a, k2b }, \
|
||||||
|
{ k36, k37, k38, k39, k3a, k3b }, \
|
||||||
|
{ k40, k41, k42, k49, k4a, k4b }, \
|
||||||
|
{ k47, k47, k48, k43, k44, k45 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_preonic_1x2uL( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
|
||||||
|
k40, k41, k42, k43, k44, k46, k47, k48, k49, k4a, k4b \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, k04, k05 }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15 }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25 }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35 }, \
|
||||||
|
{ k06, k07, k08, k09, k0a, k0b }, \
|
||||||
|
{ k16, k17, k18, k19, k1a, k1b }, \
|
||||||
|
{ k26, k27, k28, k29, k2a, k2b }, \
|
||||||
|
{ k36, k37, k38, k39, k3a, k3b }, \
|
||||||
|
{ k40, k41, k42, k49, k4a, k4b }, \
|
||||||
|
{ k46, k47, k48, k43, k44, k44 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_preonic_2x2u( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
|
||||||
|
k40, k41, k42, k43, k44, k46, k48, k49, k4a, k4b \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, k04, k05 }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15 }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25 }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35 }, \
|
||||||
|
{ k06, k07, k08, k09, k0a, k0b }, \
|
||||||
|
{ k16, k17, k18, k19, k1a, k1b }, \
|
||||||
|
{ k26, k27, k28, k29, k2a, k2b }, \
|
||||||
|
{ k36, k37, k38, k39, k3a, k3b }, \
|
||||||
|
{ k40, k41, k42, k49, k4a, k4b }, \
|
||||||
|
{ k46, k46, k48, k43, k44, k44 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_preonic_grid( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
|
||||||
|
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, k04, k05 }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15 }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25 }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35 }, \
|
||||||
|
{ k06, k07, k08, k09, k0a, k0b }, \
|
||||||
|
{ k16, k17, k18, k19, k1a, k1b }, \
|
||||||
|
{ k26, k27, k28, k29, k2a, k2b }, \
|
||||||
|
{ k36, k37, k38, k39, k3a, k3b }, \
|
||||||
|
{ k40, k41, k42, k49, k4a, k4b }, \
|
||||||
|
{ k46, k47, k48, k43, k44, k45 } \
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -28,7 +28,6 @@
|
|||||||
#define TAPPING_TERM 200
|
#define TAPPING_TERM 200
|
||||||
|
|
||||||
// Alt gr
|
// Alt gr
|
||||||
#define ALGR(kc) RALT(kc)
|
|
||||||
#define DE_ALGR KC_RALT
|
#define DE_ALGR KC_RALT
|
||||||
|
|
||||||
// normal characters
|
// normal characters
|
||||||
|
|||||||
@@ -18,12 +18,12 @@
|
|||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
// USB Device descriptor parameter
|
// USB Device descriptor parameter
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0x5A45 // ZealPC ("ZE")
|
||||||
#define PRODUCT_ID 0x6060
|
#define PRODUCT_ID 0x0060 // Zeal60
|
||||||
#define DEVICE_VER 0x0001
|
#define DEVICE_VER 0x0001
|
||||||
#define MANUFACTURER ZealPC
|
#define MANUFACTURER ZealPC
|
||||||
#define PRODUCT Zeal60
|
#define PRODUCT Zeal60
|
||||||
#define DESCRIPTION Zeal60 (QMK Firmware)
|
#define DESCRIPTION Zeal60
|
||||||
|
|
||||||
// key matrix size
|
// key matrix size
|
||||||
#define MATRIX_ROWS 5
|
#define MATRIX_ROWS 5
|
||||||
|
|||||||
@@ -18,12 +18,12 @@
|
|||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
// USB Device descriptor parameter
|
// USB Device descriptor parameter
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0x5A45 // ZealPC ("ZE")
|
||||||
#define PRODUCT_ID 0x6065
|
#define PRODUCT_ID 0x0065 // Zeal65
|
||||||
#define DEVICE_VER 0x0001
|
#define DEVICE_VER 0x0001
|
||||||
#define MANUFACTURER ZealPC
|
#define MANUFACTURER ZealPC
|
||||||
#define PRODUCT Zeal65
|
#define PRODUCT Zeal65
|
||||||
#define DESCRIPTION Zeal65 (QMK Firmware)
|
#define DESCRIPTION Zeal65
|
||||||
|
|
||||||
// key matrix size
|
// key matrix size
|
||||||
#define MATRIX_ROWS 5
|
#define MATRIX_ROWS 5
|
||||||
|
|||||||
@@ -22,10 +22,7 @@
|
|||||||
#define BE_LALT KC_LGUI
|
#define BE_LALT KC_LGUI
|
||||||
|
|
||||||
// Alt gr
|
// Alt gr
|
||||||
#ifndef ALGR
|
#define BE_ALGR KC_RALT
|
||||||
#define ALGR(kc) RALT(kc)
|
|
||||||
#endif
|
|
||||||
#define NO_ALGR KC_RALT
|
|
||||||
|
|
||||||
// Normal characters
|
// Normal characters
|
||||||
// Line 1
|
// Line 1
|
||||||
|
|||||||
@@ -21,10 +21,7 @@
|
|||||||
|
|
||||||
// Alt gr
|
// Alt gr
|
||||||
#ifndef ALTGR
|
#ifndef ALTGR
|
||||||
#define ALTGR(kc) RALT(kc)
|
#define ALTGR(kc) ALGR(kc)
|
||||||
#endif
|
|
||||||
#ifndef ALGR
|
|
||||||
#define ALGR(kc) ALTGR(kc)
|
|
||||||
#endif
|
#endif
|
||||||
#define BP_ALGR KC_RALT
|
#define BP_ALGR KC_RALT
|
||||||
|
|
||||||
|
|||||||
@@ -20,10 +20,7 @@
|
|||||||
|
|
||||||
// Alt gr
|
// Alt gr
|
||||||
#ifndef ALTGR
|
#ifndef ALTGR
|
||||||
#define ALTGR(kc) RALT(kc)
|
#define ALTGR(kc) ALGR(kc)
|
||||||
#endif
|
|
||||||
#ifndef ALGR
|
|
||||||
#define ALGR(kc) ALTGR(kc)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CSA_ALTGR KC_RALT
|
#define CSA_ALTGR KC_RALT
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
#include "keymap.h"
|
#include "keymap.h"
|
||||||
|
|
||||||
// Alt gr
|
// Alt gr
|
||||||
#define ALGR(kc) RALT(kc)
|
|
||||||
#define FR_CH_ALGR KC_RALT
|
#define FR_CH_ALGR KC_RALT
|
||||||
|
|
||||||
// normal characters
|
// normal characters
|
||||||
|
|||||||
@@ -19,10 +19,7 @@
|
|||||||
#include "keymap.h"
|
#include "keymap.h"
|
||||||
|
|
||||||
// Alt gr
|
// Alt gr
|
||||||
#ifndef ALGR
|
#define FR_ALGR KC_RALT
|
||||||
#define ALGR(kc) RALT(kc)
|
|
||||||
#endif
|
|
||||||
#define NO_ALGR KC_RALT
|
|
||||||
|
|
||||||
// Normal characters
|
// Normal characters
|
||||||
#define FR_SUP2 KC_GRV
|
#define FR_SUP2 KC_GRV
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
#include "keymap.h"
|
#include "keymap.h"
|
||||||
|
|
||||||
// Alt gr
|
// Alt gr
|
||||||
#define ALGR(kc) RALT(kc)
|
|
||||||
#define DE_ALGR KC_RALT
|
#define DE_ALGR KC_RALT
|
||||||
|
|
||||||
// normal characters
|
// normal characters
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
#include "keymap.h"
|
#include "keymap.h"
|
||||||
|
|
||||||
// Alt gr
|
// Alt gr
|
||||||
#define ALGR(kc) RALT(kc)
|
|
||||||
#define CH_ALGR KC_RALT
|
#define CH_ALGR KC_RALT
|
||||||
|
|
||||||
// normal characters
|
// normal characters
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
#include "keymap.h"
|
#include "keymap.h"
|
||||||
|
|
||||||
// Alt gr
|
// Alt gr
|
||||||
#define ALGR(kc) RALT(kc)
|
|
||||||
#define HU_ALGR KC_RALT
|
#define HU_ALGR KC_RALT
|
||||||
|
|
||||||
// basic letters
|
// basic letters
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
#include "keymap.h"
|
#include "keymap.h"
|
||||||
|
|
||||||
// Alt gr
|
// Alt gr
|
||||||
#define ALGR(kc) RALT(kc)
|
|
||||||
#define IT_ALGR KC_RALT
|
#define IT_ALGR KC_RALT
|
||||||
|
|
||||||
// normal characters
|
// normal characters
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
#include "keymap.h"
|
#include "keymap.h"
|
||||||
|
|
||||||
// Alt gr
|
// Alt gr
|
||||||
#define ALGR(kc) RALT(kc)
|
|
||||||
#define NO_ALGR KC_RALT
|
#define NO_ALGR KC_RALT
|
||||||
|
|
||||||
// Normal characters
|
// Normal characters
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
#include "keymap.h"
|
#include "keymap.h"
|
||||||
|
|
||||||
// Alt gr
|
// Alt gr
|
||||||
#define ALGR(kc) RALT(kc)
|
|
||||||
#define SI_ALGR KC_RALT
|
#define SI_ALGR KC_RALT
|
||||||
|
|
||||||
//Swapped Z and Y
|
//Swapped Z and Y
|
||||||
|
|||||||
@@ -19,8 +19,7 @@
|
|||||||
#include "keymap.h"
|
#include "keymap.h"
|
||||||
|
|
||||||
// Alt gr
|
// Alt gr
|
||||||
#define ALGR(kc) RALT(kc)
|
#define ES_ALGR KC_RALT
|
||||||
#define NO_ALGR KC_RALT
|
|
||||||
|
|
||||||
// Normal characters
|
// Normal characters
|
||||||
#define ES_OVRR KC_GRV
|
#define ES_OVRR KC_GRV
|
||||||
|
|||||||
@@ -19,8 +19,7 @@
|
|||||||
#include "keymap.h"
|
#include "keymap.h"
|
||||||
|
|
||||||
// Alt gr
|
// Alt gr
|
||||||
#define ALGR(kc) RALT(kc)
|
#define UK_ALGR KC_RALT
|
||||||
#define NO_ALGR KC_RALT
|
|
||||||
|
|
||||||
// Normal characters
|
// Normal characters
|
||||||
#define UK_HASH KC_NUHS
|
#define UK_HASH KC_NUHS
|
||||||
|
|||||||
@@ -197,6 +197,7 @@ extern uint32_t default_layer_state;
|
|||||||
#define SS_LALT(string) SS_DOWN(X_LALT) string SS_UP(X_LALT)
|
#define SS_LALT(string) SS_DOWN(X_LALT) string SS_UP(X_LALT)
|
||||||
#define SS_LSFT(string) SS_DOWN(X_LSHIFT) string SS_UP(X_LSHIFT)
|
#define SS_LSFT(string) SS_DOWN(X_LSHIFT) string SS_UP(X_LSHIFT)
|
||||||
#define SS_RALT(string) SS_DOWN(X_RALT) string SS_UP(X_RALT)
|
#define SS_RALT(string) SS_DOWN(X_RALT) string SS_UP(X_RALT)
|
||||||
|
#define SS_ALGR(string) SS_RALT(string)
|
||||||
|
|
||||||
#define SEND_STRING(str) send_string_P(PSTR(str))
|
#define SEND_STRING(str) send_string_P(PSTR(str))
|
||||||
extern const bool ascii_to_shift_lut[0x80];
|
extern const bool ascii_to_shift_lut[0x80];
|
||||||
|
|||||||
@@ -470,6 +470,7 @@ enum quantum_keycodes {
|
|||||||
#define RCTL(kc) (QK_RCTL | (kc))
|
#define RCTL(kc) (QK_RCTL | (kc))
|
||||||
#define RSFT(kc) (QK_RSFT | (kc))
|
#define RSFT(kc) (QK_RSFT | (kc))
|
||||||
#define RALT(kc) (QK_RALT | (kc))
|
#define RALT(kc) (QK_RALT | (kc))
|
||||||
|
#define ALGR(kc) RALT(kc)
|
||||||
#define RGUI(kc) (QK_RGUI | (kc))
|
#define RGUI(kc) (QK_RGUI | (kc))
|
||||||
#define RCMD(kc) RGUI(kc)
|
#define RCMD(kc) RGUI(kc)
|
||||||
#define RWIN(kc) RGUI(kc)
|
#define RWIN(kc) RGUI(kc)
|
||||||
@@ -480,7 +481,7 @@ enum quantum_keycodes {
|
|||||||
#define SGUI(kc) (QK_LGUI | QK_LSFT | (kc))
|
#define SGUI(kc) (QK_LGUI | QK_LSFT | (kc))
|
||||||
#define SCMD(kc) SGUI(kc)
|
#define SCMD(kc) SGUI(kc)
|
||||||
#define SWIN(kc) SGUI(kc)
|
#define SWIN(kc) SGUI(kc)
|
||||||
#define LCA(kc) (QK_LCTL | QK_LALT | (kc))
|
#define LCA(kc) (QK_LCTL | QK_LALT | (kc))
|
||||||
|
|
||||||
#define MOD_HYPR 0xf
|
#define MOD_HYPR 0xf
|
||||||
#define MOD_MEH 0x7
|
#define MOD_MEH 0x7
|
||||||
@@ -645,7 +646,7 @@ enum quantum_keycodes {
|
|||||||
#define ALT_T(kc) MT(MOD_LALT, kc)
|
#define ALT_T(kc) MT(MOD_LALT, kc)
|
||||||
#define LALT_T(kc) MT(MOD_LALT, kc)
|
#define LALT_T(kc) MT(MOD_LALT, kc)
|
||||||
#define RALT_T(kc) MT(MOD_RALT, kc)
|
#define RALT_T(kc) MT(MOD_RALT, kc)
|
||||||
#define ALGR_T(kc) MT(MOD_RALT, kc) // dual-function AltGR
|
#define ALGR_T(kc) RALT_T(kc)
|
||||||
|
|
||||||
#define GUI_T(kc) MT(MOD_LGUI, kc)
|
#define GUI_T(kc) MT(MOD_LGUI, kc)
|
||||||
#define CMD_T(kc) GUI_T(kc)
|
#define CMD_T(kc) GUI_T(kc)
|
||||||
|
|||||||
@@ -140,6 +140,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define KC_LWIN KC_LGUI
|
#define KC_LWIN KC_LGUI
|
||||||
#define KC_RCTL KC_RCTRL
|
#define KC_RCTL KC_RCTRL
|
||||||
#define KC_RSFT KC_RSHIFT
|
#define KC_RSFT KC_RSHIFT
|
||||||
|
#define KC_ALGR KC_RALT
|
||||||
#define KC_RCMD KC_RGUI
|
#define KC_RCMD KC_RGUI
|
||||||
#define KC_RWIN KC_RGUI
|
#define KC_RWIN KC_RGUI
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
#include "d51_util.h"
|
#include "d51_util.h"
|
||||||
|
|
||||||
//Display unsigned 32-bit number through m15
|
static volatile uint32_t w;
|
||||||
//Read as follows: 1230 = || ||| |||| | (note always ending toggle)
|
|
||||||
void m15_print(uint32_t x)
|
//Display unsigned 32-bit number by port toggling DBG_1 (to view on a scope)
|
||||||
|
//Read as follows: 1230 = | | | | | | || (note zero is fast double toggle)
|
||||||
|
#define DBG_PAUSE 5
|
||||||
|
void dbg_print(uint32_t x)
|
||||||
{
|
{
|
||||||
int8_t t;
|
int8_t t;
|
||||||
uint32_t n;
|
uint32_t n;
|
||||||
@@ -26,24 +29,34 @@ void m15_print(uint32_t x)
|
|||||||
while (p2--) p *= 10;
|
while (p2--) p *= 10;
|
||||||
n = x / p;
|
n = x / p;
|
||||||
x -= n * p;
|
x -= n * p;
|
||||||
while (n > 0)
|
if (!n)
|
||||||
{
|
{
|
||||||
m15_on;
|
DBG_1_ON;
|
||||||
|
DBG_1_OFF;
|
||||||
|
DBG_1_ON;
|
||||||
|
DBG_1_OFF;
|
||||||
n--;
|
n--;
|
||||||
m15_off;
|
|
||||||
}
|
}
|
||||||
//Will always end with an extra toggle
|
else
|
||||||
m15_on;
|
{
|
||||||
|
while (n > 0)
|
||||||
|
{
|
||||||
|
DBG_1_ON;
|
||||||
|
DBG_1_OFF;
|
||||||
|
n--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
t--;
|
t--;
|
||||||
m15_off;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (w = DBG_PAUSE; w; w--); //Long pause after number is complete
|
||||||
}
|
}
|
||||||
|
|
||||||
//Display unsigned 32-bit number through debug led
|
//Display unsigned 32-bit number through debug led
|
||||||
//Read as follows: 1230 = [*] [* *] [* * *] [**] (note zero is fast double flash)
|
//Read as follows: 1230 = [*] [* *] [* * *] [**] (note zero is fast double flash)
|
||||||
#define DLED_ONTIME 1000000
|
#define DLED_ONTIME 1000000
|
||||||
#define DLED_PAUSE 1500000
|
#define DLED_PAUSE 1500000
|
||||||
volatile uint32_t w;
|
|
||||||
void dled_print(uint32_t x, uint8_t long_pause)
|
void dled_print(uint32_t x, uint8_t long_pause)
|
||||||
{
|
{
|
||||||
int8_t t;
|
int8_t t;
|
||||||
@@ -70,13 +83,13 @@ void dled_print(uint32_t x, uint8_t long_pause)
|
|||||||
x -= n * p;
|
x -= n * p;
|
||||||
if (!n)
|
if (!n)
|
||||||
{
|
{
|
||||||
led_on;
|
DBG_LED_ON;
|
||||||
for (w = DLED_ONTIME / 4; w; w--);
|
for (w = DLED_ONTIME / 4; w; w--);
|
||||||
led_off;
|
DBG_LED_OFF;
|
||||||
for (w = DLED_ONTIME / 4; w; w--);
|
for (w = DLED_ONTIME / 4; w; w--);
|
||||||
led_on;
|
DBG_LED_ON;
|
||||||
for (w = DLED_ONTIME / 4; w; w--);
|
for (w = DLED_ONTIME / 4; w; w--);
|
||||||
led_off;
|
DBG_LED_OFF;
|
||||||
for (w = DLED_ONTIME / 4; w; w--);
|
for (w = DLED_ONTIME / 4; w; w--);
|
||||||
n--;
|
n--;
|
||||||
}
|
}
|
||||||
@@ -84,9 +97,9 @@ void dled_print(uint32_t x, uint8_t long_pause)
|
|||||||
{
|
{
|
||||||
while (n > 0)
|
while (n > 0)
|
||||||
{
|
{
|
||||||
led_on;
|
DBG_LED_ON;
|
||||||
for (w = DLED_ONTIME; w; w--);
|
for (w = DLED_ONTIME; w; w--);
|
||||||
led_off;
|
DBG_LED_OFF;
|
||||||
for (w = DLED_ONTIME / 2; w; w--);
|
for (w = DLED_ONTIME / 2; w; w--);
|
||||||
n--;
|
n--;
|
||||||
}
|
}
|
||||||
@@ -102,11 +115,52 @@ void dled_print(uint32_t x, uint8_t long_pause)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_BOOT_TRACING
|
#ifdef DEBUG_BOOT_TRACING_ENABLE
|
||||||
|
|
||||||
volatile uint32_t debug_code;
|
volatile uint32_t debug_code;
|
||||||
|
|
||||||
void EIC_15_Handler()
|
//These macros are for compile time substitution
|
||||||
|
#define DEBUG_BOOT_TRACING_EXTINTn (DEBUG_BOOT_TRACING_PIN % _U_(0x10))
|
||||||
|
#define DEBUG_BOOT_TRACING_EXTINTb (_U_(0x1) << DEBUG_BOOT_TRACING_EXTINTn)
|
||||||
|
#define DEBUG_BOOT_TRACING_CONFIG_INDn (DEBUG_BOOT_TRACING_EXTINTn / _U_(0x8))
|
||||||
|
#define DEBUG_BOOT_TRACING_CONFIG_SENSEn (DEBUG_BOOT_TRACING_EXTINTn % _U_(0x8))
|
||||||
|
#define DEBUG_BOOT_TRACING_CONFIG_SENSEb (DEBUG_BOOT_TRACING_CONFIG_SENSEn * _U_(0x4))
|
||||||
|
#define DEBUG_BOOT_TRACING_IRQn (EIC_0_IRQn + DEBUG_BOOT_TRACING_EXTINTn)
|
||||||
|
|
||||||
|
//These macros perform PORT+PIN definition translation to IRQn in the preprocessor
|
||||||
|
#define PORTPIN_TO_IRQn_EXPAND(def) def
|
||||||
|
#define PORTPIN_TO_IRQn_DEF(def) PORTPIN_TO_IRQn_EXPAND(def)
|
||||||
|
#if DEBUG_BOOT_TRACING_PIN < 10
|
||||||
|
#define PORTPIN_TO_IRQn_TODEF(port, pin) PORTPIN_TO_IRQn_DEF(PIN_ ## port ## 0 ## pin ## A_EIC_EXTINT_NUM)
|
||||||
|
#else
|
||||||
|
#define PORTPIN_TO_IRQn_TODEF(port, pin) PORTPIN_TO_IRQn_DEF(PIN_ ## port ## pin ## A_EIC_EXTINT_NUM)
|
||||||
|
#endif
|
||||||
|
#define PORTPIN_TO_IRQn(port, pin) PORTPIN_TO_IRQn_TODEF(port, pin)
|
||||||
|
|
||||||
|
//These macros perform function name output in the preprocessor
|
||||||
|
#define DEBUG_BOOT_TRACING_HANDLER_CONCAT(irq) void EIC_ ## irq ## _Handler(void)
|
||||||
|
#define DEBUG_BOOT_TRACING_HANDLER(irq) DEBUG_BOOT_TRACING_HANDLER_CONCAT(irq)
|
||||||
|
|
||||||
|
//To generate the function name of the IRQ handler catching boot tracing,
|
||||||
|
// certain macros must be undefined, so save their current values to macro stack
|
||||||
|
#pragma push_macro("PA")
|
||||||
|
#pragma push_macro("PB")
|
||||||
|
#pragma push_macro("_L_")
|
||||||
|
|
||||||
|
//Undefine / redefine pushed macros
|
||||||
|
#undef PA
|
||||||
|
#undef PB
|
||||||
|
#undef _L_
|
||||||
|
#define _L_(x) x
|
||||||
|
|
||||||
|
//Perform the work and output
|
||||||
|
//Ex: PORT PB, PIN 31 = void EIC_15_Handler(void)
|
||||||
|
DEBUG_BOOT_TRACING_HANDLER(PORTPIN_TO_IRQn(DEBUG_BOOT_TRACING_PORT, DEBUG_BOOT_TRACING_PIN))
|
||||||
|
|
||||||
|
//Restore macros
|
||||||
|
#pragma pop_macro("PA")
|
||||||
|
#pragma pop_macro("PB")
|
||||||
|
#pragma pop_macro("_L_")
|
||||||
{
|
{
|
||||||
//This is only for non-functional keyboard troubleshooting and should be disabled after boot
|
//This is only for non-functional keyboard troubleshooting and should be disabled after boot
|
||||||
//Intention is to lock up the keyboard here with repeating debug led code
|
//Intention is to lock up the keyboard here with repeating debug led code
|
||||||
@@ -120,13 +174,13 @@ void debug_code_init(void)
|
|||||||
{
|
{
|
||||||
DBGC(DC_UNSET);
|
DBGC(DC_UNSET);
|
||||||
|
|
||||||
//Configure Ports for EIC on PB31
|
//Configure Ports for EIC
|
||||||
PORT->Group[1].DIRCLR.reg = 1 << 31; //Input
|
PORT->Group[DEBUG_BOOT_TRACING_PORT].DIRCLR.reg = 1 << DEBUG_BOOT_TRACING_PIN; //Input
|
||||||
PORT->Group[1].OUTSET.reg = 1 << 31; //High
|
PORT->Group[DEBUG_BOOT_TRACING_PORT].OUTSET.reg = 1 << DEBUG_BOOT_TRACING_PIN; //High
|
||||||
PORT->Group[1].PINCFG[31].bit.INEN = 1; //Input Enable
|
PORT->Group[DEBUG_BOOT_TRACING_PORT].PINCFG[DEBUG_BOOT_TRACING_PIN].bit.INEN = 1; //Input Enable
|
||||||
PORT->Group[1].PINCFG[31].bit.PULLEN = 1; //Pull Enable
|
PORT->Group[DEBUG_BOOT_TRACING_PORT].PINCFG[DEBUG_BOOT_TRACING_PIN].bit.PULLEN = 1; //Pull Enable
|
||||||
PORT->Group[1].PINCFG[31].bit.PMUXEN = 1; //Mux Enable
|
PORT->Group[DEBUG_BOOT_TRACING_PORT].PINCFG[DEBUG_BOOT_TRACING_PIN].bit.PMUXEN = 1; //Mux Enable
|
||||||
PORT->Group[1].PMUX[15].bit.PMUXO = 0; //Mux A
|
PORT->Group[DEBUG_BOOT_TRACING_PORT].PMUX[DEBUG_BOOT_TRACING_PIN / 2].bit.PMUXO = 0; //Mux A
|
||||||
|
|
||||||
//Enable CLK_EIC_APB
|
//Enable CLK_EIC_APB
|
||||||
MCLK->APBAMASK.bit.EIC_ = 1;
|
MCLK->APBAMASK.bit.EIC_ = 1;
|
||||||
@@ -134,25 +188,33 @@ void debug_code_init(void)
|
|||||||
//Configure EIC
|
//Configure EIC
|
||||||
EIC->CTRLA.bit.SWRST = 1;
|
EIC->CTRLA.bit.SWRST = 1;
|
||||||
while (EIC->SYNCBUSY.bit.SWRST) {}
|
while (EIC->SYNCBUSY.bit.SWRST) {}
|
||||||
EIC->ASYNCH.reg = 1 << 15;
|
EIC->ASYNCH.reg = DEBUG_BOOT_TRACING_EXTINTb;
|
||||||
EIC->INTENSET.reg = 1 << 15;
|
EIC->INTENSET.reg = DEBUG_BOOT_TRACING_EXTINTb;
|
||||||
EIC->CONFIG[1].bit.SENSE7 = 2;
|
EIC->CONFIG[DEBUG_BOOT_TRACING_CONFIG_INDn].reg |= (EIC_CONFIG_SENSE0_FALL_Val << DEBUG_BOOT_TRACING_CONFIG_SENSEb);
|
||||||
EIC->CTRLA.bit.ENABLE = 1;
|
EIC->CTRLA.bit.ENABLE = 1;
|
||||||
while (EIC->SYNCBUSY.bit.ENABLE) {}
|
while (EIC->SYNCBUSY.bit.ENABLE) {}
|
||||||
|
|
||||||
//Enable EIC IRQ
|
//Enable EIC IRQ
|
||||||
NVIC_EnableIRQ(EIC_15_IRQn);
|
NVIC_EnableIRQ(DEBUG_BOOT_TRACING_IRQn);
|
||||||
}
|
}
|
||||||
|
|
||||||
void debug_code_disable(void)
|
void debug_code_disable(void)
|
||||||
{
|
{
|
||||||
//Disable EIC IRQ
|
//Disable EIC IRQ
|
||||||
NVIC_DisableIRQ(EIC_15_IRQn);
|
NVIC_DisableIRQ(DEBUG_BOOT_TRACING_IRQn);
|
||||||
|
|
||||||
//Disable EIC
|
//Disable EIC
|
||||||
EIC->CTRLA.bit.ENABLE = 0;
|
EIC->CTRLA.bit.ENABLE = 0;
|
||||||
while (EIC->SYNCBUSY.bit.ENABLE) {}
|
while (EIC->SYNCBUSY.bit.ENABLE) {}
|
||||||
|
|
||||||
|
//Default port configuration
|
||||||
|
PORT->Group[DEBUG_BOOT_TRACING_PORT].DIRCLR.reg = 1 << DEBUG_BOOT_TRACING_PIN; //Input
|
||||||
|
PORT->Group[DEBUG_BOOT_TRACING_PORT].OUTCLR.reg = 1 << DEBUG_BOOT_TRACING_PIN; //Low
|
||||||
|
PORT->Group[DEBUG_BOOT_TRACING_PORT].PINCFG[DEBUG_BOOT_TRACING_PIN].bit.INEN = 0; //Input Disable
|
||||||
|
PORT->Group[DEBUG_BOOT_TRACING_PORT].PINCFG[DEBUG_BOOT_TRACING_PIN].bit.PULLEN = 0; //Pull Disable
|
||||||
|
PORT->Group[DEBUG_BOOT_TRACING_PORT].PINCFG[DEBUG_BOOT_TRACING_PIN].bit.PMUXEN = 0; //Mux Disable
|
||||||
|
PORT->Group[DEBUG_BOOT_TRACING_PORT].PMUX[DEBUG_BOOT_TRACING_PIN / 2].bit.PMUXO = 0; //Mux A
|
||||||
|
|
||||||
//Disable CLK_EIC_APB
|
//Disable CLK_EIC_APB
|
||||||
MCLK->APBAMASK.bit.EIC_ = 0;
|
MCLK->APBAMASK.bit.EIC_ = 0;
|
||||||
}
|
}
|
||||||
@@ -162,4 +224,4 @@ void debug_code_disable(void)
|
|||||||
void debug_code_init(void) {}
|
void debug_code_init(void) {}
|
||||||
void debug_code_disable(void) {}
|
void debug_code_disable(void) {}
|
||||||
|
|
||||||
#endif //DEBUG_BOOT_TRACING
|
#endif //DEBUG_BOOT_TRACING_ENABLE
|
||||||
@@ -20,37 +20,65 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#include "samd51j18a.h"
|
#include "samd51j18a.h"
|
||||||
|
|
||||||
//TODO: PS: Should bring these ports out to keyboard level configuration
|
/* Debug LED */
|
||||||
|
#if DEBUG_LED_ENABLE == 1
|
||||||
|
#define DBG_LED_ENA PORT->Group[DEBUG_LED_PORT].DIRSET.reg = (1 << DEBUG_LED_PIN)
|
||||||
|
#define DBG_LED_DIS PORT->Group[DEBUG_LED_PORT].DIRCLR.reg = (1 << DEBUG_LED_PIN)
|
||||||
|
#define DBG_LED_ON PORT->Group[DEBUG_LED_PORT].OUTSET.reg = (1 << DEBUG_LED_PIN)
|
||||||
|
#define DBG_LED_OFF PORT->Group[DEBUG_LED_PORT].OUTCLR.reg = (1 << DEBUG_LED_PIN)
|
||||||
|
#else
|
||||||
|
#define DBG_LED_ENA
|
||||||
|
#define DBG_LED_DIS
|
||||||
|
#define DBG_LED_ON
|
||||||
|
#define DBG_LED_OFF
|
||||||
|
#endif
|
||||||
|
|
||||||
//Debug LED PA27
|
/* Debug Port 1 */
|
||||||
#define led_ena REG_PORT_DIRSET0 = 0x08000000 //PA27 Output
|
#if DEBUG_PORT1_ENABLE == 1
|
||||||
#define led_on REG_PORT_OUTSET0 = 0x08000000 //PA27 High
|
#define DBG_1_ENA PORT->Group[DEBUG_PORT1_PORT].DIRSET.reg = (1 << DEBUG_PORT1_PIN)
|
||||||
#define led_off REG_PORT_OUTCLR0 = 0x08000000 //PA27 Low
|
#define DBG_1_DIS PORT->Group[DEBUG_PORT1_PORT].DIRCLR.reg = (1 << DEBUG_PORT1_PIN)
|
||||||
|
#define DBG_1_ON PORT->Group[DEBUG_PORT1_PORT].OUTSET.reg = (1 << DEBUG_PORT1_PIN)
|
||||||
|
#define DBG_1_OFF PORT->Group[DEBUG_PORT1_PORT].OUTCLR.reg = (1 << DEBUG_PORT1_PIN)
|
||||||
|
#else
|
||||||
|
#define DBG_1_ENA
|
||||||
|
#define DBG_1_DIS
|
||||||
|
#define DBG_1_ON
|
||||||
|
#define DBG_1_OFF
|
||||||
|
#endif
|
||||||
|
|
||||||
//Debug Port PB30
|
/* Debug Port 2 */
|
||||||
#define m15_ena REG_PORT_DIRSET1 = 0x40000000 //PB30 Output
|
#if DEBUG_PORT2_ENABLE == 1
|
||||||
#define m15_on REG_PORT_OUTSET1 = 0x40000000 //PB30 High
|
#define DBG_2_ENA PORT->Group[DEBUG_PORT2_PORT].DIRSET.reg = (1 << DEBUG_PORT2_PIN)
|
||||||
#define m15_off REG_PORT_OUTCLR1 = 0x40000000 //PB30 Low
|
#define DBG_2_DIS PORT->Group[DEBUG_PORT2_PORT].DIRCLR.reg = (1 << DEBUG_PORT2_PIN)
|
||||||
|
#define DBG_2_ON PORT->Group[DEBUG_PORT2_PORT].OUTSET.reg = (1 << DEBUG_PORT2_PIN)
|
||||||
|
#define DBG_2_OFF PORT->Group[DEBUG_PORT2_PORT].OUTCLR.reg = (1 << DEBUG_PORT2_PIN)
|
||||||
|
#else
|
||||||
|
#define DBG_2_ENA
|
||||||
|
#define DBG_2_DIS
|
||||||
|
#define DBG_2_ON
|
||||||
|
#define DBG_2_OFF
|
||||||
|
#endif
|
||||||
|
|
||||||
//Debug Port PB23
|
/* Debug Port 3 */
|
||||||
#define m27_ena REG_PORT_DIRSET1 = 0x800000 //PB23 Output
|
#if DEBUG_PORT3_ENABLE == 1
|
||||||
#define m27_on REG_PORT_OUTSET1 = 0x800000 //PB23 High
|
#define DBG_3_ENA PORT->Group[DEBUG_PORT3_PORT].DIRSET.reg = (1 << DEBUG_PORT3_PIN)
|
||||||
#define m27_off REG_PORT_OUTCLR1 = 0x800000 //PB23 Low
|
#define DBG_3_DIS PORT->Group[DEBUG_PORT3_PORT].DIRCLR.reg = (1 << DEBUG_PORT3_PIN)
|
||||||
|
#define DBG_3_ON PORT->Group[DEBUG_PORT3_PORT].OUTSET.reg = (1 << DEBUG_PORT3_PIN)
|
||||||
|
#define DBG_3_OFF PORT->Group[DEBUG_PORT3_PORT].OUTCLR.reg = (1 << DEBUG_PORT3_PIN)
|
||||||
|
#else
|
||||||
|
#define DBG_3_ENA
|
||||||
|
#define DBG_3_DIS
|
||||||
|
#define DBG_3_ON
|
||||||
|
#define DBG_3_OFF
|
||||||
|
#endif
|
||||||
|
|
||||||
//Debug Port PB31
|
void dbg_print(uint32_t x);
|
||||||
#define m28_ena REG_PORT_DIRSET1 = 0x80000000 //PB31 Output
|
|
||||||
#define m28_on REG_PORT_OUTSET1 = 0x80000000 //PB31 High
|
|
||||||
#define m28_off REG_PORT_OUTCLR1 = 0x80000000 //PB31 Low
|
|
||||||
|
|
||||||
#define m15_loop(M15X) {uint8_t M15L=M15X; while(M15L--){m15_on;CLK_delay_us(1);m15_off;}}
|
|
||||||
|
|
||||||
void m15_print(uint32_t x);
|
|
||||||
void dled_print(uint32_t x, uint8_t long_pause);
|
void dled_print(uint32_t x, uint8_t long_pause);
|
||||||
|
|
||||||
void debug_code_init(void);
|
void debug_code_init(void);
|
||||||
void debug_code_disable(void);
|
void debug_code_disable(void);
|
||||||
|
|
||||||
#ifdef DEBUG_BOOT_TRACING
|
#ifdef DEBUG_BOOT_TRACING_ENABLE
|
||||||
|
|
||||||
#define DBGC(n) debug_code = n
|
#define DBGC(n) debug_code = n
|
||||||
|
|
||||||
@@ -190,6 +218,6 @@ enum debug_code_list {
|
|||||||
|
|
||||||
#define DBGC(n) {}
|
#define DBGC(n) {}
|
||||||
|
|
||||||
#endif //DEBUG_BOOT_TRACING
|
#endif //DEBUG_BOOT_TRACING_ENABLE
|
||||||
|
|
||||||
#endif //_D51_UTIL_H_
|
#endif //_D51_UTIL_H_
|
||||||
@@ -267,8 +267,8 @@ uint8_t I2C3733_Init_Control(void)
|
|||||||
|
|
||||||
CLK_delay_ms(1);
|
CLK_delay_ms(1);
|
||||||
|
|
||||||
srdata.bit.IRST = 0;
|
sr_exp_data.bit.IRST = 0;
|
||||||
SPI_WriteSRData();
|
SR_EXP_WriteData();
|
||||||
|
|
||||||
CLK_delay_ms(1);
|
CLK_delay_ms(1);
|
||||||
|
|
||||||
@@ -357,8 +357,8 @@ void I2C3733_Control_Set(uint8_t state)
|
|||||||
{
|
{
|
||||||
DBGC(DC_I2C3733_CONTROL_SET_BEGIN);
|
DBGC(DC_I2C3733_CONTROL_SET_BEGIN);
|
||||||
|
|
||||||
srdata.bit.SDB_N = (state == 1 ? 1 : 0);
|
sr_exp_data.bit.SDB_N = (state == 1 ? 1 : 0);
|
||||||
SPI_WriteSRData();
|
SR_EXP_WriteData();
|
||||||
|
|
||||||
DBGC(DC_I2C3733_CONTROL_SET_COMPLETE);
|
DBGC(DC_I2C3733_CONTROL_SET_COMPLETE);
|
||||||
}
|
}
|
||||||
@@ -489,7 +489,7 @@ uint8_t i2c_led_q_request_room(uint8_t request_size)
|
|||||||
|
|
||||||
if (i2c_led_q_full >= 100) //Give the queue a chance to clear up
|
if (i2c_led_q_full >= 100) //Give the queue a chance to clear up
|
||||||
{
|
{
|
||||||
led_on;
|
DBG_LED_ON;
|
||||||
I2C_DMAC_LED_Init();
|
I2C_DMAC_LED_Init();
|
||||||
i2c_led_q_init();
|
i2c_led_q_init();
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@@ -520,9 +520,9 @@ void led_matrix_task(void)
|
|||||||
//Process more data if not finished
|
//Process more data if not finished
|
||||||
if (led_cur != lede)
|
if (led_cur != lede)
|
||||||
{
|
{
|
||||||
//m15_off; //debug profiling
|
//DBG_1_OFF; //debug profiling
|
||||||
led_matrix_run();
|
led_matrix_run();
|
||||||
//m15_on; //debug profiling
|
//DBG_1_ON; //debug profiling
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -247,8 +247,13 @@ void main_subtasks(void)
|
|||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
led_ena;
|
DBG_LED_ENA;
|
||||||
m15_ena;
|
DBG_1_ENA;
|
||||||
|
DBG_1_OFF;
|
||||||
|
DBG_2_ENA;
|
||||||
|
DBG_2_OFF;
|
||||||
|
DBG_3_ENA;
|
||||||
|
DBG_3_OFF;
|
||||||
|
|
||||||
debug_code_init();
|
debug_code_init();
|
||||||
|
|
||||||
@@ -256,7 +261,7 @@ int main(void)
|
|||||||
|
|
||||||
ADC0_init();
|
ADC0_init();
|
||||||
|
|
||||||
SPI_Init();
|
SR_EXP_Init();
|
||||||
|
|
||||||
i2c1_init();
|
i2c1_init();
|
||||||
|
|
||||||
@@ -274,8 +279,7 @@ int main(void)
|
|||||||
|
|
||||||
while (USB2422_Port_Detect_Init() == 0) {}
|
while (USB2422_Port_Detect_Init() == 0) {}
|
||||||
|
|
||||||
led_off;
|
DBG_LED_OFF;
|
||||||
m15_off;
|
|
||||||
|
|
||||||
led_matrix_init();
|
led_matrix_init();
|
||||||
|
|
||||||
|
|||||||
@@ -17,73 +17,70 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#include "arm_atsam_protocol.h"
|
#include "arm_atsam_protocol.h"
|
||||||
|
|
||||||
Srdata_t srdata;
|
sr_exp_t sr_exp_data;
|
||||||
|
|
||||||
void SPI_WriteSRData(void)
|
void SR_EXP_WriteData(void)
|
||||||
{
|
{
|
||||||
uint16_t timeout;
|
SR_EXP_RCLK_LO;
|
||||||
|
|
||||||
SC2_RCLCK_LO;
|
while (!(SR_EXP_SERCOM->SPI.INTFLAG.bit.DRE)) { DBGC(DC_SPI_WRITE_DRE); }
|
||||||
|
|
||||||
timeout = 50000;
|
SR_EXP_SERCOM->SPI.DATA.bit.DATA = sr_exp_data.reg & 0xFF; //Shift in bits 7-0
|
||||||
while (!(SCSPI->SPI.INTFLAG.bit.DRE) && --timeout) { DBGC(DC_SPI_WRITE_DRE); }
|
while (!(SR_EXP_SERCOM->SPI.INTFLAG.bit.TXC)) { DBGC(DC_SPI_WRITE_TXC_1); }
|
||||||
|
|
||||||
SCSPI->SPI.DATA.bit.DATA = srdata.reg & 0xFF; //Shift in bits 7-0
|
SR_EXP_SERCOM->SPI.DATA.bit.DATA = (sr_exp_data.reg >> 8) & 0xFF; //Shift in bits 15-8
|
||||||
timeout = 50000;
|
while (!(SR_EXP_SERCOM->SPI.INTFLAG.bit.TXC)) { DBGC(DC_SPI_WRITE_TXC_2); }
|
||||||
while (!(SCSPI->SPI.INTFLAG.bit.TXC) && --timeout) { DBGC(DC_SPI_WRITE_TXC_1); }
|
|
||||||
|
|
||||||
SCSPI->SPI.DATA.bit.DATA = (srdata.reg >> 8) & 0xFF; //Shift in bits 15-8
|
SR_EXP_RCLK_HI;
|
||||||
timeout = 50000;
|
|
||||||
while (!(SCSPI->SPI.INTFLAG.bit.TXC) && --timeout) { DBGC(DC_SPI_WRITE_TXC_2); }
|
|
||||||
|
|
||||||
SC2_RCLCK_HI;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SPI_Init(void)
|
void SR_EXP_Init(void)
|
||||||
{
|
{
|
||||||
uint32_t timeout;
|
|
||||||
|
|
||||||
DBGC(DC_SPI_INIT_BEGIN);
|
DBGC(DC_SPI_INIT_BEGIN);
|
||||||
|
|
||||||
CLK_set_spi_freq(CHAN_SERCOM_SPI, FREQ_SPI_DEFAULT);
|
CLK_set_spi_freq(CHAN_SERCOM_SPI, FREQ_SPI_DEFAULT);
|
||||||
|
|
||||||
PORT->Group[0].PMUX[6].bit.PMUXE = 2;
|
//Set up MCU Shift Register pins
|
||||||
PORT->Group[0].PMUX[6].bit.PMUXO = 2;
|
PORT->Group[SR_EXP_RCLK_PORT].DIRSET.reg = (1 << SR_EXP_RCLK_PIN);
|
||||||
PORT->Group[0].PINCFG[12].bit.PMUXEN = 1;
|
PORT->Group[SR_EXP_OE_N_PORT].DIRSET.reg = (1 << SR_EXP_OE_N_PIN);
|
||||||
PORT->Group[0].PINCFG[13].bit.PMUXEN = 1;
|
|
||||||
|
//Set up MCU SPI pins
|
||||||
|
PORT->Group[SR_EXP_DATAOUT_PORT].PMUX[SR_EXP_DATAOUT_PIN / 2].bit.SR_EXP_DATAOUT_MUX_SEL = SR_EXP_DATAOUT_MUX; //MUX select for sercom
|
||||||
|
PORT->Group[SR_EXP_SCLK_PORT].PMUX[SR_EXP_SCLK_PIN / 2].bit.SR_EXP_SCLK_MUX_SEL = SR_EXP_SCLK_MUX; //MUX select for sercom
|
||||||
|
PORT->Group[SR_EXP_DATAOUT_PORT].PINCFG[SR_EXP_DATAOUT_PIN].bit.PMUXEN = 1; //MUX Enable
|
||||||
|
PORT->Group[SR_EXP_SCLK_PORT].PINCFG[SR_EXP_SCLK_PIN].bit.PMUXEN = 1; //MUX Enable
|
||||||
|
|
||||||
//Configure Shift Registers
|
//Initialize Shift Register
|
||||||
SC2_DIRSET;
|
SR_EXP_OE_N_DIS;
|
||||||
SC2_RCLCK_HI;
|
SR_EXP_RCLK_HI;
|
||||||
SC2_OE_DIS;
|
|
||||||
|
|
||||||
SCSPI->SPI.CTRLA.bit.DORD = 1;
|
SR_EXP_SERCOM->SPI.CTRLA.bit.DORD = 1; //Data Order - LSB is transferred first
|
||||||
SCSPI->SPI.CTRLA.bit.CPOL = 1;
|
SR_EXP_SERCOM->SPI.CTRLA.bit.CPOL = 1; //Clock Polarity - SCK high when idle. Leading edge of cycle is falling. Trailing rising.
|
||||||
SCSPI->SPI.CTRLA.bit.CPHA = 1;
|
SR_EXP_SERCOM->SPI.CTRLA.bit.CPHA = 1; //Clock Phase - Leading Edge Falling, change, Trailing Edge - Rising, sample
|
||||||
SCSPI->SPI.CTRLA.bit.DIPO = 3;
|
SR_EXP_SERCOM->SPI.CTRLA.bit.DIPO = 3; //Data In Pinout - SERCOM PAD[3] is used as data input (Configure away from DOPO. Not using input.)
|
||||||
SCSPI->SPI.CTRLA.bit.MODE = 3; //master
|
SR_EXP_SERCOM->SPI.CTRLA.bit.DOPO = 0; //Data Output PAD[0], Serial Clock PAD[1]
|
||||||
|
SR_EXP_SERCOM->SPI.CTRLA.bit.MODE = 3; //Operating Mode - Master operation
|
||||||
|
|
||||||
SCSPI->SPI.CTRLA.bit.ENABLE = 1;
|
SR_EXP_SERCOM->SPI.CTRLA.bit.ENABLE = 1; //Enable - Peripheral is enabled or being enabled
|
||||||
timeout = 50000;
|
while (SR_EXP_SERCOM->SPI.SYNCBUSY.bit.ENABLE) { DBGC(DC_SPI_SYNC_ENABLING); }
|
||||||
while (SCSPI->SPI.SYNCBUSY.bit.ENABLE && timeout--) { DBGC(DC_SPI_SYNC_ENABLING); }
|
|
||||||
|
|
||||||
srdata.reg = 0;
|
sr_exp_data.reg = 0;
|
||||||
srdata.bit.HUB_CONNECT = 0;
|
sr_exp_data.bit.HUB_CONNECT = 0;
|
||||||
srdata.bit.HUB_RESET_N = 0;
|
sr_exp_data.bit.HUB_RESET_N = 0;
|
||||||
srdata.bit.S_UP = 0;
|
sr_exp_data.bit.S_UP = 0;
|
||||||
srdata.bit.E_UP_N = 1;
|
sr_exp_data.bit.E_UP_N = 1;
|
||||||
srdata.bit.S_DN1 = 1;
|
sr_exp_data.bit.S_DN1 = 1;
|
||||||
srdata.bit.E_DN1_N = 1;
|
sr_exp_data.bit.E_DN1_N = 1;
|
||||||
srdata.bit.E_VBUS_1 = 0;
|
sr_exp_data.bit.E_VBUS_1 = 0;
|
||||||
srdata.bit.E_VBUS_2 = 0;
|
sr_exp_data.bit.E_VBUS_2 = 0;
|
||||||
srdata.bit.SRC_1 = 1;
|
sr_exp_data.bit.SRC_1 = 1;
|
||||||
srdata.bit.SRC_2 = 1;
|
sr_exp_data.bit.SRC_2 = 1;
|
||||||
srdata.bit.IRST = 1;
|
sr_exp_data.bit.IRST = 1;
|
||||||
srdata.bit.SDB_N = 0;
|
sr_exp_data.bit.SDB_N = 0;
|
||||||
SPI_WriteSRData();
|
SR_EXP_WriteData();
|
||||||
|
|
||||||
//Enable register output
|
//Enable Shift Register output
|
||||||
SC2_OE_ENA;
|
SR_EXP_OE_N_ENA;
|
||||||
|
|
||||||
DBGC(DC_SPI_INIT_COMPLETE);
|
DBGC(DC_SPI_INIT_COMPLETE);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,21 +18,28 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#ifndef _SPI_H_
|
#ifndef _SPI_H_
|
||||||
#define _SPI_H_
|
#define _SPI_H_
|
||||||
|
|
||||||
//TODO: PS: Should bring ports to keyboard configuration
|
/* Macros for Shift Register control */
|
||||||
|
#define SR_EXP_RCLK_LO PORT->Group[SR_EXP_RCLK_PORT].OUTCLR.reg = (1 << SR_EXP_RCLK_PIN)
|
||||||
|
#define SR_EXP_RCLK_HI PORT->Group[SR_EXP_RCLK_PORT].OUTSET.reg = (1 << SR_EXP_RCLK_PIN)
|
||||||
|
#define SR_EXP_OE_N_ENA PORT->Group[SR_EXP_OE_N_PORT].OUTCLR.reg = (1 << SR_EXP_OE_N_PIN)
|
||||||
|
#define SR_EXP_OE_N_DIS PORT->Group[SR_EXP_OE_N_PORT].OUTSET.reg = (1 << SR_EXP_OE_N_PIN)
|
||||||
|
|
||||||
#define SCSPI SERCOM2
|
/* Determine bits to set for mux selection */
|
||||||
|
#if SR_EXP_DATAOUT_PIN % 2 == 0
|
||||||
|
#define SR_EXP_DATAOUT_MUX_SEL PMUXE
|
||||||
|
#else
|
||||||
|
#define SR_EXP_DATAOUT_MUX_SEL PMUXO
|
||||||
|
#endif
|
||||||
|
|
||||||
#define P14_DIR 0x00004000 /* PIN14 DIR Bit */
|
/* Determine bits to set for mux selection */
|
||||||
#define P14_OUT 0x00004000 /* PIN14 OUT Bit */
|
#if SR_EXP_SCLK_PIN % 2 == 0
|
||||||
#define P15_DIR 0x00008000 /* PIN15 DIR Bit */
|
#define SR_EXP_SCLK_MUX_SEL PMUXE
|
||||||
#define P15_OUT 0x00008000 /* PIN15 OUT Bit */
|
#else
|
||||||
|
#define SR_EXP_SCLK_MUX_SEL PMUXO
|
||||||
#define SC2_RCLCK_LO REG_PORT_OUTCLR1 = P14_OUT /* PB14 Low, SC2_RCLCK Low */
|
#endif
|
||||||
#define SC2_RCLCK_HI REG_PORT_OUTSET1 = P14_OUT /* PB14 High, SC2_RCLCK High */
|
|
||||||
#define SC2_OE_ENA REG_PORT_OUTCLR1 = P15_OUT /* PB15 Low, SC2_OE_N Low (Shift register enabled) */
|
|
||||||
#define SC2_OE_DIS REG_PORT_OUTSET1 = P15_OUT /* PB15 High, SC2_OE_N High (Shift register disabled) */
|
|
||||||
#define SC2_DIRSET REG_PORT_DIRSET1 = P14_DIR | P15_DIR; /* PB14 PB15 OUT */
|
|
||||||
|
|
||||||
|
/* Data structure to define Shift Register output expander hardware */
|
||||||
|
/* This structure gets shifted into registers LSB first */
|
||||||
typedef union {
|
typedef union {
|
||||||
struct {
|
struct {
|
||||||
uint16_t RSVD4:1; /*!< bit: 0 */
|
uint16_t RSVD4:1; /*!< bit: 0 */
|
||||||
@@ -53,11 +60,11 @@ typedef union {
|
|||||||
uint16_t HUB_CONNECT:1; /*!< bit: 15 SIGNAL VBUS CONNECT TO USB HUB WHEN 1 */
|
uint16_t HUB_CONNECT:1; /*!< bit: 15 SIGNAL VBUS CONNECT TO USB HUB WHEN 1 */
|
||||||
} bit; /*!< Structure used for bit access */
|
} bit; /*!< Structure used for bit access */
|
||||||
uint16_t reg; /*!< Type used for register access */
|
uint16_t reg; /*!< Type used for register access */
|
||||||
} Srdata_t;
|
} sr_exp_t;
|
||||||
|
|
||||||
extern Srdata_t srdata;
|
extern sr_exp_t sr_exp_data;
|
||||||
|
|
||||||
void SPI_WriteSRData(void);
|
void SR_EXP_WriteData(void);
|
||||||
void SPI_Init(void);
|
void SR_EXP_Init(void);
|
||||||
|
|
||||||
#endif //_SPI_H_
|
#endif //_SPI_H_
|
||||||
@@ -77,7 +77,6 @@ void USB2422_init(void)
|
|||||||
Port *pport = PORT;
|
Port *pport = PORT;
|
||||||
Oscctrl *posc = OSCCTRL;
|
Oscctrl *posc = OSCCTRL;
|
||||||
Usb *pusb = USB;
|
Usb *pusb = USB;
|
||||||
Srdata_t *pspi = &srdata;
|
|
||||||
|
|
||||||
DBGC(DC_USB2422_INIT_BEGIN);
|
DBGC(DC_USB2422_INIT_BEGIN);
|
||||||
|
|
||||||
@@ -132,9 +131,9 @@ void USB2422_init(void)
|
|||||||
|
|
||||||
i2c0_init(); //IC2 clk must be high at USB2422 reset release time to signal SMB configuration
|
i2c0_init(); //IC2 clk must be high at USB2422 reset release time to signal SMB configuration
|
||||||
|
|
||||||
pspi->bit.HUB_CONNECT = 1; //connect signal
|
sr_exp_data.bit.HUB_CONNECT = 1; //connect signal
|
||||||
pspi->bit.HUB_RESET_N = 1; //reset high
|
sr_exp_data.bit.HUB_RESET_N = 1; //reset high
|
||||||
SPI_WriteSRData();
|
SR_EXP_WriteData();
|
||||||
|
|
||||||
CLK_delay_us(100);
|
CLK_delay_us(100);
|
||||||
|
|
||||||
@@ -150,16 +149,14 @@ void USB2422_init(void)
|
|||||||
|
|
||||||
void USB_reset(void)
|
void USB_reset(void)
|
||||||
{
|
{
|
||||||
Srdata_t *pspi = &srdata;
|
|
||||||
|
|
||||||
DBGC(DC_USB_RESET_BEGIN);
|
DBGC(DC_USB_RESET_BEGIN);
|
||||||
|
|
||||||
//pulse reset for at least 1 usec
|
//pulse reset for at least 1 usec
|
||||||
pspi->bit.HUB_RESET_N = 0; //reset low
|
sr_exp_data.bit.HUB_RESET_N = 0; //reset low
|
||||||
SPI_WriteSRData();
|
SR_EXP_WriteData();
|
||||||
CLK_delay_us(1);
|
CLK_delay_us(1);
|
||||||
pspi->bit.HUB_RESET_N = 1; //reset high to run
|
sr_exp_data.bit.HUB_RESET_N = 1; //reset high to run
|
||||||
SPI_WriteSRData();
|
SR_EXP_WriteData();
|
||||||
CLK_delay_us(1);
|
CLK_delay_us(1);
|
||||||
|
|
||||||
DBGC(DC_USB_RESET_COMPLETE);
|
DBGC(DC_USB_RESET_COMPLETE);
|
||||||
@@ -241,14 +238,14 @@ void USB_set_host_by_voltage(void)
|
|||||||
#ifndef MD_BOOTLOADER
|
#ifndef MD_BOOTLOADER
|
||||||
usb_extra_state = USB_EXTRA_STATE_UNKNOWN;
|
usb_extra_state = USB_EXTRA_STATE_UNKNOWN;
|
||||||
#endif //MD_BOOTLOADER
|
#endif //MD_BOOTLOADER
|
||||||
srdata.bit.SRC_1 = 1; //USBC-1 available for test
|
sr_exp_data.bit.SRC_1 = 1; //USBC-1 available for test
|
||||||
srdata.bit.SRC_2 = 1; //USBC-2 available for test
|
sr_exp_data.bit.SRC_2 = 1; //USBC-2 available for test
|
||||||
srdata.bit.E_UP_N = 1; //HOST disable
|
sr_exp_data.bit.E_UP_N = 1; //HOST disable
|
||||||
srdata.bit.E_DN1_N = 1; //EXTRA disable
|
sr_exp_data.bit.E_DN1_N = 1; //EXTRA disable
|
||||||
srdata.bit.E_VBUS_1 = 0; //USBC-1 disable full power I/O
|
sr_exp_data.bit.E_VBUS_1 = 0; //USBC-1 disable full power I/O
|
||||||
srdata.bit.E_VBUS_2 = 0; //USBC-2 disable full power I/O
|
sr_exp_data.bit.E_VBUS_2 = 0; //USBC-2 disable full power I/O
|
||||||
|
|
||||||
SPI_WriteSRData();
|
SR_EXP_WriteData();
|
||||||
|
|
||||||
CLK_delay_ms(250);
|
CLK_delay_ms(250);
|
||||||
|
|
||||||
@@ -262,37 +259,37 @@ void USB_set_host_by_voltage(void)
|
|||||||
|
|
||||||
if (v_con_1 > v_con_2)
|
if (v_con_1 > v_con_2)
|
||||||
{
|
{
|
||||||
srdata.bit.S_UP = 0; //HOST to USBC-1
|
sr_exp_data.bit.S_UP = 0; //HOST to USBC-1
|
||||||
srdata.bit.S_DN1 = 1; //EXTRA to USBC-2
|
sr_exp_data.bit.S_DN1 = 1; //EXTRA to USBC-2
|
||||||
srdata.bit.SRC_1 = 1; //HOST on USBC-1
|
sr_exp_data.bit.SRC_1 = 1; //HOST on USBC-1
|
||||||
srdata.bit.SRC_2 = 0; //EXTRA available on USBC-2
|
sr_exp_data.bit.SRC_2 = 0; //EXTRA available on USBC-2
|
||||||
|
|
||||||
srdata.bit.E_VBUS_1 = 1; //USBC-1 enable full power I/O
|
sr_exp_data.bit.E_VBUS_1 = 1; //USBC-1 enable full power I/O
|
||||||
srdata.bit.E_VBUS_2 = 0; //USBC-2 disable full power I/O
|
sr_exp_data.bit.E_VBUS_2 = 0; //USBC-2 disable full power I/O
|
||||||
|
|
||||||
SPI_WriteSRData();
|
SR_EXP_WriteData();
|
||||||
|
|
||||||
srdata.bit.E_UP_N = 0; //HOST enable
|
sr_exp_data.bit.E_UP_N = 0; //HOST enable
|
||||||
|
|
||||||
SPI_WriteSRData();
|
SR_EXP_WriteData();
|
||||||
|
|
||||||
usb_host_port = USB_HOST_PORT_1;
|
usb_host_port = USB_HOST_PORT_1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
srdata.bit.S_UP = 1; //EXTRA to USBC-1
|
sr_exp_data.bit.S_UP = 1; //EXTRA to USBC-1
|
||||||
srdata.bit.S_DN1 = 0; //HOST to USBC-2
|
sr_exp_data.bit.S_DN1 = 0; //HOST to USBC-2
|
||||||
srdata.bit.SRC_1 = 0; //EXTRA available on USBC-1
|
sr_exp_data.bit.SRC_1 = 0; //EXTRA available on USBC-1
|
||||||
srdata.bit.SRC_2 = 1; //HOST on USBC-2
|
sr_exp_data.bit.SRC_2 = 1; //HOST on USBC-2
|
||||||
|
|
||||||
srdata.bit.E_VBUS_1 = 0; //USBC-1 disable full power I/O
|
sr_exp_data.bit.E_VBUS_1 = 0; //USBC-1 disable full power I/O
|
||||||
srdata.bit.E_VBUS_2 = 1; //USBC-2 enable full power I/O
|
sr_exp_data.bit.E_VBUS_2 = 1; //USBC-2 enable full power I/O
|
||||||
|
|
||||||
SPI_WriteSRData();
|
SR_EXP_WriteData();
|
||||||
|
|
||||||
srdata.bit.E_UP_N = 0; //HOST enable
|
sr_exp_data.bit.E_UP_N = 0; //HOST enable
|
||||||
|
|
||||||
SPI_WriteSRData();
|
SR_EXP_WriteData();
|
||||||
|
|
||||||
usb_host_port = USB_HOST_PORT_2;
|
usb_host_port = USB_HOST_PORT_2;
|
||||||
}
|
}
|
||||||
@@ -325,15 +322,15 @@ uint8_t USB2422_Port_Detect_Init(void)
|
|||||||
if (v_con_1 > v_con_2) //Values updated from USB_set_host_by_voltage();
|
if (v_con_1 > v_con_2) //Values updated from USB_set_host_by_voltage();
|
||||||
{
|
{
|
||||||
//1 flash for port 1 detected
|
//1 flash for port 1 detected
|
||||||
if (tmod > 500 && tmod < 600) { led_on; }
|
if (tmod > 500 && tmod < 600) { DBG_LED_ON; }
|
||||||
else { led_off; }
|
else { DBG_LED_OFF; }
|
||||||
}
|
}
|
||||||
else if (v_con_2 > v_con_1) //Values updated from USB_set_host_by_voltage();
|
else if (v_con_2 > v_con_1) //Values updated from USB_set_host_by_voltage();
|
||||||
{
|
{
|
||||||
//2 flash for port 2 detected
|
//2 flash for port 2 detected
|
||||||
if (tmod > 500 && tmod < 600) { led_on; }
|
if (tmod > 500 && tmod < 600) { DBG_LED_ON; }
|
||||||
else if (tmod > 700 && tmod < 800) { led_on; }
|
else if (tmod > 700 && tmod < 800) { DBG_LED_ON; }
|
||||||
else { led_off; }
|
else { DBG_LED_OFF; }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CLK_get_ms() > port_detect_retry_ms)
|
if (CLK_get_ms() > port_detect_retry_ms)
|
||||||
@@ -357,12 +354,12 @@ void USB_ExtraSetState(uint8_t state)
|
|||||||
if (state == USB_EXTRA_STATE_DISABLED_UNTIL_REPLUG)
|
if (state == USB_EXTRA_STATE_DISABLED_UNTIL_REPLUG)
|
||||||
state = USB_EXTRA_STATE_DISABLED;
|
state = USB_EXTRA_STATE_DISABLED;
|
||||||
|
|
||||||
if (usb_host_port == USB_HOST_PORT_1) srdata.bit.E_VBUS_2 = state;
|
if (usb_host_port == USB_HOST_PORT_1) sr_exp_data.bit.E_VBUS_2 = state;
|
||||||
else if (usb_host_port == USB_HOST_PORT_2) srdata.bit.E_VBUS_1 = state;
|
else if (usb_host_port == USB_HOST_PORT_2) sr_exp_data.bit.E_VBUS_1 = state;
|
||||||
else return;
|
else return;
|
||||||
|
|
||||||
srdata.bit.E_DN1_N = !state;
|
sr_exp_data.bit.E_DN1_N = !state;
|
||||||
SPI_WriteSRData();
|
SR_EXP_WriteData();
|
||||||
|
|
||||||
usb_extra_state = state_save;
|
usb_extra_state = state_save;
|
||||||
|
|
||||||
|
|||||||
@@ -16,13 +16,13 @@
|
|||||||
#define FORCE_NKRO
|
#define FORCE_NKRO
|
||||||
|
|
||||||
#ifndef TAPPING_TOGGLE
|
#ifndef TAPPING_TOGGLE
|
||||||
#define TAPPING_TOGGLE 1
|
#define TAPPING_TOGGLE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TAPPING_TERM
|
#ifdef TAPPING_TERM
|
||||||
#undef TAPPING_TERM
|
#undef TAPPING_TERM
|
||||||
#endif
|
#endif
|
||||||
#define TAPPING_TERM 120
|
#define TAPPING_TERM 95
|
||||||
|
|
||||||
// Disable action_get_macro and fn_actions, since we don't use these
|
// Disable action_get_macro and fn_actions, since we don't use these
|
||||||
// and it saves on space in the firmware.
|
// and it saves on space in the firmware.
|
||||||
|
|||||||
+24
-3
@@ -17,15 +17,27 @@ qk_tap_dance_action_t tap_dance_actions[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
volatile uint8_t active_layer = _BL;
|
volatile uint8_t active_layer = _BL;
|
||||||
|
volatile uint8_t gm_layer_act = false;
|
||||||
static tap upltap_state = {.state = 0};
|
static tap upltap_state = {.state = 0};
|
||||||
static tap dwltap_state = {.state = 0};
|
static tap dwltap_state = {.state = 0};
|
||||||
static tap lsprtap_state = {.state = 0};
|
static tap lsprtap_state = {.state = 0};
|
||||||
static tap ralttap_state = {.state = 0};
|
static tap ralttap_state = {.state = 0};
|
||||||
|
|
||||||
void layer_switcher_tap(uint8_t new_layer) {
|
void layer_switcher_tap(uint8_t new_layer) {
|
||||||
layer_off(active_layer);
|
if (gm_layer_act == true) {
|
||||||
layer_on(new_layer);
|
layer_off(active_layer);
|
||||||
active_layer = new_layer;
|
if (new_layer == _BL) {
|
||||||
|
layer_on(_GM);
|
||||||
|
active_layer = _GM;
|
||||||
|
} else {
|
||||||
|
layer_on(new_layer);
|
||||||
|
active_layer = new_layer;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
layer_off(active_layer);
|
||||||
|
layer_on(new_layer);
|
||||||
|
active_layer = new_layer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int cur_dance(qk_tap_dance_state_t *state) {
|
int cur_dance(qk_tap_dance_state_t *state) {
|
||||||
@@ -162,6 +174,14 @@ void dance_dwly_finished(qk_tap_dance_state_t *state, void *user_data) {
|
|||||||
case DOUBLE_HOLD:
|
case DOUBLE_HOLD:
|
||||||
layer_switcher_tap(_AL);
|
layer_switcher_tap(_AL);
|
||||||
break;
|
break;
|
||||||
|
case TRIPLE_TAP:
|
||||||
|
if (gm_layer_act == true) {
|
||||||
|
gm_layer_act = false;
|
||||||
|
layer_switcher_tap(_BL);
|
||||||
|
} else {
|
||||||
|
gm_layer_act = true;
|
||||||
|
layer_switcher_tap(_GM);
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
layer_switcher_tap(_BL);
|
layer_switcher_tap(_BL);
|
||||||
break;
|
break;
|
||||||
@@ -174,6 +194,7 @@ void dance_dwly_reset(qk_tap_dance_state_t *state, void *user_data) {
|
|||||||
break;
|
break;
|
||||||
case SINGLE_HOLD:
|
case SINGLE_HOLD:
|
||||||
case DOUBLE_HOLD:
|
case DOUBLE_HOLD:
|
||||||
|
case TRIPLE_TAP:
|
||||||
default:
|
default:
|
||||||
layer_switcher_tap(_BL);
|
layer_switcher_tap(_BL);
|
||||||
break;
|
break;
|
||||||
|
|||||||
+9
-1
@@ -3,16 +3,24 @@
|
|||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
enum custom_keycodes { CK_SAFE = SAFE_RANGE, RGUP, RGDWN, NEWPLACEHOLDER };
|
enum custom_keycodes {
|
||||||
|
CK_SAFE = SAFE_RANGE,
|
||||||
|
RGUP,
|
||||||
|
RGDWN,
|
||||||
|
YREG,
|
||||||
|
NEW_SAFE_RANGE
|
||||||
|
};
|
||||||
|
|
||||||
#define _______ KC_TRNS
|
#define _______ KC_TRNS
|
||||||
#define KC_RGUP RGUP
|
#define KC_RGUP RGUP
|
||||||
#define KC_RGDWN RGDWN
|
#define KC_RGDWN RGDWN
|
||||||
|
#define KC_YREG YREG
|
||||||
|
|
||||||
#define _BL 0 // The base layer
|
#define _BL 0 // The base layer
|
||||||
#define _UL 1 // The up layer
|
#define _UL 1 // The up layer
|
||||||
#define _DL 2 // The down layer
|
#define _DL 2 // The down layer
|
||||||
#define _VL 3 // The shifted up layer
|
#define _VL 3 // The shifted up layer
|
||||||
#define _AL 4 // The assorted layer
|
#define _AL 4 // The assorted layer
|
||||||
|
#define _GM 5
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -14,8 +14,9 @@ source "$dir/win_shared_install.sh"
|
|||||||
function install_avr {
|
function install_avr {
|
||||||
rm -f -r "$avrtools"
|
rm -f -r "$avrtools"
|
||||||
wget "http://ww1.microchip.com/downloads/en/DeviceDoc/avr8-gnu-toolchain-3.6.1.1752-win32.any.x86.zip"
|
wget "http://ww1.microchip.com/downloads/en/DeviceDoc/avr8-gnu-toolchain-3.6.1.1752-win32.any.x86.zip"
|
||||||
7z x avr8-gnu-toolchain-3.6.1.1752-win32.any.x86.zip
|
echo "Extracting AVR toolchain..."
|
||||||
mv avr8-gnu-toolchain-win32_x86/ avr8-gnu-toolchain
|
unzip -q avr8-gnu-toolchain-3.6.1.1752-win32.any.x86.zip
|
||||||
|
mv avr8-gnu-toolchain-win32_x86/ avr8-gnu-toolchain
|
||||||
rm __MACOSX -R
|
rm __MACOSX -R
|
||||||
rm avr8-gnu-toolchain-3.6.1.1752-win32.any.x86.zip
|
rm avr8-gnu-toolchain-3.6.1.1752-win32.any.x86.zip
|
||||||
pacman --needed -S mingw-w64-x86_64-avrdude
|
pacman --needed -S mingw-w64-x86_64-avrdude
|
||||||
|
|||||||
Reference in new issue
Block a user