diff options
122 files changed, 4141 insertions, 688 deletions
@@ -3,16 +3,16 @@ include message.mk | |||
3 | # Directory common source files exist | 3 | # Directory common source files exist |
4 | TOP_DIR = . | 4 | TOP_DIR = . |
5 | TMK_DIR = tmk_core | 5 | TMK_DIR = tmk_core |
6 | TMK_PATH = $(TOP_DIR)/$(TMK_DIR) | 6 | TMK_PATH = $(TMK_DIR) |
7 | LIB_PATH = $(TOP_DIR)/lib | 7 | LIB_PATH = lib |
8 | 8 | ||
9 | QUANTUM_DIR = quantum | 9 | QUANTUM_DIR = quantum |
10 | QUANTUM_PATH = $(TOP_DIR)/$(QUANTUM_DIR) | 10 | QUANTUM_PATH = $(QUANTUM_DIR) |
11 | 11 | ||
12 | DRIVER_DIR = drivers | 12 | DRIVER_DIR = drivers |
13 | DRIVER_PATH = $(TOP_DIR)/$(DRIVER_DIR) | 13 | DRIVER_PATH = $(DRIVER_DIR) |
14 | 14 | ||
15 | BUILD_DIR := $(TOP_DIR)/.build | 15 | BUILD_DIR := .build |
16 | 16 | ||
17 | COMMON_VPATH := $(TOP_DIR) | 17 | COMMON_VPATH := $(TOP_DIR) |
18 | COMMON_VPATH += $(TMK_PATH) | 18 | COMMON_VPATH += $(TMK_PATH) |
@@ -21,4 +21,4 @@ COMMON_VPATH += $(QUANTUM_PATH)/keymap_extras | |||
21 | COMMON_VPATH += $(QUANTUM_PATH)/audio | 21 | COMMON_VPATH += $(QUANTUM_PATH)/audio |
22 | COMMON_VPATH += $(QUANTUM_PATH)/process_keycode | 22 | COMMON_VPATH += $(QUANTUM_PATH)/process_keycode |
23 | COMMON_VPATH += $(QUANTUM_PATH)/api | 23 | COMMON_VPATH += $(QUANTUM_PATH)/api |
24 | COMMON_VPATH += $(DRIVER_PATH) \ No newline at end of file | 24 | COMMON_VPATH += $(DRIVER_PATH) |
diff --git a/keyboards/planck/keymaps/ab/keymap.c b/keyboards/planck/keymaps/ab/keymap.c index 5b37ee0a8..50123f2ee 100644 --- a/keyboards/planck/keymaps/ab/keymap.c +++ b/keyboards/planck/keymaps/ab/keymap.c | |||
@@ -1,4 +1,5 @@ | |||
1 | 1 | ||
2 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
2 | #include "planck.h" | 3 | #include "planck.h" |
3 | #include "action_layer.h" | 4 | #include "action_layer.h" |
4 | #include "eeconfig.h" | 5 | #include "eeconfig.h" |
diff --git a/keyboards/planck/keymaps/ajp10304/keymap.c b/keyboards/planck/keymaps/ajp10304/keymap.c index 10c030733..ebc4e0b97 100644 --- a/keyboards/planck/keymaps/ajp10304/keymap.c +++ b/keyboards/planck/keymaps/ajp10304/keymap.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
1 | #include "planck.h" | 2 | #include "planck.h" |
2 | #include "action_layer.h" | 3 | #include "action_layer.h" |
3 | #include "eeconfig.h" | 4 | #include "eeconfig.h" |
diff --git a/keyboards/planck/keymaps/alexey/keymap.c b/keyboards/planck/keymaps/alexey/keymap.c index f3cdf3d6e..f3ddc8a8a 100644 --- a/keyboards/planck/keymaps/alexey/keymap.c +++ b/keyboards/planck/keymaps/alexey/keymap.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include "keymap.h" | 1 | #include "keymap.h" |
2 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
2 | #include "planck.h" | 3 | #include "planck.h" |
3 | #include "backlight.h" | 4 | #include "backlight.h" |
4 | 5 | ||
diff --git a/keyboards/planck/keymaps/altgr/keymap.c b/keyboards/planck/keymaps/altgr/keymap.c index 516f481fc..c4eacbd47 100644 --- a/keyboards/planck/keymaps/altgr/keymap.c +++ b/keyboards/planck/keymaps/altgr/keymap.c | |||
@@ -67,6 +67,7 @@ | |||
67 | 67 | ||
68 | 68 | ||
69 | #include "config.h" | 69 | #include "config.h" |
70 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
70 | #include "planck.h" | 71 | #include "planck.h" |
71 | #include "action_layer.h" | 72 | #include "action_layer.h" |
72 | #ifdef STENO_ENABLE | 73 | #ifdef STENO_ENABLE |
diff --git a/keyboards/planck/keymaps/andylikescandy/keymap.c b/keyboards/planck/keymaps/andylikescandy/keymap.c index 4e3a0f3a7..f9a773398 100644 --- a/keyboards/planck/keymaps/andylikescandy/keymap.c +++ b/keyboards/planck/keymaps/andylikescandy/keymap.c | |||
@@ -14,6 +14,7 @@ | |||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
17 | #include "planck.h" | 18 | #include "planck.h" |
18 | #include "action_layer.h" | 19 | #include "action_layer.h" |
19 | 20 | ||
diff --git a/keyboards/planck/keymaps/aviator/keymap.c b/keyboards/planck/keymaps/aviator/keymap.c index 889fd7290..faece9438 100644 --- a/keyboards/planck/keymaps/aviator/keymap.c +++ b/keyboards/planck/keymaps/aviator/keymap.c | |||
@@ -4,7 +4,8 @@ | |||
4 | * Designed for aeronautical data entry on the OLKB Planck. | 4 | * Designed for aeronautical data entry on the OLKB Planck. |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include "planck.h" | 7 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" |
8 | #include "planck.h" | ||
8 | #include "action_layer.h" | 9 | #include "action_layer.h" |
9 | 10 | ||
10 | extern keymap_config_t keymap_config; | 11 | extern keymap_config_t keymap_config; |
diff --git a/keyboards/planck/keymaps/basic/keymap.c b/keyboards/planck/keymaps/basic/keymap.c index 36a066e91..f34291323 100644 --- a/keyboards/planck/keymaps/basic/keymap.c +++ b/keyboards/planck/keymaps/basic/keymap.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
1 | #include "planck.h" | 2 | #include "planck.h" |
2 | 3 | ||
3 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | 4 | // Each layer gets a name for readability, which is then used in the keymap matrix below. |
diff --git a/keyboards/planck/keymaps/bbaserdem/keymap.c b/keyboards/planck/keymaps/bbaserdem/keymap.c index 063e9a98e..0f6e4fbc5 100755 --- a/keyboards/planck/keymaps/bbaserdem/keymap.c +++ b/keyboards/planck/keymaps/bbaserdem/keymap.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * Check qmk_firmware/users/bbaserdem for the main part of the code | 6 | * Check qmk_firmware/users/bbaserdem for the main part of the code |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
9 | #include "planck.h" | 10 | #include "planck.h" |
10 | #include "bbaserdem.h" | 11 | #include "bbaserdem.h" |
11 | 12 | ||
diff --git a/keyboards/planck/keymaps/bone2planck/keymap.c b/keyboards/planck/keymaps/bone2planck/keymap.c index 39cb70418..ce862ef9a 100644 --- a/keyboards/planck/keymaps/bone2planck/keymap.c +++ b/keyboards/planck/keymaps/bone2planck/keymap.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include "planck.h" | 1 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" |
2 | #include "planck.h" | ||
2 | #ifdef BACKLIGHT_ENABLE | 3 | #ifdef BACKLIGHT_ENABLE |
3 | #include "backlight.h" | 4 | #include "backlight.h" |
4 | #endif | 5 | #endif |
@@ -36,11 +37,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
36 | * `-----------------------------------------------------------------------------------' | 37 | * `-----------------------------------------------------------------------------------' |
37 | */ | 38 | */ |
38 | [0] = { | 39 | [0] = { |
39 | { DE_SS, DE_J, DE_D, DE_U, DE_A, DE_X, DE_P, DE_H, DE_L, DE_M, DE_W, DE_Q }, | 40 | { DE_SS, DE_J, DE_D, DE_U, DE_A, DE_X, DE_P, DE_H, DE_L, DE_M, DE_W, DE_Q }, |
40 | //{ LT(1,KC_TAB), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) }, | 41 | //{ LT(1,KC_TAB), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) }, |
41 | { MO(1), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) }, | 42 | { MO(1), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) }, |
42 | { KC_LSFT, DE_F, DE_V, DE_UE, DE_AE, DE_OE, DE_Y, DE_Z, DE_COMM, DE_DOT, DE_K, KC_LSFT }, | 43 | { KC_LSFT, DE_F, DE_V, DE_UE, DE_AE, DE_OE, DE_Y, DE_Z, DE_COMM, DE_DOT, DE_K, KC_LSFT }, |
43 | { KC_LCTL, KC_LGUI, KC_LALT, MO(4), MO(2), KC_SPC, KC_SPC, MO(2), MO(4), KC_RALT, KC_ESC, KC_RCTL } | 44 | { KC_LCTL, KC_LGUI, KC_LALT, MO(4), MO(2), KC_SPC, KC_SPC, MO(2), MO(4), KC_RALT, KC_ESC, KC_RCTL } |
44 | }, | 45 | }, |
45 | 46 | ||
46 | /* M1 Special Characters | 47 | /* M1 Special Characters |
@@ -56,10 +57,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
56 | * `-----------------------------------------------------------------------------------' | 57 | * `-----------------------------------------------------------------------------------' |
57 | */ | 58 | */ |
58 | [1] = { | 59 | [1] = { |
59 | { DE_RING, DE_AT, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, DE_ACUT }, | 60 | { DE_RING, DE_AT, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, DE_ACUT }, |
60 | { _______, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, _______ }, | 61 | { _______, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, _______ }, |
61 | { _______, DE_HASH, DE_TILD, DE_PIPE, DE_DLR, DE_EURO, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ }, | 62 | { _______, DE_HASH, DE_TILD, DE_PIPE, DE_DLR, DE_EURO, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ }, |
62 | { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ } | 63 | { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ } |
63 | }, | 64 | }, |
64 | 65 | ||
65 | /* M2 Navigation & Number Blocks | 66 | /* M2 Navigation & Number Blocks |
@@ -75,10 +76,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
75 | * `-----------------------------------------------------------------------------------' | 76 | * `-----------------------------------------------------------------------------------' |
76 | */ | 77 | */ |
77 | [2] = { | 78 | [2] = { |
78 | { XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_INS }, | 79 | { XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_INS }, |
79 | { KC_TAB, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_ENT }, | 80 | { KC_TAB, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_ENT }, |
80 | { _______, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, DE_0, DE_1, DE_2, DE_3, DE_COMM, _______ }, | 81 | { _______, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, DE_0, DE_1, DE_2, DE_3, DE_COMM, _______ }, |
81 | { _______, _______, _______, MO(3), _______, _______, _______, _______, MO(3), _______, _______, _______ } | 82 | { _______, _______, _______, MO(3), _______, _______, _______, _______, MO(3), _______, _______, _______ } |
82 | }, | 83 | }, |
83 | 84 | ||
84 | /* M3 Switched Navigation & Number Blocks for one handed use | 85 | /* M3 Switched Navigation & Number Blocks for one handed use |
@@ -95,10 +96,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
95 | */ | 96 | */ |
96 | 97 | ||
97 | [3] = { | 98 | [3] = { |
98 | { KC_INS, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX }, | 99 | { KC_INS, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX }, |
99 | { _______, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______ }, | 100 | { _______, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______ }, |
100 | { _______, DE_0, DE_1, DE_2, DE_3, DE_COMM, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, _______ }, | 101 | { _______, DE_0, DE_1, DE_2, DE_3, DE_COMM, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, _______ }, |
101 | { _______, _______, _______, _______, XXXXXXX, _______, _______, XXXXXXX, _______, _______, _______, _______ } | 102 | { _______, _______, _______, _______, XXXXXXX, _______, _______, XXXXXXX, _______, _______, _______, _______ } |
102 | }, | 103 | }, |
103 | 104 | ||
104 | 105 | ||
@@ -114,10 +115,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
114 | * `-----------------------------------------------------------------------------------' | 115 | * `-----------------------------------------------------------------------------------' |
115 | */ | 116 | */ |
116 | [4] = { | 117 | [4] = { |
117 | { XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX }, | 118 | { XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX }, |
118 | { KC_TAB, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_ENT }, | 119 | { KC_TAB, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_ENT }, |
119 | { _______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ }, | 120 | { _______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ }, |
120 | { _______, _______, _______, _______, MO(5), _______, _______, MO(5), _______, _______, _______, _______ } | 121 | { _______, _______, _______, _______, MO(5), _______, _______, MO(5), _______, _______, _______, _______ } |
121 | }, | 122 | }, |
122 | 123 | ||
123 | 124 | ||
@@ -134,10 +135,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
134 | * `-----------------------------------------------------------------------------------' | 135 | * `-----------------------------------------------------------------------------------' |
135 | */ | 136 | */ |
136 | [5] = { | 137 | [5] = { |
137 | { XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX }, | 138 | { XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX }, |
138 | { _______, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, _______ }, | 139 | { _______, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, _______ }, |
139 | { _______, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, _______ }, | 140 | { _______, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, _______ }, |
140 | { _______, _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, _______, _______ } | 141 | { _______, _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, _______, _______ } |
141 | } | 142 | } |
142 | }; | 143 | }; |
143 | 144 | ||
@@ -148,19 +149,19 @@ const uint16_t PROGMEM fn_actions[] = { | |||
148 | 149 | ||
149 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | 150 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) |
150 | { | 151 | { |
151 | // MACRODOWN only works in this function | 152 | // MACRODOWN only works in this function |
152 | switch (id) { | 153 | switch (id) { |
153 | case 0: | 154 | case 0: |
154 | if (record->event.pressed) { | 155 | if (record->event.pressed) { |
155 | register_code(KC_RSFT); | 156 | register_code(KC_RSFT); |
156 | #ifdef BACKLIGHT_ENABLE | 157 | #ifdef BACKLIGHT_ENABLE |
157 | backlight_step(); | 158 | backlight_step(); |
158 | #endif | 159 | #endif |
159 | } | 160 | } |
160 | else { | 161 | else { |
161 | unregister_code(KC_RSFT); | 162 | unregister_code(KC_RSFT); |
162 | } | 163 | } |
163 | break; | 164 | break; |
164 | } | 165 | } |
165 | return MACRO_NONE; | 166 | return MACRO_NONE; |
166 | }; | 167 | }; |
diff --git a/keyboards/planck/keymaps/brandon/keymap.c b/keyboards/planck/keymaps/brandon/keymap.c index f6ee89b17..2d5e05aff 100644 --- a/keyboards/planck/keymaps/brandon/keymap.c +++ b/keyboards/planck/keymaps/brandon/keymap.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
1 | #include "planck.h" | 2 | #include "planck.h" |
2 | #include "action_layer.h" | 3 | #include "action_layer.h" |
3 | #include "eeconfig.h" | 4 | #include "eeconfig.h" |
diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index d2ef2bfce..2a816bf67 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
1 | #include "planck.h" | 2 | #include "planck.h" |
2 | #include "action_layer.h" | 3 | #include "action_layer.h" |
3 | 4 | ||
diff --git a/keyboards/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c index eb8d422f2..8fdbcf1a7 100644 --- a/keyboards/planck/keymaps/cbbrowne/keymap.c +++ b/keyboards/planck/keymaps/cbbrowne/keymap.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
1 | #include "planck.h" | 2 | #include "planck.h" |
2 | #ifdef BACKLIGHT_ENABLE | 3 | #ifdef BACKLIGHT_ENABLE |
3 | #include "backlight.h" | 4 | #include "backlight.h" |
@@ -7,7 +8,7 @@ | |||
7 | #include "version.h" | 8 | #include "version.h" |
8 | 9 | ||
9 | /* Each layer is given a name to aid in readability, which is then | 10 | /* Each layer is given a name to aid in readability, which is then |
10 | used in the keymap matrix below. The underscores do not denote | 11 | used in the keymap matrix below. The underscores do not denote |
11 | anything - you can have a layer called STUFF or any other name. | 12 | anything - you can have a layer called STUFF or any other name. |
12 | 13 | ||
13 | Layer names don't all need to be of the same length, obviously, and | 14 | Layer names don't all need to be of the same length, obviously, and |
@@ -20,7 +21,7 @@ | |||
20 | /* This was originally based on planck/keymaps/default/default.c, and | 21 | /* This was originally based on planck/keymaps/default/default.c, and |
21 | then cbbrowne has revised things */ | 22 | then cbbrowne has revised things */ |
22 | 23 | ||
23 | /* Things I did not like about the default mapping | 24 | /* Things I did not like about the default mapping |
24 | 25 | ||
25 | - I found control too hard to get to. I use it more than Tab, so | 26 | - I found control too hard to get to. I use it more than Tab, so |
26 | switched it there. | 27 | switched it there. |
@@ -33,7 +34,7 @@ | |||
33 | 34 | ||
34 | - All of the above are done :-) | 35 | - All of the above are done :-) |
35 | 36 | ||
36 | - Dropped out support for Dvorak and friends. They aren't | 37 | - Dropped out support for Dvorak and friends. They aren't |
37 | improvements to me | 38 | improvements to me |
38 | */ | 39 | */ |
39 | 40 | ||
@@ -177,7 +178,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
177 | } else { | 178 | } else { |
178 | unregister_code(KC_RSFT); | 179 | unregister_code(KC_RSFT); |
179 | } | 180 | } |
180 | break; | 181 | break; |
181 | case M_USERNAME: | 182 | case M_USERNAME: |
182 | if (record->event.pressed) { | 183 | if (record->event.pressed) { |
183 | SEND_STRING("cbbrowne"); | 184 | SEND_STRING("cbbrowne"); |
@@ -195,7 +196,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
195 | if (record->event.pressed) { | 196 | if (record->event.pressed) { |
196 | /* Here, we mix the LCRNG with low bits from one of the system | 197 | /* Here, we mix the LCRNG with low bits from one of the system |
197 | clocks via XOR in the theory that this may be more random | 198 | clocks via XOR in the theory that this may be more random |
198 | than either separately */ | 199 | than either separately */ |
199 | rval = (random_value ^ clockbyte) % 10; | 200 | rval = (random_value ^ clockbyte) % 10; |
200 | /* Note that KC_1 thru KC_0 are a contiguous range */ | 201 | /* Note that KC_1 thru KC_0 are a contiguous range */ |
201 | register_code (KC_1 + rval); | 202 | register_code (KC_1 + rval); |
@@ -207,7 +208,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
207 | a letter chosen at random */ | 208 | a letter chosen at random */ |
208 | /* Here, we mix the LCRNG with low bits from one of the system | 209 | /* Here, we mix the LCRNG with low bits from one of the system |
209 | clocks via XOR in the theory that this may be more random | 210 | clocks via XOR in the theory that this may be more random |
210 | than either separately */ | 211 | than either separately */ |
211 | random_value = ((random_value + randadd) * randmul) % randmod; | 212 | random_value = ((random_value + randadd) * randmul) % randmod; |
212 | if (record->event.pressed) { | 213 | if (record->event.pressed) { |
213 | rval = (random_value ^ clockbyte) % 26; | 214 | rval = (random_value ^ clockbyte) % 26; |
@@ -247,7 +248,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
247 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | 248 | update_tri_layer(_LOWER, _RAISE, _ADJUST); |
248 | } | 249 | } |
249 | break; | 250 | break; |
250 | 251 | ||
251 | } | 252 | } |
252 | return MACRO_NONE; | 253 | return MACRO_NONE; |
253 | }; | 254 | }; |
@@ -366,4 +367,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
366 | 367 | ||
367 | return true; | 368 | return true; |
368 | } | 369 | } |
369 | 370 | ||
diff --git a/keyboards/planck/keymaps/chance/keymap.c b/keyboards/planck/keymaps/chance/keymap.c index 63b7f9648..e769ed84e 100644 --- a/keyboards/planck/keymaps/chance/keymap.c +++ b/keyboards/planck/keymaps/chance/keymap.c | |||
@@ -1,4 +1,5 @@ | |||
1 | 1 | ||
2 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
2 | #include "planck.h" | 3 | #include "planck.h" |
3 | #include "action_layer.h" | 4 | #include "action_layer.h" |
4 | #ifdef AUDIO_ENABLE | 5 | #ifdef AUDIO_ENABLE |
diff --git a/keyboards/planck/keymaps/circuit/keymap.c b/keyboards/planck/keymaps/circuit/keymap.c index 3e94fe1f4..35f41c387 100644 --- a/keyboards/planck/keymaps/circuit/keymap.c +++ b/keyboards/planck/keymaps/circuit/keymap.c | |||
@@ -1,5 +1,6 @@ | |||
1 | // Layout picture at http://www.keyboard-layout-editor.com/#/gists/125febfad6960add078e6f14256539b6 | 1 | // Layout picture at http://www.keyboard-layout-editor.com/#/gists/125febfad6960add078e6f14256539b6 |
2 | 2 | ||
3 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
3 | #include "planck.h" | 4 | #include "planck.h" |
4 | #include "action_layer.h" | 5 | #include "action_layer.h" |
5 | #ifdef AUDIO_ENABLE | 6 | #ifdef AUDIO_ENABLE |
@@ -21,21 +22,21 @@ extern keymap_config_t keymap_config; | |||
21 | #define _FUNCTN 5 | 22 | #define _FUNCTN 5 |
22 | 23 | ||
23 | enum planck_keycodes { | 24 | enum planck_keycodes { |
24 | QWERTY = SAFE_RANGE, | 25 | QWERTY = SAFE_RANGE, |
25 | DVORAK, | 26 | DVORAK, |
26 | NUMBER, | 27 | NUMBER, |
27 | ACTION | 28 | ACTION |
28 | }; | 29 | }; |
29 | 30 | ||
30 | // Key code names | 31 | // Key code names |
31 | #define SFT_ENT FUNC(0) // Tap for enter, hold for right shift | 32 | #define SFT_ENT FUNC(0) // Tap for enter, hold for right shift |
32 | #define LOCK FUNC(1) | 33 | #define LOCK FUNC(1) |
33 | #define KC_PSTE KC_PASTE | 34 | #define KC_PSTE KC_PASTE |
34 | #define _______ KC_TRNS | 35 | #define _______ KC_TRNS |
35 | #define XXXXXXX KC_NO | 36 | #define XXXXXXX KC_NO |
36 | 37 | ||
37 | #ifdef TAP_DANCE_ENABLE | 38 | #ifdef TAP_DANCE_ENABLE |
38 | #define SFT_CAP TD(0) // Left shift, double tap for caps | 39 | #define SFT_CAP TD(0) // Left shift, double tap for caps |
39 | #endif | 40 | #endif |
40 | #ifndef TAP_DANCE_ENABLE | 41 | #ifndef TAP_DANCE_ENABLE |
41 | #define SFT_CAP KC_LSFT // Regular left shift | 42 | #define SFT_CAP KC_LSFT // Regular left shift |
@@ -44,14 +45,14 @@ enum planck_keycodes { | |||
44 | // Tap Dance Definitions | 45 | // Tap Dance Definitions |
45 | #ifdef TAP_DANCE_ENABLE | 46 | #ifdef TAP_DANCE_ENABLE |
46 | qk_tap_dance_action_t tap_dance_actions[] = { | 47 | qk_tap_dance_action_t tap_dance_actions[] = { |
47 | [0] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS) | 48 | [0] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS) |
48 | }; | 49 | }; |
49 | #endif | 50 | #endif |
50 | 51 | ||
51 | // Function definitions | 52 | // Function definitions |
52 | const uint16_t PROGMEM fn_actions[] = { | 53 | const uint16_t PROGMEM fn_actions[] = { |
53 | [0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), | 54 | [0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), |
54 | [1] = ACTION_LAYER_TOGGLE(_LOCKED) | 55 | [1] = ACTION_LAYER_TOGGLE(_LOCKED) |
55 | }; | 56 | }; |
56 | 57 | ||
57 | // Layout definitions | 58 | // Layout definitions |
@@ -69,10 +70,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
69 | * `-----------------------------------------------------------------------------------' | 70 | * `-----------------------------------------------------------------------------------' |
70 | */ | 71 | */ |
71 | [_QWERTY] = { | 72 | [_QWERTY] = { |
72 | {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, | 73 | {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, |
73 | {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, | 74 | {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, |
74 | {SFT_CAP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, SFT_ENT}, | 75 | {SFT_CAP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, SFT_ENT}, |
75 | {KC_LCTL, KC_LALT, KC_LGUI, KC_VOLD, ACTION, KC_SPC, KC_SPC, NUMBER, KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT} | 76 | {KC_LCTL, KC_LALT, KC_LGUI, KC_VOLD, ACTION, KC_SPC, KC_SPC, NUMBER, KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT} |
76 | }, | 77 | }, |
77 | 78 | ||
78 | /* DVORAK | 79 | /* DVORAK |
@@ -87,10 +88,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
87 | * `-----------------------------------------------------------------------------------' | 88 | * `-----------------------------------------------------------------------------------' |
88 | */ | 89 | */ |
89 | [_DVORAK] = { | 90 | [_DVORAK] = { |
90 | {_______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______}, | 91 | {_______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______}, |
91 | {_______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_Z }, | 92 | {_______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_Z }, |
92 | {_______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, _______, _______}, | 93 | {_______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, _______, _______}, |
93 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} | 94 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} |
94 | }, | 95 | }, |
95 | 96 | ||
96 | /* LOCK | 97 | /* LOCK |
@@ -105,10 +106,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
105 | * `-----------------------------------------------------------------------------------' | 106 | * `-----------------------------------------------------------------------------------' |
106 | */ | 107 | */ |
107 | [_LOCKED] = { | 108 | [_LOCKED] = { |
108 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, | 109 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, |
109 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, | 110 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, |
110 | {KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, | 111 | {KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, |
111 | {_______, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______} | 112 | {_______, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______} |
112 | }, | 113 | }, |
113 | 114 | ||
114 | /* NUMBERS | 115 | /* NUMBERS |
@@ -123,10 +124,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
123 | * `-----------------------------------------------------------------------------------' | 124 | * `-----------------------------------------------------------------------------------' |
124 | */ | 125 | */ |
125 | [_NUMBER] = { | 126 | [_NUMBER] = { |
126 | {_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, | 127 | {_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, |
127 | {_______, KC_TILD, XXXXXXX, XXXXXXX, XXXXXXX, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_QUES, KC_SLSH}, | 128 | {_______, KC_TILD, XXXXXXX, XXXXXXX, XXXXXXX, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_QUES, KC_SLSH}, |
128 | {_______, KC_GRV, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, _______}, | 129 | {_______, KC_GRV, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, _______}, |
129 | {_______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______} | 130 | {_______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______} |
130 | }, | 131 | }, |
131 | 132 | ||
132 | /* ACTIONS | 133 | /* ACTIONS |
@@ -141,10 +142,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
141 | * `-----------------------------------------------------------------------------------' | 142 | * `-----------------------------------------------------------------------------------' |
142 | */ | 143 | */ |
143 | [_ACTION] = { | 144 | [_ACTION] = { |
144 | {_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL }, | 145 | {_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL }, |
145 | {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, | 146 | {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, |
146 | {KC_CAPS, KC_UNDO, KC_CUT, KC_COPY, KC_PSTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, KC_ENT }, | 147 | {KC_CAPS, KC_UNDO, KC_CUT, KC_COPY, KC_PSTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, KC_ENT }, |
147 | {_______, _______, _______, KC_MUTE, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_HOME, KC_PGDN, KC_END } | 148 | {_______, _______, _______, KC_MUTE, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_HOME, KC_PGDN, KC_END } |
148 | }, | 149 | }, |
149 | 150 | ||
150 | /* FUNCTIONS | 151 | /* FUNCTIONS |
@@ -159,10 +160,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
159 | * `-----------------------------------------------------------------------------------' | 160 | * `-----------------------------------------------------------------------------------' |
160 | */ | 161 | */ |
161 | [_FUNCTN] = { | 162 | [_FUNCTN] = { |
162 | {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 }, | 163 | {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 }, |
163 | {KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24 }, | 164 | {KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24 }, |
164 | {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QWERTY, DVORAK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, | 165 | {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QWERTY, DVORAK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, |
165 | {RESET, XXXXXXX, LOCK, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} | 166 | {RESET, XXXXXXX, LOCK, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} |
166 | } | 167 | } |
167 | 168 | ||
168 | }; | 169 | }; |
@@ -177,56 +178,56 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND); | |||
177 | 178 | ||
178 | 179 | ||
179 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 180 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
180 | switch (keycode) { | 181 | switch (keycode) { |
181 | case QWERTY: | 182 | case QWERTY: |
182 | if (record->event.pressed) { | 183 | if (record->event.pressed) { |
183 | if (IS_LAYER_ON(_DVORAK)) { | 184 | if (IS_LAYER_ON(_DVORAK)) { |
184 | #ifdef AUDIO_ENABLE | 185 | #ifdef AUDIO_ENABLE |
185 | PLAY_SONG(tone_qwerty); | 186 | PLAY_SONG(tone_qwerty); |
186 | #endif | 187 | #endif |
187 | layer_off(_DVORAK); | 188 | layer_off(_DVORAK); |
188 | } | 189 | } |
189 | } | 190 | } |
190 | return false; | 191 | return false; |
191 | break; | 192 | break; |
192 | case DVORAK: | 193 | case DVORAK: |
193 | if (record->event.pressed) { | 194 | if (record->event.pressed) { |
194 | if (!IS_LAYER_ON(_DVORAK)) { | 195 | if (!IS_LAYER_ON(_DVORAK)) { |
195 | #ifdef AUDIO_ENABLE | 196 | #ifdef AUDIO_ENABLE |
196 | PLAY_SONG(tone_dvorak); | 197 | PLAY_SONG(tone_dvorak); |
197 | #endif | 198 | #endif |
198 | layer_on(_DVORAK); | 199 | layer_on(_DVORAK); |
199 | } | 200 | } |
200 | } | 201 | } |
201 | return false; | 202 | return false; |
202 | break; | 203 | break; |
203 | case NUMBER: | 204 | case NUMBER: |
204 | if (record->event.pressed) { | 205 | if (record->event.pressed) { |
205 | layer_on(_NUMBER); | 206 | layer_on(_NUMBER); |
206 | update_tri_layer(_NUMBER, _ACTION, _FUNCTN); | 207 | update_tri_layer(_NUMBER, _ACTION, _FUNCTN); |
207 | } else { | 208 | } else { |
208 | layer_off(_NUMBER); | 209 | layer_off(_NUMBER); |
209 | update_tri_layer(_NUMBER, _ACTION, _FUNCTN); | 210 | update_tri_layer(_NUMBER, _ACTION, _FUNCTN); |
210 | } | 211 | } |
211 | return false; | 212 | return false; |
212 | break; | 213 | break; |
213 | case ACTION: | 214 | case ACTION: |
214 | if (record->event.pressed) { | 215 | if (record->event.pressed) { |
215 | layer_on(_ACTION); | 216 | layer_on(_ACTION); |
216 | update_tri_layer(_NUMBER, _ACTION, _FUNCTN); | 217 | update_tri_layer(_NUMBER, _ACTION, _FUNCTN); |
217 | } else { | 218 | } else { |
218 | layer_off(_ACTION); | 219 | layer_off(_ACTION); |
219 | update_tri_layer(_NUMBER, _ACTION, _FUNCTN); | 220 | update_tri_layer(_NUMBER, _ACTION, _FUNCTN); |
220 | } | 221 | } |
221 | return false; | 222 | return false; |
222 | break; | 223 | break; |
223 | } | 224 | } |
224 | return true; | 225 | return true; |
225 | } | 226 | } |
226 | 227 | ||
227 | void matrix_init_user(void) { | 228 | void matrix_init_user(void) { |
228 | #ifdef AUDIO_ENABLE | 229 | #ifdef AUDIO_ENABLE |
229 | startup_user(); | 230 | startup_user(); |
230 | #endif | 231 | #endif |
231 | } | 232 | } |
232 | 233 | ||
@@ -234,25 +235,25 @@ void matrix_init_user(void) { | |||
234 | 235 | ||
235 | void startup_user() | 236 | void startup_user() |
236 | { | 237 | { |
237 | _delay_ms(20); // gets rid of tick | 238 | _delay_ms(20); // gets rid of tick |
238 | PLAY_SONG(tone_startup); | 239 | PLAY_SONG(tone_startup); |
239 | } | 240 | } |
240 | 241 | ||
241 | void shutdown_user() | 242 | void shutdown_user() |
242 | { | 243 | { |
243 | PLAY_SONG(tone_goodbye); | 244 | PLAY_SONG(tone_goodbye); |
244 | _delay_ms(150); | 245 | _delay_ms(150); |
245 | stop_all_notes(); | 246 | stop_all_notes(); |
246 | } | 247 | } |
247 | 248 | ||
248 | void music_on_user(void) | 249 | void music_on_user(void) |
249 | { | 250 | { |
250 | music_scale_user(); | 251 | music_scale_user(); |
251 | } | 252 | } |
252 | 253 | ||
253 | void music_scale_user(void) | 254 | void music_scale_user(void) |
254 | { | 255 | { |
255 | PLAY_SONG(music_scale); | 256 | PLAY_SONG(music_scale); |
256 | } | 257 | } |
257 | 258 | ||
258 | #endif | 259 | #endif |
diff --git a/keyboards/planck/keymaps/coloneljesus/keymap.c b/keyboards/planck/keymaps/coloneljesus/keymap.c index 9e6177a4b..022d5520e 100644 --- a/keyboards/planck/keymaps/coloneljesus/keymap.c +++ b/keyboards/planck/keymaps/coloneljesus/keymap.c | |||
@@ -14,6 +14,7 @@ | |||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
17 | #include "planck.h" | 18 | #include "planck.h" |
18 | #include "action_layer.h" | 19 | #include "action_layer.h" |
19 | 20 | ||
@@ -258,4 +259,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
258 | break; | 259 | break; |
259 | } | 260 | } |
260 | return true; | 261 | return true; |
261 | } \ No newline at end of file | 262 | } |
diff --git a/keyboards/planck/keymaps/corvec/keymap.c b/keyboards/planck/keymaps/corvec/keymap.c index ea98927c2..758a9310f 100644 --- a/keyboards/planck/keymaps/corvec/keymap.c +++ b/keyboards/planck/keymaps/corvec/keymap.c | |||
@@ -14,6 +14,7 @@ | |||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
17 | #include "planck.h" | 18 | #include "planck.h" |
18 | #include "action_layer.h" | 19 | #include "action_layer.h" |
19 | 20 | ||
diff --git a/keyboards/planck/keymaps/danielhklein/keymap.c b/keyboards/planck/keymaps/danielhklein/keymap.c index a0db05daa..b5ab1354c 100644 --- a/keyboards/planck/keymaps/danielhklein/keymap.c +++ b/keyboards/planck/keymaps/danielhklein/keymap.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
1 | #include "planck.h" | 2 | #include "planck.h" |
2 | #include "action_layer.h" | 3 | #include "action_layer.h" |
3 | 4 | ||
@@ -27,7 +28,7 @@ enum custom_keycodes { | |||
27 | 28 | ||
28 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 29 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
29 | 30 | ||
30 | /* QWERTY | 31 | /* QWERTY |
31 | * .----------------------------------------------------------------------------------. | 32 | * .----------------------------------------------------------------------------------. |
32 | * | Esc | Q | W | E | R | T | Y | U | I | O | P |Enter | | 33 | * | Esc | Q | W | E | R | T | Y | U | I | O | P |Enter | |
33 | * |-----+------+------+------+------+------|------+------+------+------+------+------| | 34 | * |-----+------+------+------+------+------|------+------+------+------+------+------| |
@@ -40,11 +41,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
40 | */ | 41 | */ |
41 | 42 | ||
42 | [_QWERTY] = { | 43 | [_QWERTY] = { |
43 | {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT}, | 44 | {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT}, |
44 | {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, | 45 | {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, |
45 | {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, | 46 | {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, |
46 | {ARROW, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_RGUI, KC_RALT, KC_RCTL, KC_MINS} | 47 | {ARROW, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_RGUI, KC_RALT, KC_RCTL, KC_MINS} |
47 | }, | 48 | }, |
48 | 49 | ||
49 | /* Lower | 50 | /* Lower |
50 | * ,-----------------------------------------------------------------------------------. | 51 | * ,-----------------------------------------------------------------------------------. |
@@ -58,11 +59,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
58 | * `-----------------------------------------------------------------------------------' | 59 | * `-----------------------------------------------------------------------------------' |
59 | */ | 60 | */ |
60 | 61 | ||
61 | [_LOWER] = { | 62 | [_LOWER] = { |
62 | {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_7, KC_8, KC_9, KC_PSLS, KC_BSLS, KC_GRV}, | 63 | {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_7, KC_8, KC_9, KC_PSLS, KC_BSLS, KC_GRV}, |
63 | {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_4, KC_5, KC_6, KC_PAST, KC_LPRN, KC_RPRN}, | 64 | {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_4, KC_5, KC_6, KC_PAST, KC_LPRN, KC_RPRN}, |
64 | {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, KC_MINS, KC_LBRC, KC_RBRC}, | 65 | {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, KC_MINS, KC_LBRC, KC_RBRC}, |
65 | {XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, KC_0, KC_DOT, KC_PEQL, KC_PPLS, KC_LCBR, KC_RCBR} | 66 | {XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, KC_0, KC_DOT, KC_PEQL, KC_PPLS, KC_LCBR, KC_RCBR} |
66 | }, | 67 | }, |
67 | 68 | ||
68 | /* Raise | 69 | /* Raise |
@@ -78,10 +79,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
78 | */ | 79 | */ |
79 | 80 | ||
80 | [_RAISE] = { | 81 | [_RAISE] = { |
81 | {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, | 82 | {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, |
82 | {KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, | 83 | {KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, |
83 | {KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, | 84 | {KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, |
84 | {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} | 85 | {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} |
85 | }, | 86 | }, |
86 | 87 | ||
87 | /* Arrow | 88 | /* Arrow |
@@ -100,7 +101,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
100 | {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX}, | 101 | {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX}, |
101 | {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX}, | 102 | {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX}, |
102 | {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, | 103 | {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, |
103 | {_______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} | 104 | {_______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} |
104 | }, | 105 | }, |
105 | 106 | ||
106 | }; | 107 | }; |
diff --git a/keyboards/planck/keymaps/davidrambo/keymap.c b/keyboards/planck/keymaps/davidrambo/keymap.c index 37e22afb9..5ce808aa4 100644 --- a/keyboards/planck/keymaps/davidrambo/keymap.c +++ b/keyboards/planck/keymaps/davidrambo/keymap.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
1 | #include "planck.h" | 2 | #include "planck.h" |
2 | 3 | ||
3 | //alias for clarity in layering | 4 | //alias for clarity in layering |
@@ -26,7 +27,7 @@ enum { | |||
26 | #define SftLck TD(SFT_LCK) | 27 | #define SftLck TD(SFT_LCK) |
27 | 28 | ||
28 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 29 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
29 | 30 | ||
30 | /* Colemak | 31 | /* Colemak |
31 | * ,-----------------------------------------------------------------------------------. | 32 | * ,-----------------------------------------------------------------------------------. |
32 | * | ESC` | Q | W | F | P | G | J | L | U | Y | ; | Bksp | | 33 | * | ESC` | Q | W | F | P | G | J | L | U | Y | ; | Bksp | |
@@ -38,14 +39,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
38 | * | Del | GUI | Ctrl | Alt | GUI | Space |Symbol| Left | Down | Up |Right | | 39 | * | Del | GUI | Ctrl | Alt | GUI | Space |Symbol| Left | Down | Up |Right | |
39 | * `-----------------------------------------------------------------------------------' | 40 | * `-----------------------------------------------------------------------------------' |
40 | */ | 41 | */ |
41 | 42 | ||
42 | [_COLEMAK] = { | 43 | [_COLEMAK] = { |
43 | {KC_GESC, KC_Q , KC_W , KC_F , KC_P , KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, | 44 | {KC_GESC, KC_Q , KC_W , KC_F , KC_P , KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, |
44 | {NAV , KC_A , KC_R , KC_S , KC_T , KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, | 45 | {NAV , KC_A , KC_R , KC_S , KC_T , KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, |
45 | {SftLck , KC_Z , KC_X , KC_C , KC_V , KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SftEnt }, | 46 | {SftLck , KC_Z , KC_X , KC_C , KC_V , KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SftEnt }, |
46 | {KC_DEL , KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} | 47 | {KC_DEL , KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} |
47 | }, | 48 | }, |
48 | 49 | ||
49 | /* Symbol | 50 | /* Symbol |
50 | * ,-----------------------------------------------------------------------------------. | 51 | * ,-----------------------------------------------------------------------------------. |
51 | * | [ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ] | | 52 | * | [ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ] | |
@@ -65,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
65 | }, | 66 | }, |
66 | 67 | ||
67 | /* Navigation*/ | 68 | /* Navigation*/ |
68 | 69 | ||
69 | [_NAVIGATION] = { | 70 | [_NAVIGATION] = { |
70 | {_______, _______, _______, _______, _______, _______, C_TAB , A_LEFT, KC_UP, A_RGHT , KC_DEL , _______}, | 71 | {_______, _______, _______, _______, _______, _______, C_TAB , A_LEFT, KC_UP, A_RGHT , KC_DEL , _______}, |
71 | {_______, _______, _______, _______, _______, _______, GSL , KC_LEFT, KC_DOWN, KC_RGHT, GSR , _______}, | 72 | {_______, _______, _______, _______, _______, _______, GSL , KC_LEFT, KC_DOWN, KC_RGHT, GSR , _______}, |
@@ -95,4 +96,4 @@ void caps_tap_end (qk_tap_dance_state_t *state, void *user_data) { | |||
95 | qk_tap_dance_action_t tap_dance_actions[] = { | 96 | qk_tap_dance_action_t tap_dance_actions[] = { |
96 | //Tap once for Shift, twice for Caps Lock | 97 | //Tap once for Shift, twice for Caps Lock |
97 | [SFT_LCK] = ACTION_TAP_DANCE_FN_ADVANCED( caps_tap, NULL, caps_tap_end ) | 98 | [SFT_LCK] = ACTION_TAP_DANCE_FN_ADVANCED( caps_tap, NULL, caps_tap_end ) |
98 | }; \ No newline at end of file | 99 | }; |
diff --git a/keyboards/planck/keymaps/dbroqua/keymap.c b/keyboards/planck/keymaps/dbroqua/keymap.c index 94460652f..8bfd7d022 100644 --- a/keyboards/planck/keymaps/dbroqua/keymap.c +++ b/keyboards/planck/keymaps/dbroqua/keymap.c | |||
@@ -1,4 +1,5 @@ | |||
1 | 1 | ||
2 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
2 | #include "planck.h" | 3 | #include "planck.h" |
3 | #include "action_layer.h" | 4 | #include "action_layer.h" |
4 | #ifdef AUDIO_ENABLE | 5 | #ifdef AUDIO_ENABLE |
@@ -229,4 +230,4 @@ void music_scale_user(void) | |||
229 | PLAY_SONG(music_scale); | 230 | PLAY_SONG(music_scale); |
230 | } | 231 | } |
231 | 232 | ||
232 | #endif \ No newline at end of file | 233 | #endif |
diff --git a/keyboards/planck/keymaps/dc/keymap.c b/keyboards/planck/keymaps/dc/keymap.c index 6ac9c30a6..0990cae90 100644 --- a/keyboards/planck/keymaps/dc/keymap.c +++ b/keyboards/planck/keymaps/dc/keymap.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
1 | #include "planck.h" | 2 | #include "planck.h" |
2 | #include "action_layer.h" | 3 | #include "action_layer.h" |
3 | #ifdef AUDIO_ENABLE | 4 | #ifdef AUDIO_ENABLE |
@@ -5,170 +6,170 @@ | |||
5 | #endif | 6 | #endif |
6 | 7 | ||
7 | enum planck_layers { | 8 | enum planck_layers { |
8 | _DVORAK, | 9 | _DVORAK, |
9 | _NUMBERS, | 10 | _NUMBERS, |
10 | _SYMBOLS, | 11 | _SYMBOLS, |
11 | _ACTIONS, | 12 | _ACTIONS, |
12 | _SPECIAL | 13 | _SPECIAL |
13 | }; | 14 | }; |
14 | 15 | ||
15 | enum planck_keycodes { | 16 | enum planck_keycodes { |
16 | DVORAK, | 17 | DVORAK, |
17 | NUMBERS, | 18 | NUMBERS, |
18 | SYMBOLS, | 19 | SYMBOLS, |
19 | ACTIONS, | 20 | ACTIONS, |
20 | SPECIAL | 21 | SPECIAL |
21 | }; | 22 | }; |
22 | 23 | ||
23 | enum tap_dance_codes { | 24 | enum tap_dance_codes { |
24 | CT_SC_LP = 0, | 25 | CT_SC_LP = 0, |
25 | CT_Q_LBRC, | 26 | CT_Q_LBRC, |
26 | CT_J_LBRK, | 27 | CT_J_LBRK, |
27 | CT_W_RBRK, | 28 | CT_W_RBRK, |
28 | CT_V_RBRC, | 29 | CT_V_RBRC, |
29 | CT_Z_RP, | 30 | CT_Z_RP, |
30 | CT_DEL_ESC | 31 | CT_DEL_ESC |
31 | }; | 32 | }; |
32 | 33 | ||
33 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { | 34 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { |
34 | //keyevent_t event = record->event; | 35 | //keyevent_t event = record->event; |
35 | 36 | ||
36 | switch (id) { | 37 | switch (id) { |
37 | 38 | ||
38 | } | 39 | } |
39 | return MACRO_NONE; | 40 | return MACRO_NONE; |
40 | } | 41 | } |
41 | 42 | ||
42 | qk_tap_dance_action_t tap_dance_actions[] = { | 43 | qk_tap_dance_action_t tap_dance_actions[] = { |
43 | [0] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_LPRN), | 44 | [0] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_LPRN), |
44 | [1] = ACTION_TAP_DANCE_DOUBLE(KC_Q, KC_LCBR), | 45 | [1] = ACTION_TAP_DANCE_DOUBLE(KC_Q, KC_LCBR), |
45 | [2] = ACTION_TAP_DANCE_DOUBLE(KC_J, KC_LBRC), | 46 | [2] = ACTION_TAP_DANCE_DOUBLE(KC_J, KC_LBRC), |
46 | [3] = ACTION_TAP_DANCE_DOUBLE(KC_W, KC_RBRC), | 47 | [3] = ACTION_TAP_DANCE_DOUBLE(KC_W, KC_RBRC), |
47 | [4] = ACTION_TAP_DANCE_DOUBLE(KC_V, KC_RCBR), | 48 | [4] = ACTION_TAP_DANCE_DOUBLE(KC_V, KC_RCBR), |
48 | [5] = ACTION_TAP_DANCE_DOUBLE(KC_Z, KC_RPRN) | 49 | [5] = ACTION_TAP_DANCE_DOUBLE(KC_Z, KC_RPRN) |
49 | }; | 50 | }; |
50 | 51 | ||
51 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 52 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
52 | 53 | ||
53 | /* Dvorak | 54 | /* Dvorak |
54 | * ,-----------------------------------------------------------------------------------. | 55 | * ,-----------------------------------------------------------------------------------. |
55 | * | Tab | '" | ,< | .> | P | Y | F | G | C | R | L | BS | | 56 | * | Tab | '" | ,< | .> | P | Y | F | G | C | R | L | BS | |
56 | * |------+------+------+------+------+-------------+------+------+------+------+------| | 57 | * |------+------+------+------+------+-------------+------+------+------+------+------| |
57 | * | Esc | A | O | E | U | I | D | H | T | N | S | /? | | 58 | * | Esc | A | O | E | U | I | D | H | T | N | S | /? | |
58 | * |------+------+------+------+------+------|------+------+------+------+------+------| | 59 | * |------+------+------+------+------+------|------+------+------+------+------+------| |
59 | * |LShift| ;:/( | Q/{ | J/[ | K | X | B | M | W/] | V/} | Z/) |RS/Ent| | 60 | * |LShift| ;:/( | Q/{ | J/[ | K | X | B | M | W/] | V/} | Z/) |RS/Ent| |
60 | * |------+------+------+------+------+------+------+------+------+------+------+------| | 61 | * |------+------+------+------+------+------+------+------+------+------+------+------| |
61 | * |Action| Ctrl | GUI | Alt |Number| Space/Enter |Symbol| Left | Down | Up | Right| | 62 | * |Action| Ctrl | GUI | Alt |Number| Space/Enter |Symbol| Left | Down | Up | Right| |
62 | * `-----------------------------------------------------------------------------------' | 63 | * `-----------------------------------------------------------------------------------' |
63 | */ | 64 | */ |
64 | [_DVORAK] = { | 65 | [_DVORAK] = { |
65 | {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPACE}, | 66 | {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPACE}, |
66 | {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLASH}, | 67 | {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLASH}, |
67 | {KC_LSFT, TD(0), TD(1), TD(2), KC_K, KC_X, KC_B, KC_M, TD(3), TD(4), TD(5), MT(MOD_RSFT, KC_ENT)}, | 68 | {KC_LSFT, TD(0), TD(1), TD(2), KC_K, KC_X, KC_B, KC_M, TD(3), TD(4), TD(5), MT(MOD_RSFT, KC_ENT)}, |
68 | {MO(ACTIONS), KC_LCTRL, KC_LGUI, KC_LALT, NUMBERS, KC_SPACE, KC_SPACE, SYMBOLS,KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT}, | 69 | {MO(ACTIONS), KC_LCTRL, KC_LGUI, KC_LALT, NUMBERS, KC_SPACE, KC_SPACE, SYMBOLS,KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT}, |
69 | }, | 70 | }, |
70 | 71 | ||
71 | /* Numbers | 72 | /* Numbers |
72 | * ,-----------------------------------------------------------------------------------. | 73 | * ,-----------------------------------------------------------------------------------. |
73 | * | | F1 | F2 | F3 | F4 | F5 | F6 | 7 | 8 | 9 | * | | | 74 | * | | F1 | F2 | F3 | F4 | F5 | F6 | 7 | 8 | 9 | * | | |
74 | * |------+------+------+------+------+-------------+------+------+------+------+------| | 75 | * |------+------+------+------+------+-------------+------+------+------+------+------| |
75 | * | | F7 | F8 | F9 | F10 | F11 | F12 | 4 | 5 | 6 | - | | | 76 | * | | F7 | F8 | F9 | F10 | F11 | F12 | 4 | 5 | 6 | - | | |
76 | * |------+------+------+------+------+------|------+------+------+------+------+------| | 77 | * |------+------+------+------+------+------|------+------+------+------+------+------| |
77 | * | | | | | | | 0 | 1 | 2 | 3 | + | | | 78 | * | | | | | | | 0 | 1 | 2 | 3 | + | | |
78 | * |------+------+------+------+------+------+------+------+------+------+------+------| | 79 | * |------+------+------+------+------+------+------+------+------+------+------+------| |
79 | * | | | | | | | | | | | | | | 80 | * | | | | | | | | | | | | | |
80 | * `-----------------------------------------------------------------------------------' | 81 | * `-----------------------------------------------------------------------------------' |
81 | */ | 82 | */ |
82 | [_NUMBERS] = { | 83 | [_NUMBERS] = { |
83 | {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_7, KC_8, KC_9, KC_KP_ASTERISK, _______}, | 84 | {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_7, KC_8, KC_9, KC_KP_ASTERISK, _______}, |
84 | {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_4, KC_5, KC_6, KC_KP_MINUS, _______}, | 85 | {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_4, KC_5, KC_6, KC_KP_MINUS, _______}, |
85 | {_______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_KP_PLUS, _______}, | 86 | {_______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_KP_PLUS, _______}, |
86 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, | 87 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, |
87 | }, | 88 | }, |
88 | 89 | ||
89 | /* Symbols | 90 | /* Symbols |
90 | * ,-----------------------------------------------------------------------------------. | 91 | * ,-----------------------------------------------------------------------------------. |
91 | * | `~ | ! | @ | # | $ | % | ^ | & | * | | | Del | | 92 | * | `~ | ! | @ | # | $ | % | ^ | & | * | | | Del | |
92 | * |------+------+------+------+------+-------------+------+------+------+------+------| | 93 | * |------+------+------+------+------+-------------+------+------+------+------+------| |
93 | * | Caps | | Ins | Pgup | | | | _ | + | | | \| | | 94 | * | Caps | | Ins | Pgup | | | | _ | + | | | \| | |
94 | * |------+------+------+------+------+------|------+------+------+------+------+------| | 95 | * |------+------+------+------+------+------|------+------+------+------+------+------| |
95 | * | | Home | End | Pgdn | | | | - | = | | | | | 96 | * | | Home | End | Pgdn | | | | - | = | | | | |
96 | * |------+------+------+------+------+------+------+------+------+------+------+------| | 97 | * |------+------+------+------+------+------+------+------+------+------+------+------| |
97 | * | | | | | | | | | | | | | | 98 | * | | | | | | | | | | | | | |
98 | * `-----------------------------------------------------------------------------------' | 99 | * `-----------------------------------------------------------------------------------' |
99 | */ | 100 | */ |
100 | [_SYMBOLS] = { | 101 | [_SYMBOLS] = { |
101 | {KC_GRV, KC_EXCLAIM, KC_AT, KC_HASH, KC_DOLLAR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, _______, _______, KC_DEL}, | 102 | {KC_GRV, KC_EXCLAIM, KC_AT, KC_HASH, KC_DOLLAR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, _______, _______, KC_DEL}, |
102 | {KC_CAPS, _______, KC_INS, KC_PGUP, _______, _______, _______, KC_UNDS, KC_PLUS, _______, _______, KC_BSLS}, | 103 | {KC_CAPS, _______, KC_INS, KC_PGUP, _______, _______, _______, KC_UNDS, KC_PLUS, _______, _______, KC_BSLS}, |
103 | {_______, KC_HOME, KC_END, KC_PGDN, _______, _______, _______, KC_MINUS, KC_EQL, _______, _______, _______}, | 104 | {_______, KC_HOME, KC_END, KC_PGDN, _______, _______, _______, KC_MINUS, KC_EQL, _______, _______, _______}, |
104 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, | 105 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, |
105 | }, | 106 | }, |
106 | 107 | ||
107 | /* Actions | 108 | /* Actions |
108 | * ,-----------------------------------------------------------------------------------. | 109 | * ,-----------------------------------------------------------------------------------. |
109 | * | LED | | | | | Sleep|Reset | | | | | Del | | 110 | * | LED | | | | | Sleep|Reset | | | | | Del | |
110 | * |------+------+------+------+------+-------------+------+------+------+------+------| | 111 | * |------+------+------+------+------+-------------+------+------+------+------+------| |
111 | * | | Redo | | | | | | Play | << | >> | | | | 112 | * | | Redo | | | | | | Play | << | >> | | | |
112 | * |------+------+------+------+------+------|------+------+------+------+------+------| | 113 | * |------+------+------+------+------+------|------+------+------+------+------+------| |
113 | * | | Undo | Cut | Copy | Paste| | | Mute | Vol- | Vol+ | | | | 114 | * | | Undo | Cut | Copy | Paste| | | Mute | Vol- | Vol+ | | | |
114 | * |------+------+------+------+------+------+------+------+------+------+------+------| | 115 | * |------+------+------+------+------+------+------+------+------+------+------+------| |
115 | * | | | | | | | | | | | | | | 116 | * | | | | | | | | | | | | | |
116 | * `-----------------------------------------------------------------------------------' | 117 | * `-----------------------------------------------------------------------------------' |
117 | */ | 118 | */ |
118 | [_ACTIONS] = { | 119 | [_ACTIONS] = { |
119 | {BL_STEP, _______, _______, _______, _______, KC_SLEP, RESET, _______, _______, _______, _______, KC_DEL}, | 120 | {BL_STEP, _______, _______, _______, _______, KC_SLEP, RESET, _______, _______, _______, _______, KC_DEL}, |
120 | {_______, LCTL(KC_Y), _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT, _______, _______}, | 121 | {_______, LCTL(KC_Y), _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT, _______, _______}, |
121 | {_______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______}, | 122 | {_______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______}, |
122 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, | 123 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, |
123 | }, | 124 | }, |
124 | 125 | ||
125 | /* Special | 126 | /* Special |
126 | * ,-----------------------------------------------------------------------------------. | 127 | * ,-----------------------------------------------------------------------------------. |
127 | * | | | | | | | | | | | | | | 128 | * | | | | | | | | | | | | | |
128 | * |------+------+------+------+------+-------------+------+------+------+------+------| | 129 | * |------+------+------+------+------+-------------+------+------+------+------+------| |
129 | * | | | | | | | | | | | | | | 130 | * | | | | | | | | | | | | | |
130 | * |------+------+------+------+------+------|------+------+------+------+------+------| | 131 | * |------+------+------+------+------+------|------+------+------+------+------+------| |
131 | * | | | | | | | | | | | | | | 132 | * | | | | | | | | | | | | | |
132 | * |------+------+------+------+------+------+------+------+------+------+------+------| | 133 | * |------+------+------+------+------+------+------+------+------+------+------+------| |
133 | * | | | | | | | | | | | | | | 134 | * | | | | | | | | | | | | | |
134 | * `-----------------------------------------------------------------------------------' | 135 | * `-----------------------------------------------------------------------------------' |
135 | */ | 136 | */ |
136 | [_SPECIAL] = { | 137 | [_SPECIAL] = { |
137 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, | 138 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, |
138 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, | 139 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, |
139 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, | 140 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, |
140 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, | 141 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, |
141 | } | 142 | } |
142 | }; | 143 | }; |
143 | 144 | ||
144 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 145 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
145 | switch (keycode) { | 146 | switch (keycode) { |
146 | case DVORAK: | 147 | case DVORAK: |
147 | if (record->event.pressed) { | 148 | if (record->event.pressed) { |
148 | set_single_persistent_default_layer(_DVORAK); | 149 | set_single_persistent_default_layer(_DVORAK); |
149 | } | 150 | } |
150 | return false; | 151 | return false; |
151 | break; | 152 | break; |
152 | case SYMBOLS: | 153 | case SYMBOLS: |
153 | if (record->event.pressed) { | 154 | if (record->event.pressed) { |
154 | layer_on(_SYMBOLS); | 155 | layer_on(_SYMBOLS); |
155 | update_tri_layer(_NUMBERS, _SYMBOLS, _SPECIAL); | 156 | update_tri_layer(_NUMBERS, _SYMBOLS, _SPECIAL); |
156 | } else { | 157 | } else { |
157 | layer_off(_SYMBOLS); | 158 | layer_off(_SYMBOLS); |
158 | update_tri_layer(_NUMBERS, _SYMBOLS, _SPECIAL); | 159 | update_tri_layer(_NUMBERS, _SYMBOLS, _SPECIAL); |
159 | } | 160 | } |
160 | return false; | 161 | return false; |
161 | break; | 162 | break; |
162 | case NUMBERS: | 163 | case NUMBERS: |
163 | if (record->event.pressed) { | 164 | if (record->event.pressed) { |
164 | layer_on(_NUMBERS); | 165 | layer_on(_NUMBERS); |
165 | update_tri_layer(_NUMBERS, _SYMBOLS, _SPECIAL); | 166 | update_tri_layer(_NUMBERS, _SYMBOLS, _SPECIAL); |
166 | } else { | 167 | } else { |
167 | layer_off(_NUMBERS); | 168 | layer_off(_NUMBERS); |
168 | update_tri_layer(_NUMBERS, _SYMBOLS, _SPECIAL); | 169 | update_tri_layer(_NUMBERS, _SYMBOLS, _SPECIAL); |
169 | } | 170 | } |
170 | return false; | 171 | return false; |
171 | break; | 172 | break; |
172 | } | 173 | } |
173 | return true; | 174 | return true; |
174 | } \ No newline at end of file | 175 | } |
diff --git a/keyboards/planck/keymaps/dcompact/keymap.c b/keyboards/planck/keymaps/dcompact/keymap.c index a5ce1ef41..ce7bbd936 100644 --- a/keyboards/planck/keymaps/dcompact/keymap.c +++ b/keyboards/planck/keymaps/dcompact/keymap.c | |||
@@ -14,6 +14,7 @@ | |||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
17 | #include "planck.h" | 18 | #include "planck.h" |
18 | #include "action_layer.h" | 19 | #include "action_layer.h" |
19 | #include "keymap_steno.h" | 20 | #include "keymap_steno.h" |
diff --git a/keyboards/planck/keymaps/default/config.h b/keyboards/planck/keymaps/default/config.h index 7f38058a7..fbd2fdb27 100644 --- a/keyboards/planck/keymaps/default/config.h +++ b/keyboards/planck/keymaps/default/config.h | |||
@@ -37,4 +37,7 @@ | |||
37 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | 37 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ |
38 | //#define MIDI_TONE_KEYCODE_OCTAVES 2 | 38 | //#define MIDI_TONE_KEYCODE_OCTAVES 2 |
39 | 39 | ||
40 | // Most tactile encoders have detents every 4 stages | ||
41 | #define ENCODER_RESOLUTION 4 | ||
42 | |||
40 | #endif | 43 | #endif |
diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c index d6babf316..cffa5a5df 100644 --- a/keyboards/planck/keymaps/default/keymap.c +++ b/keyboards/planck/keymaps/default/keymap.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include "planck.h" | 17 | #include "planck.h" |
18 | #include "action_layer.h" | 18 | #include "action_layer.h" |
19 | #include "muse.h" | ||
19 | 20 | ||
20 | extern keymap_config_t keymap_config; | 21 | extern keymap_config_t keymap_config; |
21 | 22 | ||
@@ -54,12 +55,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
54 | * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | | 55 | * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | |
55 | * `-----------------------------------------------------------------------------------' | 56 | * `-----------------------------------------------------------------------------------' |
56 | */ | 57 | */ |
57 | [_QWERTY] = { | 58 | [_QWERTY] = LAYOUT_planck_grid( |
58 | {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, | 59 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, |
59 | {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, | 60 | KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, |
60 | {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, | 61 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , |
61 | {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} | 62 | BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT |
62 | }, | 63 | ), |
63 | 64 | ||
64 | /* Colemak | 65 | /* Colemak |
65 | * ,-----------------------------------------------------------------------------------. | 66 | * ,-----------------------------------------------------------------------------------. |
@@ -72,12 +73,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
72 | * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | | 73 | * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | |
73 | * `-----------------------------------------------------------------------------------' | 74 | * `-----------------------------------------------------------------------------------' |
74 | */ | 75 | */ |
75 | [_COLEMAK] = { | 76 | [_COLEMAK] = LAYOUT_planck_grid( |
76 | {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, | 77 | KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, |
77 | {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, | 78 | KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, |
78 | {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, | 79 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , |
79 | {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} | 80 | BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT |
80 | }, | 81 | ), |
81 | 82 | ||
82 | /* Dvorak | 83 | /* Dvorak |
83 | * ,-----------------------------------------------------------------------------------. | 84 | * ,-----------------------------------------------------------------------------------. |
@@ -90,12 +91,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
90 | * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | | 91 | * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | |
91 | * `-----------------------------------------------------------------------------------' | 92 | * `-----------------------------------------------------------------------------------' |
92 | */ | 93 | */ |
93 | [_DVORAK] = { | 94 | [_DVORAK] = LAYOUT_planck_grid( |
94 | {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, | 95 | KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, |
95 | {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH}, | 96 | KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, |
96 | {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT }, | 97 | KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , |
97 | {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} | 98 | BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT |
98 | }, | 99 | ), |
99 | 100 | ||
100 | /* Lower | 101 | /* Lower |
101 | * ,-----------------------------------------------------------------------------------. | 102 | * ,-----------------------------------------------------------------------------------. |
@@ -108,12 +109,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
108 | * | | | | | | | | Next | Vol- | Vol+ | Play | | 109 | * | | | | | | | | Next | Vol- | Vol+ | Play | |
109 | * `-----------------------------------------------------------------------------------' | 110 | * `-----------------------------------------------------------------------------------' |
110 | */ | 111 | */ |
111 | [_LOWER] = { | 112 | [_LOWER] = LAYOUT_planck_grid( |
112 | {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, | 113 | KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, |
113 | {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, | 114 | KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, |
114 | {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______}, | 115 | _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, |
115 | {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} | 116 | _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY |
116 | }, | 117 | ), |
117 | 118 | ||
118 | /* Raise | 119 | /* Raise |
119 | * ,-----------------------------------------------------------------------------------. | 120 | * ,-----------------------------------------------------------------------------------. |
@@ -126,12 +127,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
126 | * | | | | | | | | Next | Vol- | Vol+ | Play | | 127 | * | | | | | | | | Next | Vol- | Vol+ | Play | |
127 | * `-----------------------------------------------------------------------------------' | 128 | * `-----------------------------------------------------------------------------------' |
128 | */ | 129 | */ |
129 | [_RAISE] = { | 130 | [_RAISE] = LAYOUT_planck_grid( |
130 | {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, | 131 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, |
131 | {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, | 132 | KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, |
132 | {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______}, | 133 | _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, |
133 | {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} | 134 | _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY |
134 | }, | 135 | ), |
135 | 136 | ||
136 | /* Plover layer (http://opensteno.org) | 137 | /* Plover layer (http://opensteno.org) |
137 | * ,-----------------------------------------------------------------------------------. | 138 | * ,-----------------------------------------------------------------------------------. |
@@ -145,12 +146,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
145 | * `-----------------------------------------------------------------------------------' | 146 | * `-----------------------------------------------------------------------------------' |
146 | */ | 147 | */ |
147 | 148 | ||
148 | [_PLOVER] = { | 149 | [_PLOVER] = LAYOUT_planck_grid( |
149 | {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, | 150 | KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , |
150 | {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, | 151 | XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, |
151 | {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, | 152 | XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, |
152 | {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} | 153 | EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX |
153 | }, | 154 | ), |
154 | 155 | ||
155 | /* Adjust (Lower + Raise) | 156 | /* Adjust (Lower + Raise) |
156 | * ,-----------------------------------------------------------------------------------. | 157 | * ,-----------------------------------------------------------------------------------. |
@@ -163,12 +164,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
163 | * | | | | | | | | | | | | | 164 | * | | | | | | | | | | | | |
164 | * `-----------------------------------------------------------------------------------' | 165 | * `-----------------------------------------------------------------------------------' |
165 | */ | 166 | */ |
166 | [_ADJUST] = { | 167 | [_ADJUST] = LAYOUT_planck_grid( |
167 | {_______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL }, | 168 | _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , |
168 | {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, | 169 | _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, |
169 | {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______}, | 170 | _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, |
170 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} | 171 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ |
171 | } | 172 | ) |
172 | 173 | ||
173 | 174 | ||
174 | }; | 175 | }; |
@@ -252,6 +253,81 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
252 | return true; | 253 | return true; |
253 | } | 254 | } |
254 | 255 | ||
256 | bool muse_mode = false; | ||
257 | uint8_t last_muse_note = 0; | ||
258 | uint16_t muse_counter = 0; | ||
259 | uint8_t muse_offset = 70; | ||
260 | uint16_t muse_tempo = 50; | ||
261 | |||
262 | void encoder_update(bool clockwise) { | ||
263 | if (muse_mode) { | ||
264 | if (IS_LAYER_ON(_RAISE)) { | ||
265 | if (clockwise) { | ||
266 | muse_offset++; | ||
267 | } else { | ||
268 | muse_offset--; | ||
269 | } | ||
270 | } else { | ||
271 | if (clockwise) { | ||
272 | muse_tempo+=1; | ||
273 | } else { | ||
274 | muse_tempo-=1; | ||
275 | } | ||
276 | } | ||
277 | } else { | ||
278 | if (clockwise) { | ||
279 | register_code(KC_PGDN); | ||
280 | unregister_code(KC_PGDN); | ||
281 | } else { | ||
282 | register_code(KC_PGUP); | ||
283 | unregister_code(KC_PGUP); | ||
284 | } | ||
285 | } | ||
286 | } | ||
287 | |||
288 | void dip_update(uint8_t index, bool active) { | ||
289 | switch (index) { | ||
290 | case 0: | ||
291 | if (active) { | ||
292 | #ifdef AUDIO_ENABLE | ||
293 | PLAY_SONG(plover_song); | ||
294 | #endif | ||
295 | layer_on(_ADJUST); | ||
296 | } else { | ||
297 | #ifdef AUDIO_ENABLE | ||
298 | PLAY_SONG(plover_gb_song); | ||
299 | #endif | ||
300 | layer_off(_ADJUST); | ||
301 | } | ||
302 | break; | ||
303 | case 1: | ||
304 | if (active) { | ||
305 | muse_mode = true; | ||
306 | } else { | ||
307 | muse_mode = false; | ||
308 | #ifdef AUDIO_ENABLE | ||
309 | stop_all_notes(); | ||
310 | #endif | ||
311 | } | ||
312 | } | ||
313 | } | ||
314 | |||
315 | void matrix_scan_user(void) { | ||
316 | #ifdef AUDIO_ENABLE | ||
317 | if (muse_mode) { | ||
318 | if (muse_counter == 0) { | ||
319 | uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; | ||
320 | if (muse_note != last_muse_note) { | ||
321 | stop_note(compute_freq_for_midi_note(last_muse_note)); | ||
322 | play_note(compute_freq_for_midi_note(muse_note), 0xF); | ||
323 | last_muse_note = muse_note; | ||
324 | } | ||
325 | } | ||
326 | muse_counter = (muse_counter + 1) % muse_tempo; | ||
327 | } | ||
328 | #endif | ||
329 | } | ||
330 | |||
255 | bool music_mask_user(uint16_t keycode) { | 331 | bool music_mask_user(uint16_t keycode) { |
256 | switch (keycode) { | 332 | switch (keycode) { |
257 | case RAISE: | 333 | case RAISE: |
diff --git a/keyboards/planck/keymaps/default/rules.mk b/keyboards/planck/keymaps/default/rules.mk index e69de29bb..dcf16bef3 100644 --- a/keyboards/planck/keymaps/default/rules.mk +++ b/keyboards/planck/keymaps/default/rules.mk | |||
@@ -0,0 +1 @@ | |||
SRC += muse.c | |||
diff --git a/keyboards/planck/keymaps/dlaroe/keymap.c b/keyboards/planck/keymaps/dlaroe/keymap.c index a2d5573ae..d9dab4f52 100644 --- a/keyboards/planck/keymaps/dlaroe/keymap.c +++ b/keyboards/planck/keymaps/dlaroe/keymap.c | |||
@@ -1,6 +1,7 @@ | |||
1 | // Can't Remember Sh*t Keymap for Planck | 1 | // Can't Remember Sh*t Keymap for Planck |
2 | // http://www.keyboard-layout-editor.com/#/gists/c6c0ac051b2b118a34ef84ebadab54c7 | 2 | // http://www.keyboard-layout-editor.com/#/gists/c6c0ac051b2b118a34ef84ebadab54c7 |
3 | 3 | ||
4 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
4 | #include "planck.h" | 5 | #include "planck.h" |
5 | #include "action_layer.h" | 6 | #include "action_layer.h" |
6 | #ifdef AUDIO_ENABLE | 7 | #ifdef AUDIO_ENABLE |
@@ -74,8 +75,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
74 | {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) }, | 75 | {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) }, |
75 | {KC_LCTL, KC_LGUI, KC_BSLS, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} | 76 | {KC_LCTL, KC_LGUI, KC_BSLS, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} |
76 | }, | 77 | }, |
77 | 78 | ||
78 | 79 | ||
79 | /* Game | 80 | /* Game |
80 | * ,-----------------------------------------------------------------------------------. | 81 | * ,-----------------------------------------------------------------------------------. |
81 | * | 1 | Q | W | E | R | T | Y | U | I | O | P | Bksp | | 82 | * | 1 | Q | W | E | R | T | Y | U | I | O | P | Bksp | |
diff --git a/keyboards/planck/keymaps/dodger/keymap.c b/keyboards/planck/keymaps/dodger/keymap.c index dd1e236e0..2dd6af266 100644 --- a/keyboards/planck/keymaps/dodger/keymap.c +++ b/keyboards/planck/keymaps/dodger/keymap.c | |||
@@ -14,6 +14,7 @@ | |||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
17 | #include "planck.h" | 18 | #include "planck.h" |
18 | #include "action_layer.h" | 19 | #include "action_layer.h" |
19 | 20 | ||
diff --git a/keyboards/planck/keymaps/dr0ck/keymap.c b/keyboards/planck/keymaps/dr0ck/keymap.c index ba7f313f6..2c6d02f23 100644 --- a/keyboards/planck/keymaps/dr0ck/keymap.c +++ b/keyboards/planck/keymaps/dr0ck/keymap.c | |||
@@ -14,6 +14,7 @@ | |||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
17 | #include "planck.h" | 18 | #include "planck.h" |
18 | #include "action_layer.h" | 19 | #include "action_layer.h" |
19 | 20 | ||
@@ -214,7 +215,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
214 | if (record->event.pressed) { | 215 | if (record->event.pressed) { |
215 | set_single_persistent_default_layer(_DVORAK); | 216 | set_single_persistent_default_layer(_DVORAK); |
216 | } | 217 | } |
217 | return false; | 218 | return false; |
218 | break; | 219 | break; |
219 | case LOWER: | 220 | case LOWER: |
220 | if (record->event.pressed) { | 221 | if (record->event.pressed) { |
@@ -285,4 +286,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
285 | break; | 286 | break; |
286 | } | 287 | } |
287 | return true; | 288 | return true; |
288 | } \ No newline at end of file | 289 | } |
diff --git a/keyboards/planck/keymaps/dr_notsokind/keymap.c b/keyboards/planck/keymaps/dr_notsokind/keymap.c index 8555a959a..f43fc37bc 100644 --- a/keyboards/planck/keymaps/dr_notsokind/keymap.c +++ b/keyboards/planck/keymaps/dr_notsokind/keymap.c | |||
@@ -1,5 +1,6 @@ | |||
1 | // Layout picture at http://www.keyboard-layout-editor.com/#/gists/125febfad6960add078e6f14256539b6 | 1 | // Layout picture at http://www.keyboard-layout-editor.com/#/gists/125febfad6960add078e6f14256539b6 |
2 | 2 | ||
3 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
3 | #include "planck.h" | 4 | #include "planck.h" |
4 | #include "action_layer.h" | 5 | #include "action_layer.h" |
5 | #ifdef AUDIO_ENABLE | 6 | #ifdef AUDIO_ENABLE |
@@ -23,19 +24,19 @@ extern keymap_config_t keymap_config; | |||
23 | #define _ONESHOT 7 | 24 | #define _ONESHOT 7 |
24 | 25 | ||
25 | enum planck_keycodes { | 26 | enum planck_keycodes { |
26 | QWERTY = SAFE_RANGE, | 27 | QWERTY = SAFE_RANGE, |
27 | NUMPAD, | 28 | NUMPAD, |
28 | RAISE, | 29 | RAISE, |
29 | LOWER, | 30 | LOWER, |
30 | MEDIA, | 31 | MEDIA, |
31 | ONESHOT, | 32 | ONESHOT, |
32 | DYNAMIC_MACRO_RANGE | 33 | DYNAMIC_MACRO_RANGE |
33 | }; | 34 | }; |
34 | 35 | ||
35 | #include "dynamic_macro.h" | 36 | #include "dynamic_macro.h" |
36 | 37 | ||
37 | // Key code names | 38 | // Key code names |
38 | #define SFT_ENT FUNC(0) // Tap for enter, hold for right shift | 39 | #define SFT_ENT FUNC(0) // Tap for enter, hold for right shift |
39 | #define LOCK FUNC(1) | 40 | #define LOCK FUNC(1) |
40 | #define KC_PSTE KC_PASTE | 41 | #define KC_PSTE KC_PASTE |
41 | #define _______ KC_TRNS | 42 | #define _______ KC_TRNS |
@@ -45,7 +46,7 @@ enum planck_keycodes { | |||
45 | #define ZOOM_NML LCTL(KC_0) | 46 | #define ZOOM_NML LCTL(KC_0) |
46 | 47 | ||
47 | #ifdef TAP_DANCE_ENABLE | 48 | #ifdef TAP_DANCE_ENABLE |
48 | #define SFT_CAP TD(0) // Left shift, double tap for caps | 49 | #define SFT_CAP TD(0) // Left shift, double tap for caps |
49 | #endif | 50 | #endif |
50 | #ifndef TAP_DANCE_ENABLE | 51 | #ifndef TAP_DANCE_ENABLE |
51 | #define SFT_CAP KC_LSFT // Regular left shift | 52 | #define SFT_CAP KC_LSFT // Regular left shift |
@@ -54,14 +55,14 @@ enum planck_keycodes { | |||
54 | // Tap Dance Definitions | 55 | // Tap Dance Definitions |
55 | #ifdef TAP_DANCE_ENABLE | 56 | #ifdef TAP_DANCE_ENABLE |
56 | qk_tap_dance_action_t tap_dance_actions[] = { | 57 | qk_tap_dance_action_t tap_dance_actions[] = { |
57 | [0] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS) | 58 | [0] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS) |
58 | }; | 59 | }; |
59 | #endif | 60 | #endif |
60 | 61 | ||
61 | // Function definitions | 62 | // Function definitions |
62 | const uint16_t PROGMEM fn_actions[] = { | 63 | const uint16_t PROGMEM fn_actions[] = { |
63 | [0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), | 64 | [0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), |
64 | [1] = ACTION_LAYER_TOGGLE(_LOCKED) | 65 | [1] = ACTION_LAYER_TOGGLE(_LOCKED) |
65 | }; | 66 | }; |
66 | 67 | ||
67 | // Layout definitions | 68 | // Layout definitions |
@@ -79,10 +80,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
79 | * `-----------------------------------------------------------------------------------' | 80 | * `-----------------------------------------------------------------------------------' |
80 | */ | 81 | */ |
81 | [_QWERTY] = { | 82 | [_QWERTY] = { |
82 | {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, | 83 | {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, |
83 | {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, | 84 | {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, |
84 | {SFT_CAP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, SFT_ENT}, | 85 | {SFT_CAP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, SFT_ENT}, |
85 | {KC_LCTL, KC_LGUI, KC_LALT, MEDIA, LOWER, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT} | 86 | {KC_LCTL, KC_LGUI, KC_LALT, MEDIA, LOWER, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT} |
86 | }, | 87 | }, |
87 | 88 | ||
88 | /* NUMPAD | 89 | /* NUMPAD |
@@ -115,10 +116,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
115 | * `-----------------------------------------------------------------------------------' | 116 | * `-----------------------------------------------------------------------------------' |
116 | */ | 117 | */ |
117 | [_LOCKED] = { | 118 | [_LOCKED] = { |
118 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, | 119 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, |
119 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, | 120 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, |
120 | {KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT}, | 121 | {KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT}, |
121 | {_______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} | 122 | {_______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} |
122 | }, | 123 | }, |
123 | 124 | ||
124 | /* RAISE | 125 | /* RAISE |
@@ -169,10 +170,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
169 | * `-----------------------------------------------------------------------------------' | 170 | * `-----------------------------------------------------------------------------------' |
170 | */ | 171 | */ |
171 | [_MEDIA] = { | 172 | [_MEDIA] = { |
172 | {XXXXXXX, XXXXXXX, KC_WHOM, XXXXXXX, XXXXXXX, XXXXXXX, KC_AGAIN, XXXXXXX, KC_INS, XXXXXXX, KC_PSCR, XXXXXXX}, | 173 | {XXXXXXX, XXXXXXX, KC_WHOM, XXXXXXX, XXXXXXX, XXXXXXX, KC_AGAIN, XXXXXXX, KC_INS, XXXXXXX, KC_PSCR, XXXXXXX}, |
173 | {XXXXXXX, XXXXXXX, KC_WSCH, XXXXXXX, KC_FIND, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2 }, | 174 | {XXXXXXX, XXXXXXX, KC_WSCH, XXXXXXX, KC_FIND, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2 }, |
174 | {KC_LSFT, XXXXXXX, XXXXXXX, KC_CALC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ZOOM_OUT, ZOOM_IN, KC_MPRV, DYN_REC_STOP }, | 175 | {KC_LSFT, XXXXXXX, XXXXXXX, KC_CALC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ZOOM_OUT, ZOOM_IN, KC_MPRV, DYN_REC_STOP }, |
175 | {ONESHOT, XXXXXXX, XXXXXXX, _______, KC_VOLD, KC_MUTE, KC_MUTE, KC_VOLU, ZOOM_NML, KC_MSTP, KC_MNXT, KC_MPLY } | 176 | {ONESHOT, XXXXXXX, XXXXXXX, _______, KC_VOLD, KC_MUTE, KC_MUTE, KC_VOLU, ZOOM_NML, KC_MSTP, KC_MNXT, KC_MPLY } |
176 | }, | 177 | }, |
177 | 178 | ||
178 | /* ONESHOT | 179 | /* ONESHOT |
@@ -187,10 +188,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
187 | * `-----------------------------------------------------------------------------------' | 188 | * `-----------------------------------------------------------------------------------' |
188 | */ | 189 | */ |
189 | [_ONESHOT] = { | 190 | [_ONESHOT] = { |
190 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, | 191 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, |
191 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2}, | 192 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2}, |
192 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, | 193 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, |
193 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} | 194 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} |
194 | }, | 195 | }, |
195 | 196 | ||
196 | /* FUNCTIONS | 197 | /* FUNCTIONS |
@@ -205,10 +206,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
205 | * `-----------------------------------------------------------------------------------' | 206 | * `-----------------------------------------------------------------------------------' |
206 | */ | 207 | */ |
207 | [_FUNCTN] = { | 208 | [_FUNCTN] = { |
208 | {KC_SLEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PWR }, | 209 | {KC_SLEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PWR }, |
209 | {KC_WAKE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, | 210 | {KC_WAKE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, |
210 | {XXXXXXX, XXXXXXX, XXXXXXX, AU_OFF, MU_OFF, QWERTY, NUMPAD, MU_ON, AU_ON, XXXXXXX, MUV_IN, KC_SYSREQ}, | 211 | {XXXXXXX, XXXXXXX, XXXXXXX, AU_OFF, MU_OFF, QWERTY, NUMPAD, MU_ON, AU_ON, XXXXXXX, MUV_IN, KC_SYSREQ}, |
211 | {RESET, XXXXXXX, LOCK, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, AG_NORM, MUV_DE, AG_SWAP} | 212 | {RESET, XXXXXXX, LOCK, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, AG_NORM, MUV_DE, AG_SWAP} |
212 | } | 213 | } |
213 | 214 | ||
214 | }; | 215 | }; |
@@ -227,95 +228,95 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND); | |||
227 | void press_key(uint16_t key) { | 228 | void press_key(uint16_t key) { |
228 | register_code(key); | 229 | register_code(key); |
229 | unregister_code(key); | 230 | unregister_code(key); |
230 | } | 231 | } |
231 | 232 | ||
232 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 233 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
233 | // uint16_t macro_kc = (keycode == ONESHOT ? DYN_REC_STOP : keycode); | 234 | // uint16_t macro_kc = (keycode == ONESHOT ? DYN_REC_STOP : keycode); |
234 | if (!process_record_dynamic_macro(keycode, record)) { | 235 | if (!process_record_dynamic_macro(keycode, record)) { |
235 | switch(keycode) { | 236 | switch(keycode) { |
236 | case DYN_REC_START1: | 237 | case DYN_REC_START1: |
237 | case DYN_REC_START2: | 238 | case DYN_REC_START2: |
238 | #ifdef AUDIO_ENABLE | 239 | #ifdef AUDIO_ENABLE |
239 | PLAY_SONG(tone_dyn_macro_rec); | 240 | PLAY_SONG(tone_dyn_macro_rec); |
240 | #endif | 241 | #endif |
241 | break; | 242 | break; |
242 | case DYN_REC_STOP: | 243 | case DYN_REC_STOP: |
243 | #ifdef AUDIO_ENABLE | 244 | #ifdef AUDIO_ENABLE |
244 | PLAY_SONG(tone_dyn_macro_stop); | 245 | PLAY_SONG(tone_dyn_macro_stop); |
245 | #endif | 246 | #endif |
246 | break; | 247 | break; |
247 | } | 248 | } |
248 | return false; | 249 | return false; |
249 | } | 250 | } |
250 | switch (keycode) { | 251 | switch (keycode) { |
251 | case ONESHOT: | 252 | case ONESHOT: |
252 | if (record->event.pressed) { | 253 | if (record->event.pressed) { |
253 | layer_on(_ONESHOT); | 254 | layer_on(_ONESHOT); |
254 | set_oneshot_layer(_ONESHOT, ONESHOT_START); | 255 | set_oneshot_layer(_ONESHOT, ONESHOT_START); |
255 | clear_oneshot_layer_state(ONESHOT_PRESSED); | 256 | clear_oneshot_layer_state(ONESHOT_PRESSED); |
256 | #ifdef AUDIO_ENABLE | 257 | #ifdef AUDIO_ENABLE |
257 | PLAY_SONG(tone_oneshot); | 258 | PLAY_SONG(tone_oneshot); |
258 | #endif | 259 | #endif |
259 | } | 260 | } |
260 | return false; | 261 | return false; |
261 | break; | 262 | break; |
262 | case QWERTY: | 263 | case QWERTY: |
263 | if (record->event.pressed) { | 264 | if (record->event.pressed) { |
264 | if (IS_LAYER_ON(_NUMPAD)) { | 265 | if (IS_LAYER_ON(_NUMPAD)) { |
265 | #ifdef AUDIO_ENABLE | 266 | #ifdef AUDIO_ENABLE |
266 | PLAY_SONG(tone_qwerty); | 267 | PLAY_SONG(tone_qwerty); |
267 | #endif | 268 | #endif |
268 | layer_off(_NUMPAD); | 269 | layer_off(_NUMPAD); |
269 | } | 270 | } |
270 | } | 271 | } |
271 | return false; | 272 | return false; |
272 | break; | 273 | break; |
273 | case NUMPAD: | 274 | case NUMPAD: |
274 | if (record->event.pressed) { | 275 | if (record->event.pressed) { |
275 | if (!IS_LAYER_ON(_NUMPAD)) { | 276 | if (!IS_LAYER_ON(_NUMPAD)) { |
276 | #ifdef AUDIO_ENABLE | 277 | #ifdef AUDIO_ENABLE |
277 | PLAY_SONG(tone_numpad); | 278 | PLAY_SONG(tone_numpad); |
278 | #endif | 279 | #endif |
279 | layer_on(_NUMPAD); | 280 | layer_on(_NUMPAD); |
280 | } | 281 | } |
281 | } | 282 | } |
282 | return false; | 283 | return false; |
283 | break; | 284 | break; |
284 | case RAISE: | 285 | case RAISE: |
285 | if (record->event.pressed) { | 286 | if (record->event.pressed) { |
286 | layer_on(_RAISE); | 287 | layer_on(_RAISE); |
287 | update_tri_layer(_RAISE, _LOWER, _FUNCTN); | 288 | update_tri_layer(_RAISE, _LOWER, _FUNCTN); |
288 | } else { | 289 | } else { |
289 | layer_off(_RAISE); | 290 | layer_off(_RAISE); |
290 | update_tri_layer(_RAISE, _LOWER, _FUNCTN); | 291 | update_tri_layer(_RAISE, _LOWER, _FUNCTN); |
291 | } | 292 | } |
292 | return false; | 293 | return false; |
293 | break; | 294 | break; |
294 | case LOWER: | 295 | case LOWER: |
295 | if (record->event.pressed) { | 296 | if (record->event.pressed) { |
296 | layer_on(_LOWER); | 297 | layer_on(_LOWER); |
297 | update_tri_layer(_RAISE, _LOWER, _FUNCTN); | 298 | update_tri_layer(_RAISE, _LOWER, _FUNCTN); |
298 | } else { | 299 | } else { |
299 | layer_off(_LOWER); | 300 | layer_off(_LOWER); |
300 | update_tri_layer(_RAISE, _LOWER, _FUNCTN); | 301 | update_tri_layer(_RAISE, _LOWER, _FUNCTN); |
301 | } | 302 | } |
302 | return false; | 303 | return false; |
303 | break; | 304 | break; |
304 | case MEDIA: | 305 | case MEDIA: |
305 | if (record->event.pressed) { | 306 | if (record->event.pressed) { |
306 | layer_on(_MEDIA); | 307 | layer_on(_MEDIA); |
307 | } else { | 308 | } else { |
308 | layer_off(_MEDIA); | 309 | layer_off(_MEDIA); |
309 | } | 310 | } |
310 | return false; | 311 | return false; |
311 | break; | 312 | break; |
312 | } | 313 | } |
313 | return true; | 314 | return true; |
314 | } | 315 | } |
315 | 316 | ||
316 | void matrix_init_user(void) { | 317 | void matrix_init_user(void) { |
317 | #ifdef AUDIO_ENABLE | 318 | #ifdef AUDIO_ENABLE |
318 | startup_user(); | 319 | startup_user(); |
319 | #endif | 320 | #endif |
320 | } | 321 | } |
321 | 322 | ||
@@ -323,25 +324,25 @@ void matrix_init_user(void) { | |||
323 | 324 | ||
324 | void startup_user() | 325 | void startup_user() |
325 | { | 326 | { |
326 | _delay_ms(20); // gets rid of tick | 327 | _delay_ms(20); // gets rid of tick |
327 | PLAY_SONG(tone_startup); | 328 | PLAY_SONG(tone_startup); |
328 | } | 329 | } |
329 | 330 | ||
330 | void shutdown_user() | 331 | void shutdown_user() |
331 | { | 332 | { |
332 | PLAY_SONG(tone_goodbye); | 333 | PLAY_SONG(tone_goodbye); |
333 | _delay_ms(150); | 334 | _delay_ms(150); |
334 | stop_all_notes(); | 335 | stop_all_notes(); |
335 | } | 336 | } |
336 | 337 | ||
337 | void music_on_user(void) | 338 | void music_on_user(void) |
338 | { | 339 | { |
339 | music_scale_user(); | 340 | music_scale_user(); |
340 | } | 341 | } |
341 | 342 | ||
342 | void music_scale_user(void) | 343 | void music_scale_user(void) |
343 | { | 344 | { |
344 | PLAY_SONG(music_scale); | 345 | PLAY_SONG(music_scale); |
345 | } | 346 | } |
346 | 347 | ||
347 | #endif | 348 | #endif |
diff --git a/keyboards/planck/keymaps/dshields/keymap.c b/keyboards/planck/keymaps/dshields/keymap.c index a99777917..d7276a4a5 100644 --- a/keyboards/planck/keymaps/dshields/keymap.c +++ b/keyboards/planck/keymaps/dshields/keymap.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
1 | #include "planck.h" | 2 | #include "planck.h" |
2 | #include "backlight.h" | 3 | #include "backlight.h" |
3 | #include "config.h" | 4 | #include "config.h" |
diff --git a/keyboards/planck/keymaps/dudeofawesome/keymap.c b/keyboards/planck/keymaps/dudeofawesome/keymap.c index 55ef0e39b..ab1dd5f1e 100644 --- a/keyboards/planck/keymaps/dudeofawesome/keymap.c +++ b/keyboards/planck/keymaps/dudeofawesome/keymap.c | |||
@@ -14,6 +14,7 @@ | |||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
17 | #include "planck.h" | 18 | #include "planck.h" |
18 | #include "action_layer.h" | 19 | #include "action_layer.h" |
19 | #include "eeconfig.h" | 20 | #include "eeconfig.h" |
diff --git a/keyboards/planck/keymaps/emilyh/keymap.c b/keyboards/planck/keymaps/emilyh/keymap.c index cfc4bebae..28bee6243 100644 --- a/keyboards/planck/keymaps/emilyh/keymap.c +++ b/keyboards/planck/keymaps/emilyh/keymap.c | |||
@@ -1,6 +1,7 @@ | |||
1 | // This is the canonical layout file for the Quantum project. If you want to add another keyboard, | 1 | // This is the canonical layout file for the Quantum project. If you want to add another keyboard, |
2 | // this is the style you want to emulate. | 2 | // this is the style you want to emulate. |
3 | 3 | ||
4 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
4 | #include "planck.h" | 5 | #include "planck.h" |
5 | #include "action_layer.h" | 6 | #include "action_layer.h" |
6 | #ifdef AUDIO_ENABLE | 7 | #ifdef AUDIO_ENABLE |
@@ -132,7 +133,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
132 | {_______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_MPRV, KC_VOLD, KC_MPLY} | 133 | {_______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_MPRV, KC_VOLD, KC_MPLY} |
133 | }, | 134 | }, |
134 | 135 | ||
135 | /* Numpad Layer | 136 | /* Numpad Layer |
136 | * ,-----------------------------------------------------------------------------------. | 137 | * ,-----------------------------------------------------------------------------------. |
137 | * | ESC | | | ( | ) | | | 7 | 8 | 9 | + | Bksp | | 138 | * | ESC | | | ( | ) | | | 7 | 8 | 9 | + | Bksp | |
138 | * |------+------+------+------+------+-------------+------+------+------+------+------| | 139 | * |------+------+------+------+------+-------------+------+------+------+------+------| |
diff --git a/keyboards/planck/keymaps/espynn/keymap.c b/keyboards/planck/keymaps/espynn/keymap.c index feb962331..9cf508af6 100644 --- a/keyboards/planck/keymaps/espynn/keymap.c +++ b/keyboards/planck/keymaps/espynn/keymap.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
1 | #include "planck.h" | 2 | #include "planck.h" |
2 | #include "action_layer.h" | 3 | #include "action_layer.h" |
3 | #include "eeconfig.h" | 4 | #include "eeconfig.h" |
@@ -138,14 +139,14 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
138 | return MACRODOWN( DOWN(KC_LSFT), TYPE(KC_I), UP(KC_LSFT), END ); | 139 | return MACRODOWN( DOWN(KC_LSFT), TYPE(KC_I), UP(KC_LSFT), END ); |
139 | case _CUS5: // Enter your email here | 140 | case _CUS5: // Enter your email here |
140 | return MACRODOWN( TYPE(KC_F), | 141 | return MACRODOWN( TYPE(KC_F), |
141 | DOWN(KC_LSFT), TYPE(KC_2), UP(KC_LSFT), | 142 | DOWN(KC_LSFT), TYPE(KC_2), UP(KC_LSFT), |
142 | TYPE(KC_G), TYPE(KC_M), TYPE(KC_A), TYPE(KC_I), TYPE(KC_L), TYPE(KC_DOT), TYPE(KC_C), TYPE(KC_O), TYPE(KC_M), END ); | 143 | TYPE(KC_G), TYPE(KC_M), TYPE(KC_A), TYPE(KC_I), TYPE(KC_L), TYPE(KC_DOT), TYPE(KC_C), TYPE(KC_O), TYPE(KC_M), END ); |
143 | case _CUT: //cut macro | 144 | case _CUT: //cut macro |
144 | return MACRODOWN( DOWN(KC_LCTL), TYPE(KC_X), UP(KC_LCTL), END ); | 145 | return MACRODOWN( DOWN(KC_LCTL), TYPE(KC_X), UP(KC_LCTL), END ); |
145 | case _COPY: // copy macro | 146 | case _COPY: // copy macro |
146 | return MACRODOWN( DOWN(KC_LCTL), TYPE(KC_C), UP(KC_LCTL), END ); | 147 | return MACRODOWN( DOWN(KC_LCTL), TYPE(KC_C), UP(KC_LCTL), END ); |
147 | case _PASTE: // paste macro | 148 | case _PASTE: // paste macro |
148 | return MACRODOWN( DOWN(KC_LCTL), TYPE(KC_V), UP(KC_LCTL), END ); | 149 | return MACRODOWN( DOWN(KC_LCTL), TYPE(KC_V), UP(KC_LCTL), END ); |
149 | }; | 150 | }; |
150 | return MACRO_NONE; | 151 | return MACRO_NONE; |
151 | } \ No newline at end of file | 152 | } |
diff --git a/keyboards/planck/keymaps/experimental/keymap.c b/keyboards/planck/keymaps/experimental/keymap.c index 8ddb3d465..86ce3a293 100644 --- a/keyboards/planck/keymaps/experimental/keymap.c +++ b/keyboards/planck/keymaps/experimental/keymap.c | |||
@@ -1,4 +1,5 @@ | |||
1 | 1 | ||
2 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
2 | #include "planck.h" | 3 | #include "planck.h" |
3 | #include "action_layer.h" | 4 | #include "action_layer.h" |
4 | #include "keymap_steno.h" | 5 | #include "keymap_steno.h" |
diff --git a/keyboards/planck/keymaps/fabian/keymap.c b/keyboards/planck/keymaps/fabian/keymap.c index 39a423862..5756a9716 100644 --- a/keyboards/planck/keymaps/fabian/keymap.c +++ b/keyboards/planck/keymaps/fabian/keymap.c | |||
@@ -14,6 +14,7 @@ | |||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
17 | #include "planck.h" | 18 | #include "planck.h" |
18 | #include "action_layer.h" | 19 | #include "action_layer.h" |
19 | 20 | ||
diff --git a/keyboards/planck/keymaps/gabriel/keymap.c b/keyboards/planck/keymaps/gabriel/keymap.c index 805484488..cbb44f68a 100644 --- a/keyboards/planck/keymaps/gabriel/keymap.c +++ b/keyboards/planck/keymaps/gabriel/keymap.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
1 | #include "planck.h" | 2 | #include "planck.h" |
2 | 3 | ||
3 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | 4 | // Each layer gets a name for readability, which is then used in the keymap matrix below. |
diff --git a/keyboards/planck/keymaps/grahampheath/keymap.c b/keyboards/planck/keymaps/grahampheath/keymap.c index 96d900018..51b8617ad 100644 --- a/keyboards/planck/keymaps/grahampheath/keymap.c +++ b/keyboards/planck/keymaps/grahampheath/keymap.c | |||
@@ -13,6 +13,7 @@ | |||
13 | * You should have received a copy of the GNU General Public License | 13 | * You should have received a copy of the GNU General Public License |
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
16 | #include "planck.h" | 17 | #include "planck.h" |
17 | #include "action_layer.h" | 18 | #include "action_layer.h" |
18 | #include "action_code.h" | 19 | #include "action_code.h" |
diff --git a/keyboards/planck/keymaps/guidoism/keymap.c b/keyboards/planck/keymaps/guidoism/keymap.c index 5251b23c6..d644ac970 100644 --- a/keyboards/planck/keymaps/guidoism/keymap.c +++ b/keyboards/planck/keymaps/guidoism/keymap.c | |||
@@ -14,6 +14,7 @@ | |||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
17 | #include "planck.h" | 18 | #include "planck.h" |
18 | #include "action_layer.h" | 19 | #include "action_layer.h" |
19 | 20 | ||
diff --git a/keyboards/planck/keymaps/gunp/keymap.c b/keyboards/planck/keymaps/gunp/keymap.c index 1826c1e15..49776cefe 100644 --- a/keyboards/planck/keymaps/gunp/keymap.c +++ b/keyboards/planck/keymaps/gunp/keymap.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | /* modified by Gun Pinyo */ | 17 | /* modified by Gun Pinyo */ |
18 | 18 | ||
19 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
19 | #include "planck.h" | 20 | #include "planck.h" |
20 | #include "action_layer.h" | 21 | #include "action_layer.h" |
21 | 22 | ||
diff --git a/keyboards/planck/keymaps/handwired_binaryplease/keymap.c b/keyboards/planck/keymaps/handwired_binaryplease/keymap.c index 73ccf62c0..704c65638 100644 --- a/keyboards/planck/keymaps/handwired_binaryplease/keymap.c +++ b/keyboards/planck/keymaps/handwired_binaryplease/keymap.c | |||
@@ -1,4 +1,5 @@ | |||
1 | 1 | ||
2 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
2 | #include "planck.h" | 3 | #include "planck.h" |
3 | #include "action_layer.h" | 4 | #include "action_layer.h" |
4 | #ifdef AUDIO_ENABLE | 5 | #ifdef AUDIO_ENABLE |
diff --git a/keyboards/planck/keymaps/hiea/keymap.c b/keyboards/planck/keymaps/hiea/keymap.c index 2f573f9a4..2bc54b7a6 100644 --- a/keyboards/planck/keymaps/hiea/keymap.c +++ b/keyboards/planck/keymaps/hiea/keymap.c | |||
@@ -67,6 +67,7 @@ | |||
67 | 67 | ||
68 | 68 | ||
69 | #include "config.h" | 69 | #include "config.h" |
70 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
70 | #include "planck.h" | 71 | #include "planck.h" |
71 | #include "action_layer.h" | 72 | #include "action_layer.h" |
72 | #ifdef STENO_ENABLE | 73 | #ifdef STENO_ENABLE |
diff --git a/keyboards/planck/keymaps/hieax/keymap.c b/keyboards/planck/keymaps/hieax/keymap.c index d761ee677..3f8669587 100644 --- a/keyboards/planck/keymaps/hieax/keymap.c +++ b/keyboards/planck/keymaps/hieax/keymap.c | |||
@@ -67,6 +67,7 @@ | |||
67 | 67 | ||
68 | 68 | ||
69 | #include "config.h" | 69 | #include "config.h" |
70 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
70 | #include "planck.h" | 71 | #include "planck.h" |
71 | #include "action_layer.h" | 72 | #include "action_layer.h" |
72 | #ifdef STENO_ENABLE | 73 | #ifdef STENO_ENABLE |
diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 0e6f37ed5..119e547da 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c | |||
@@ -1,4 +1,5 @@ | |||
1 | 1 | ||
2 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
2 | #include "planck.h" | 3 | #include "planck.h" |
3 | #include "action_layer.h" | 4 | #include "action_layer.h" |
4 | #ifdef AUDIO_ENABLE | 5 | #ifdef AUDIO_ENABLE |
diff --git a/keyboards/planck/keymaps/ishtob/keymap.c b/keyboards/planck/keymaps/ishtob/keymap.c index f4ca435f0..be74a0d51 100644 --- a/keyboards/planck/keymaps/ishtob/keymap.c +++ b/keyboards/planck/keymaps/ishtob/keymap.c | |||
@@ -1,6 +1,7 @@ | |||
1 | // This is the canonical layout file for the Quantum project. If you want to add another keyboard, | 1 | // This is the canonical layout file for the Quantum project. If you want to add another keyboard, |
2 | // this is the style you want to emulate. | 2 | // this is the style you want to emulate. |
3 | 3 | ||
4 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
4 | #include "planck.h" | 5 | #include "planck.h" |
5 | #include "action_layer.h" | 6 | #include "action_layer.h" |
6 | // #include "dynamic_macro.h" | 7 | // #include "dynamic_macro.h" |
@@ -85,7 +86,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
85 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, LT_RAI(KC_MINS), | 86 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, LT_RAI(KC_MINS), |
86 | KC_ESC, KC_CAPS, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_RALT, TG_NUMLAY, KC_APP, KC_DEL | 87 | KC_ESC, KC_CAPS, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_RALT, TG_NUMLAY, KC_APP, KC_DEL |
87 | ), | 88 | ), |
88 | 89 | ||
89 | /* Colemak | 90 | /* Colemak |
90 | * ,-----------------------------------------------------------------------------------. | 91 | * ,-----------------------------------------------------------------------------------. |
91 | * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | | 92 | * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | |
@@ -103,7 +104,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
103 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, LT_RAI(KC_MINS), | 104 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, LT_RAI(KC_MINS), |
104 | KC_ESC, KC_CAPS, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_RALT, TG_NUMLAY, KC_APP, KC_DEL | 105 | KC_ESC, KC_CAPS, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_RALT, TG_NUMLAY, KC_APP, KC_DEL |
105 | ), | 106 | ), |
106 | 107 | ||
107 | /* Dvorak | 108 | /* Dvorak |
108 | * ,-----------------------------------------------------------------------------------. | 109 | * ,-----------------------------------------------------------------------------------. |
109 | * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | | 110 | * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | |
@@ -121,7 +122,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
121 | KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, LT_RAI(KC_MINS), | 122 | KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, LT_RAI(KC_MINS), |
122 | KC_ESC, KC_CAPS, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_RALT, TG_NUMLAY, KC_APP, KC_DEL | 123 | KC_ESC, KC_CAPS, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_RALT, TG_NUMLAY, KC_APP, KC_DEL |
123 | ), | 124 | ), |
124 | 125 | ||
125 | /* Lower | 126 | /* Lower |
126 | * ,-----------------------------------------------------------------------------------. | 127 | * ,-----------------------------------------------------------------------------------. |
127 | * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ~ | \ | | 128 | * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ~ | \ | |
@@ -139,7 +140,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
139 | _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_LCBR, KC_RCBR, _______, | 140 | _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_LCBR, KC_RCBR, _______, |
140 | _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY | 141 | _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY |
141 | ), | 142 | ), |
142 | 143 | ||
143 | /* Raise | 144 | /* Raise |
144 | * ,-----------------------------------------------------------------------------------. | 145 | * ,-----------------------------------------------------------------------------------. |
145 | * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | * | \ | | 146 | * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | * | \ | |
@@ -157,7 +158,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
157 | _______, KC_LEFT, KC_DOWN, KC_RIGHT,KC__MUTE, KC_VOLD, KC_1, KC_2, KC_3, KC_UP, KC_SLSH, _______, | 158 | _______, KC_LEFT, KC_DOWN, KC_RIGHT,KC__MUTE, KC_VOLD, KC_1, KC_2, KC_3, KC_UP, KC_SLSH, _______, |
158 | _______, _______, _______, _______, _______, KC_SPC, KC_0, _______, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NLCK | 159 | _______, _______, _______, _______, _______, KC_SPC, KC_0, _______, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NLCK |
159 | ), | 160 | ), |
160 | 161 | ||
161 | /* Plover layer (http://opensteno.org) | 162 | /* Plover layer (http://opensteno.org) |
162 | * ,-----------------------------------------------------------------------------------. | 163 | * ,-----------------------------------------------------------------------------------. |
163 | * | # | # | # | # | # | # | # | # | # | # | # | # | | 164 | * | # | # | # | # | # | # | # | # | # | # | # | # | |
@@ -169,14 +170,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
169 | * | Exit | | | A | O | | E | U | | | | | 170 | * | Exit | | | A | O | | E | U | | | | |
170 | * `-----------------------------------------------------------------------------------' | 171 | * `-----------------------------------------------------------------------------------' |
171 | */ | 172 | */ |
172 | 173 | ||
173 | [_PLOVER] = LAYOUT_planck_grid( | 174 | [_PLOVER] = LAYOUT_planck_grid( |
174 | KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , | 175 | KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , |
175 | XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, | 176 | XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, |
176 | XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, | 177 | XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, |
177 | EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX | 178 | EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX |
178 | ), | 179 | ), |
179 | 180 | ||
180 | /* FN layer on Esc key | 181 | /* FN layer on Esc key |
181 | * ,-----------------------------------------------------------------------------------. | 182 | * ,-----------------------------------------------------------------------------------. |
182 | * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | + | | 183 | * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | + | |
@@ -194,7 +195,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
194 | _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_LCBR, KC_RCBR, _______, | 195 | _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_LCBR, KC_RCBR, _______, |
195 | _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY | 196 | _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY |
196 | ), | 197 | ), |
197 | 198 | ||
198 | /* Num Layer | 199 | /* Num Layer |
199 | * ,-----------------------------------------------------------------------------------. | 200 | * ,-----------------------------------------------------------------------------------. |
200 | * | | Q | Up | 4 | | | 7 | 8 | 9 | - | + | Bksp | | 201 | * | | Q | Up | 4 | | | 7 | 8 | 9 | - | + | Bksp | |
@@ -212,7 +213,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
212 | _______, KC_Z, KC_X, KC_C, KC_V, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_PDOT, KC_PSLS, _______, | 213 | _______, KC_Z, KC_X, KC_C, KC_V, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_PDOT, KC_PSLS, _______, |
213 | _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, _______, _______, KC_NLCK, KC_MPLY | 214 | _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, _______, _______, KC_NLCK, KC_MPLY |
214 | ), | 215 | ), |
215 | 216 | ||
216 | /* Mouse Layer (semi-col) | 217 | /* Mouse Layer (semi-col) |
217 | * ,-----------------------------------------------------------------------------------. | 218 | * ,-----------------------------------------------------------------------------------. |
218 | * | ACCL0| ACCL1| ACCL2|Email |Email2| Home | Wh_Up| WHL_L| M_Up | WHL_R|PASS| Meta | | 219 | * | ACCL0| ACCL1| ACCL2|Email |Email2| Home | Wh_Up| WHL_L| M_Up | WHL_R|PASS| Meta | |
@@ -224,14 +225,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
224 | * | | | | | | BTN1 | | | | Citx | | | 225 | * | | | | | | BTN1 | | | | Citx | | |
225 | * `-----------------------------------------------------------------------------------' | 226 | * `-----------------------------------------------------------------------------------' |
226 | */ | 227 | */ |
227 | 228 | ||
228 | [_MOUSECURSOR] = LAYOUT_planck_grid( | 229 | [_MOUSECURSOR] = LAYOUT_planck_grid( |
229 | KC_ACL0, KC_ACL1, KC_ACL2, M_EMAIL,M_EMAIL2, KC_HOME, KC_PGUP, KC_WH_L, KC_MS_U, KC_WH_R, P_MPASS, P_META, | 230 | KC_ACL0, KC_ACL1, KC_ACL2, M_EMAIL,M_EMAIL2, KC_HOME, KC_PGUP, KC_WH_L, KC_MS_U, KC_WH_R, P_MPASS, P_META, |
230 | _______, XXXXXXX, XXXXXXX, XXXXXXX, O_RTQ6H, KC_END , KC_PGDN, KC_MS_L, KC_MS_D, KC_MS_R, _______, O_DAYRN, | 231 | _______, XXXXXXX, XXXXXXX, XXXXXXX, O_RTQ6H, KC_END , KC_PGDN, KC_MS_L, KC_MS_D, KC_MS_R, _______, O_DAYRN, |
231 | _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_BTN2, KC_BTN3, KC_BTN4, KC_BTN5, _______, _______, | 232 | _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_BTN2, KC_BTN3, KC_BTN4, KC_BTN5, _______, _______, |
232 | _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, P_CITRIX, O_AUTODC | 233 | _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, P_CITRIX, O_AUTODC |
233 | ), | 234 | ), |
234 | 235 | ||
235 | /* Adjust (Lower + Raise) | 236 | /* Adjust (Lower + Raise) |
236 | * ,-----------------------------------------------------------------------------------. | 237 | * ,-----------------------------------------------------------------------------------. |
237 | * | Reset|RGB TG|RGB ST|RGBH -|RGBH +|RGBS -|RGBS +|RGBV -|RGBV +| | | Del | | 238 | * | Reset|RGB TG|RGB ST|RGBH -|RGBH +|RGBS -|RGBS +|RGBV -|RGBV +| | | Del | |
@@ -249,7 +250,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
249 | _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, | 250 | _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, |
250 | _______, _______, _______, _______, _______, _______, _______, _______, CK_RST, CK_DOWN, CK_UP, CK_TOGG | 251 | _______, _______, _______, _______, _______, _______, _______, _______, CK_RST, CK_DOWN, CK_UP, CK_TOGG |
251 | ) | 252 | ) |
252 | 253 | ||
253 | 254 | ||
254 | }; | 255 | }; |
255 | 256 | ||
@@ -392,7 +393,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
392 | bootloader_jump(); | 393 | bootloader_jump(); |
393 | } | 394 | } |
394 | return false; | 395 | return false; |
395 | break; | 396 | break; |
396 | } | 397 | } |
397 | return true; | 398 | return true; |
398 | } | 399 | } |
diff --git a/keyboards/planck/keymaps/jacob/keymap.c b/keyboards/planck/keymaps/jacob/keymap.c index 5e6e8498e..f44faff74 100644 --- a/keyboards/planck/keymaps/jacob/keymap.c +++ b/keyboards/planck/keymaps/jacob/keymap.c | |||
@@ -1,10 +1,11 @@ | |||
1 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
1 | #include "planck.h" | 2 | #include "planck.h" |
2 | #include "action_layer.h" | 3 | #include "action_layer.h" |
3 | #ifdef BACKLIGHT_ENABLE | 4 | #ifdef BACKLIGHT_ENABLE |
4 | #include "backlight.h" | 5 | #include "backlight.h" |
5 | #endif | 6 | #endif |
6 | 7 | ||
7 | //Simple Keymap where CTRL, WINKEY, and ALT keys are placed in a more familiar location for Windows users. | 8 | //Simple Keymap where CTRL, WINKEY, and ALT keys are placed in a more familiar location for Windows users. |
8 | //Focus of this particular keymap is to enable easy transition from more traditional keyboards to OLKB Planck. | 9 | //Focus of this particular keymap is to enable easy transition from more traditional keyboards to OLKB Planck. |
9 | 10 | ||
10 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | 11 | // Each layer gets a name for readability, which is then used in the keymap matrix below. |
diff --git a/keyboards/planck/keymaps/jeebak/keymap.c b/keyboards/planck/keymaps/jeebak/keymap.c index 2c6708d3a..d03572835 100644 --- a/keyboards/planck/keymaps/jeebak/keymap.c +++ b/keyboards/planck/keymaps/jeebak/keymap.c | |||
@@ -1,4 +1,5 @@ | |||
1 | 1 | ||
2 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
2 | #include "planck.h" | 3 | #include "planck.h" |
3 | #include "action_layer.h" | 4 | #include "action_layer.h" |
4 | #ifdef AUDIO_ENABLE | 5 | #ifdef AUDIO_ENABLE |
diff --git a/keyboards/planck/keymaps/jeremy-dev/keymap.c b/keyboards/planck/keymaps/jeremy-dev/keymap.c index e7ed09b12..5aea44329 100644 --- a/keyboards/planck/keymaps/jeremy-dev/keymap.c +++ b/keyboards/planck/keymaps/jeremy-dev/keymap.c | |||
@@ -3,6 +3,7 @@ | |||
3 | // Configuration options | 3 | // Configuration options |
4 | #define PREVENT_STUCK_MODIFIERS | 4 | #define PREVENT_STUCK_MODIFIERS |
5 | 5 | ||
6 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
6 | #include "planck.h" | 7 | #include "planck.h" |
7 | #include "action_layer.h" | 8 | #include "action_layer.h" |
8 | #include "eeconfig.h" | 9 | #include "eeconfig.h" |
diff --git a/keyboards/planck/keymaps/jhenahan/keymap.c b/keyboards/planck/keymaps/jhenahan/keymap.c index a0d30b0a8..3e0e185d3 100644 --- a/keyboards/planck/keymaps/jhenahan/keymap.c +++ b/keyboards/planck/keymaps/jhenahan/keymap.c | |||
@@ -1,4 +1,5 @@ | |||
1 | 1 | ||
2 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
2 | #include "planck.h" | 3 | #include "planck.h" |
3 | #include "action_layer.h" | 4 | #include "action_layer.h" |
4 | #ifdef AUDIO_ENABLE | 5 | #ifdef AUDIO_ENABLE |
diff --git a/keyboards/planck/keymaps/jirgn/keymap.c b/keyboards/planck/keymaps/jirgn/keymap.c index 87a78d90b..13c673799 100644 --- a/keyboards/planck/keymaps/jirgn/keymap.c +++ b/keyboards/planck/keymaps/jirgn/keymap.c | |||
@@ -14,6 +14,7 @@ | |||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
17 | #include "planck.h" | 18 | #include "planck.h" |
18 | #include "action_layer.h" | 19 | #include "action_layer.h" |
19 | 20 | ||
diff --git a/keyboards/planck/keymaps/johannes/keymap.c b/keyboards/planck/keymaps/johannes/keymap.c index a3376518b..86748daf2 100644 --- a/keyboards/planck/keymaps/johannes/keymap.c +++ b/keyboards/planck/keymaps/johannes/keymap.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
1 | #include "planck.h" | 2 | #include "planck.h" |
2 | 3 | ||
3 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | 4 | // Each layer gets a name for readability, which is then used in the keymap matrix below. |
diff --git a/keyboards/planck/keymaps/kelorean/keymap.c b/keyboards/planck/keymaps/kelorean/keymap.c index 3bbbca2ad..03268d160 100644 --- a/keyboards/planck/keymaps/kelorean/keymap.c +++ b/keyboards/planck/keymaps/kelorean/keymap.c | |||
@@ -12,8 +12,9 @@ | |||
12 | * | 12 | * |
13 | * You should have received a copy of the GNU General Public License | 13 | * You should have received a copy of the GNU General Public License |
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
17 | #include "planck.h" | 18 | #include "planck.h" |
18 | #include "action_layer.h" | 19 | #include "action_layer.h" |
19 | 20 | ||
diff --git a/keyboards/planck/keymaps/khord/keymap.c b/keyboards/planck/keymaps/khord/keymap.c index 1ecab9bfb..8677e7b20 100644 --- a/keyboards/planck/keymaps/khord/keymap.c +++ b/keyboards/planck/keymaps/khord/keymap.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
1 | #include "planck.h" | 2 | #include "planck.h" |
2 | #include "action_layer.h" | 3 | #include "action_layer.h" |
3 | 4 | ||
diff --git a/keyboards/planck/keymaps/kloki/keymap.c b/keyboards/planck/keymaps/kloki/keymap.c index e94750e78..99f00a5f3 100644 --- a/keyboards/planck/keymaps/kloki/keymap.c +++ b/keyboards/planck/keymaps/kloki/keymap.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
1 | #include "planck.h" | 2 | #include "planck.h" |
2 | #include "action_layer.h" | 3 | #include "action_layer.h" |
3 | extern keymap_config_t keymap_config; | 4 | extern keymap_config_t keymap_config; |
@@ -145,4 +146,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
145 | break; | 146 | break; |
146 | } | 147 | } |
147 | return true; | 148 | return true; |
148 | } \ No newline at end of file | 149 | } |
diff --git a/keyboards/planck/keymaps/kmontag42/keymap.c b/keyboards/planck/keymaps/kmontag42/keymap.c index 4b74e1384..fc418f4e8 100644 --- a/keyboards/planck/keymaps/kmontag42/keymap.c +++ b/keyboards/planck/keymaps/kmontag42/keymap.c | |||
@@ -14,6 +14,7 @@ | |||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
17 | #include "planck.h" | 18 | #include "planck.h" |
18 | #include "action_layer.h" | 19 | #include "action_layer.h" |
19 | 20 | ||
diff --git a/keyboards/planck/keymaps/lae3/keymap.c b/keyboards/planck/keymaps/lae3/keymap.c index 0fc25fd6e..d43c682c6 100644 --- a/keyboards/planck/keymaps/lae3/keymap.c +++ b/keyboards/planck/keymaps/lae3/keymap.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
1 | #include "planck.h" | 2 | #include "planck.h" |
2 | #include "action_layer.h" | 3 | #include "action_layer.h" |
3 | #ifdef AUDIO_ENABLE | 4 | #ifdef AUDIO_ENABLE |
diff --git a/keyboards/planck/keymaps/lukas/keymap.c b/keyboards/planck/keymaps/lukas/keymap.c index 6fd95378b..d7702ad09 100644 --- a/keyboards/planck/keymaps/lukas/keymap.c +++ b/keyboards/planck/keymaps/lukas/keymap.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
1 | #include "planck.h" | 2 | #include "planck.h" |
2 | #ifdef BACKLIGHT_ENABLE | 3 | #ifdef BACKLIGHT_ENABLE |
3 | #include "backlight.h" | 4 | #include "backlight.h" |
diff --git a/keyboards/planck/keymaps/luke/keymap.c b/keyboards/planck/keymaps/luke/keymap.c index 26dcb451b..5fc895803 100644 --- a/keyboards/planck/keymaps/luke/keymap.c +++ b/keyboards/planck/keymaps/luke/keymap.c | |||
@@ -1,18 +1,18 @@ | |||
1 | /* | 1 | /* |
2 | * A keyboard layout for the gridded planck. | 2 | * A keyboard layout for the gridded planck. |
3 | * | 3 | * |
4 | * Copyright (C) 2017 Luke Silva | 4 | * Copyright (C) 2017 Luke Silva |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or | 6 | * This program is free software; you can redistribute it and/or |
7 | * modify it under the terms of the GNU General Public License | 7 | * modify it under the terms of the GNU General Public License |
8 | * as published by the Free Software Foundation; either version 2 | 8 | * as published by the Free Software Foundation; either version 2 |
9 | * of the License, or (at your option) any later version. | 9 | * of the License, or (at your option) any later version. |
10 | * | 10 | * |
11 | * This program is distributed in the hope that it will be useful, | 11 | * This program is distributed in the hope that it will be useful, |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. |
15 | * | 15 | * |
16 | * You should have received a copy of the GNU General Public License | 16 | * You should have received a copy of the GNU General Public License |
17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software |
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
@@ -31,7 +31,7 @@ | |||
31 | * through either double purpose modifiers or colemak style rolling for commonly used symbol clusters | 31 | * through either double purpose modifiers or colemak style rolling for commonly used symbol clusters |
32 | * Eg: compare colemak 'this' to '(){\n}' on the symbol layer. | 32 | * Eg: compare colemak 'this' to '(){\n}' on the symbol layer. |
33 | * | 33 | * |
34 | * The layout also supports a range of multilingual characters, covering those | 34 | * The layout also supports a range of multilingual characters, covering those |
35 | * needed for French, German, Swedish and likely some other European Languages. | 35 | * needed for French, German, Swedish and likely some other European Languages. |
36 | * In the future full support for Colemak's multilingual deadkeys may be introduced. | 36 | * In the future full support for Colemak's multilingual deadkeys may be introduced. |
37 | * | 37 | * |
@@ -41,6 +41,7 @@ | |||
41 | */ | 41 | */ |
42 | 42 | ||
43 | 43 | ||
44 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
44 | #include "planck.h" | 45 | #include "planck.h" |
45 | 46 | ||
46 | #define _______ KC_TRNS | 47 | #define _______ KC_TRNS |
@@ -61,10 +62,10 @@ | |||
61 | // Macro ID numbers | 62 | // Macro ID numbers |
62 | #define M_ALT_HASH 1 | 63 | #define M_ALT_HASH 1 |
63 | #define M_GR_DASH 2 | 64 | #define M_GR_DASH 2 |
64 | #define M_SYM_LPRN 3 | 65 | #define M_SYM_LPRN 3 |
65 | #define M_NAV_UNDS 4 | 66 | #define M_NAV_UNDS 4 |
66 | #define M_NUM_RPRN 5 | 67 | #define M_NUM_RPRN 5 |
67 | #define M_CTRL_DLR 6 | 68 | #define M_CTRL_DLR 6 |
68 | #define M_LCBR_ENT 7 | 69 | #define M_LCBR_ENT 7 |
69 | #define M_PLOVER 8 | 70 | #define M_PLOVER 8 |
70 | #define M_EXT_PLV 9 | 71 | #define M_EXT_PLV 9 |
@@ -76,7 +77,7 @@ | |||
76 | #define M_CATCH 15 | 77 | #define M_CATCH 15 |
77 | 78 | ||
78 | // Macro keys | 79 | // Macro keys |
79 | #define ALT_HASH MACROTAP(M_ALT_HASH) // tap for #, hold for Alt | 80 | #define ALT_HASH MACROTAP(M_ALT_HASH) // tap for #, hold for Alt |
80 | #define GR_DASH MACROTAP(M_GR_DASH) // tap for -, hold for GR layer a-class-name | 81 | #define GR_DASH MACROTAP(M_GR_DASH) // tap for -, hold for GR layer a-class-name |
81 | #define SYM_LPRN MACROTAP(M_SYM_LPRN) // tap for (, hold for symbols layer if() | 82 | #define SYM_LPRN MACROTAP(M_SYM_LPRN) // tap for (, hold for symbols layer if() |
82 | #define NAV_UNDS MACROTAP(M_NAV_UNDS) // tap for _, hold for navigation layer snake_case_variable | 83 | #define NAV_UNDS MACROTAP(M_NAV_UNDS) // tap for _, hold for navigation layer snake_case_variable |
@@ -123,7 +124,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
123 | }, | 124 | }, |
124 | 125 | ||
125 | 126 | ||
126 | 127 | ||
127 | /* QWERTY | 128 | /* QWERTY |
128 | * ,-----------------------------------------------------------------------------------. | 129 | * ,-----------------------------------------------------------------------------------. |
129 | * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | | 130 | * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | |
@@ -155,7 +156,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
155 | * | | | | | Sym | _ |Space | NUM | X2 | | | | | 156 | * | | | | | Sym | _ |Space | NUM | X2 | | | | |
156 | * `-----------------------------------------------------------------------------------' | 157 | * `-----------------------------------------------------------------------------------' |
157 | */ | 158 | */ |
158 | 159 | ||
159 | [_SYM] = { | 160 | [_SYM] = { |
160 | {KC_TAB, KC_GRV, KC_AT, KC_SLSH, KC_ASTR, KC_CIRC, KC_PERC, KC_COLN, KC_PLUS, KC_MINS, KC_DEL, KC_BSPC}, | 161 | {KC_TAB, KC_GRV, KC_AT, KC_SLSH, KC_ASTR, KC_CIRC, KC_PERC, KC_COLN, KC_PLUS, KC_MINS, KC_DEL, KC_BSPC}, |
161 | {FUNCTION,KC_LBRC, KC_SCLN, KC_RCBR, KC_LPRN, KC_DQT, KC_QUOT, KC_RPRN, LCBR_ENT,KC_EXLM, KC_RBRC, KC_BSLS}, | 162 | {FUNCTION,KC_LBRC, KC_SCLN, KC_RCBR, KC_LPRN, KC_DQT, KC_QUOT, KC_RPRN, LCBR_ENT,KC_EXLM, KC_RBRC, KC_BSLS}, |
@@ -175,7 +176,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
175 | * | | | | GR | SYM | _ |Space | NUM | 0 | . | f | | | 176 | * | | | | GR | SYM | _ |Space | NUM | 0 | . | f | | |
176 | * `-----------------------------------------------------------------------------------' | 177 | * `-----------------------------------------------------------------------------------' |
177 | */ | 178 | */ |
178 | 179 | ||
179 | [_NUM] = { | 180 | [_NUM] = { |
180 | {KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, | 181 | {KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, |
181 | {KC_BSPC, KC_X, S(KC_D), S(KC_E), S(KC_F), KC_PLUS, KC_MINS, KC_4, KC_5, KC_6, KC_0, KC_ENT }, | 182 | {KC_BSPC, KC_X, S(KC_D), S(KC_E), S(KC_F), KC_PLUS, KC_MINS, KC_4, KC_5, KC_6, KC_0, KC_ENT }, |
@@ -195,7 +196,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
195 | * | | | | | | | | | | | | | | 196 | * | | | | | | | | | | | | | |
196 | * `-----------------------------------------------------------------------------------' | 197 | * `-----------------------------------------------------------------------------------' |
197 | */ | 198 | */ |
198 | 199 | ||
199 | [_GR] = { | 200 | [_GR] = { |
200 | {_______, UC(0xE4),UC(0xE5), _______,UC(0xA2), UC(0x20AC),_______,UC(0xEB),UC(0xEA),UC(0xFC),UC(0xF9), _______}, | 201 | {_______, UC(0xE4),UC(0xE5), _______,UC(0xA2), UC(0x20AC),_______,UC(0xEB),UC(0xEA),UC(0xFC),UC(0xF9), _______}, |
201 | {_______, UC(0xE2),UC(0xE0),UC(0xDF), _______, _______, _______,UC(0xE8),UC(0xE9),UC(0xEF),UC(0xF6), _______}, | 202 | {_______, UC(0xE2),UC(0xE0),UC(0xDF), _______, _______, _______,UC(0xE8),UC(0xE9),UC(0xEF),UC(0xF6), _______}, |
@@ -223,7 +224,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
223 | * | | | | | | | | | | | | | | 224 | * | | | | | | | | | | | | | |
224 | * `-----------------------------------------------------------------------------------' | 225 | * `-----------------------------------------------------------------------------------' |
225 | */ | 226 | */ |
226 | 227 | ||
227 | [_ADJ] = { | 228 | [_ADJ] = { |
228 | {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 }, | 229 | {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 }, |
229 | {XXXXXXX, XXXXXXX, KC_PSCR, KC_ESC, KC_VOLU, KC_MPLY, KC_MPRV, QWERTY, COLEMAK, PLOVER, XXXXXXX, XXXXXXX}, | 230 | {XXXXXXX, XXXXXXX, KC_PSCR, KC_ESC, KC_VOLU, KC_MPLY, KC_MPRV, QWERTY, COLEMAK, PLOVER, XXXXXXX, XXXXXXX}, |
@@ -243,7 +244,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
243 | * | | | | | | _ |Space | ACL0 | ACL1 | ACL2 | |TGLNAV| | 244 | * | | | | | | _ |Space | ACL0 | ACL1 | ACL2 | |TGLNAV| |
244 | * `-----------------------------------------------------------------------------------' | 245 | * `-----------------------------------------------------------------------------------' |
245 | */ | 246 | */ |
246 | 247 | ||
247 | [_NAV] = { | 248 | [_NAV] = { |
248 | {XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN2, KC_BTN1, XXXXXXX, KC_ACL0, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_BSPC}, | 249 | {XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN2, KC_BTN1, XXXXXXX, KC_ACL0, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_BSPC}, |
249 | {XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, KC_ACL1, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_ENT }, | 250 | {XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, KC_ACL1, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_ENT }, |
@@ -312,16 +313,16 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
312 | layer_and(0); | 313 | layer_and(0); |
313 | layer_on(_PLOVER); | 314 | layer_on(_PLOVER); |
314 | default_layer_set(_PLOVER); | 315 | default_layer_set(_PLOVER); |
315 | 316 | ||
316 | // Starts plover | 317 | // Starts plover |
317 | return MACRO(I(10), D(E), D(R), D(F), D(V), D(I), D(K), U(E), U(R), U(F), U(V), U(I), U(K), END); | 318 | return MACRO(I(10), D(E), D(R), D(F), D(V), D(I), D(K), U(E), U(R), U(F), U(V), U(I), U(K), END); |
318 | } | 319 | } |
319 | break; | 320 | break; |
320 | case M_EXT_PLV: | 321 | case M_EXT_PLV: |
321 | if (!record->event.pressed) { | 322 | if (!record->event.pressed) { |
322 | layer_off(_PLOVER); | 323 | layer_off(_PLOVER); |
323 | default_layer_set(_COLEMAK); | 324 | default_layer_set(_COLEMAK); |
324 | 325 | ||
325 | //Pauses plover | 326 | //Pauses plover |
326 | return MACRO(I(10), D(E), D(R), D(F), D(V), D(Y), D(U), U(E), U(R), U(F), U(V), U(Y), U(U), END); | 327 | return MACRO(I(10), D(E), D(R), D(F), D(V), D(Y), D(U), U(E), U(R), U(F), U(V), U(Y), U(U), END); |
327 | } | 328 | } |
diff --git a/keyboards/planck/keymaps/mason/keymap.c b/keyboards/planck/keymaps/mason/keymap.c index f9e2524be..3843bf210 100644 --- a/keyboards/planck/keymaps/mason/keymap.c +++ b/keyboards/planck/keymaps/mason/keymap.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
1 | #include "planck.h" | 2 | #include "planck.h" |
2 | 3 | ||
3 | enum planck_layers { | 4 | enum planck_layers { |
diff --git a/keyboards/planck/keymaps/matrixman/keymap.c b/keyboards/planck/keymaps/matrixman/keymap.c index 4506b88af..583967f63 100644 --- a/keyboards/planck/keymaps/matrixman/keymap.c +++ b/keyboards/planck/keymaps/matrixman/keymap.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
1 | #include "planck.h" | 2 | #include "planck.h" |
2 | #ifdef BACKLIGHT_ENABLE | 3 | #ifdef BACKLIGHT_ENABLE |
3 | #include "backlight.h" | 4 | #include "backlight.h" |
diff --git a/keyboards/planck/keymaps/mjt/keymap.c b/keyboards/planck/keymaps/mjt/keymap.c index 599dedf98..00251b82f 100644 --- a/keyboards/planck/keymaps/mjt/keymap.c +++ b/keyboards/planck/keymaps/mjt/keymap.c | |||
@@ -1,5 +1,6 @@ | |||
1 | // This is MJT's bastardization of the planck and minivan defaults | 1 | // This is MJT's bastardization of the planck and minivan defaults |
2 | 2 | ||
3 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
3 | #include "planck.h" | 4 | #include "planck.h" |
4 | #include "action_layer.h" | 5 | #include "action_layer.h" |
5 | #ifdef AUDIO_ENABLE | 6 | #ifdef AUDIO_ENABLE |
diff --git a/keyboards/planck/keymaps/mjtnumsym/keymap.c b/keyboards/planck/keymaps/mjtnumsym/keymap.c index 0be016fb7..30e6e5304 100644 --- a/keyboards/planck/keymaps/mjtnumsym/keymap.c +++ b/keyboards/planck/keymaps/mjtnumsym/keymap.c | |||
@@ -1,5 +1,6 @@ | |||
1 | // This is MJT's bastardization of the planck and minivan defaults | 1 | // This is MJT's bastardization of the planck and minivan defaults |
2 | 2 | ||
3 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
3 | #include "planck.h" | 4 | #include "planck.h" |
4 | #include "action_layer.h" | 5 | #include "action_layer.h" |
5 | #ifdef AUDIO_ENABLE | 6 | #ifdef AUDIO_ENABLE |
diff --git a/keyboards/planck/keymaps/mollat/keymap.c b/keyboards/planck/keymaps/mollat/keymap.c index e7c71efd4..0bcafa08a 100644 --- a/keyboards/planck/keymaps/mollat/keymap.c +++ b/keyboards/planck/keymaps/mollat/keymap.c | |||
@@ -11,6 +11,7 @@ | |||
11 | // this fork for updates as I probably won't bother jack with my pull requests frequently. | 11 | // this fork for updates as I probably won't bother jack with my pull requests frequently. |
12 | // | 12 | // |
13 | 13 | ||
14 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
14 | #include "planck.h" | 15 | #include "planck.h" |
15 | 16 | ||
16 | #define _QWERTY 0 | 17 | #define _QWERTY 0 |
diff --git a/keyboards/planck/keymaps/myoung34/keymap.c b/keyboards/planck/keymaps/myoung34/keymap.c index c52b22d4f..0bb9e7c95 100644 --- a/keyboards/planck/keymaps/myoung34/keymap.c +++ b/keyboards/planck/keymaps/myoung34/keymap.c | |||
@@ -14,6 +14,7 @@ | |||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
17 | #include "planck.h" | 18 | #include "planck.h" |
18 | #include "action_layer.h" | 19 | #include "action_layer.h" |
19 | #include "eeconfig.h" | 20 | #include "eeconfig.h" |
diff --git a/keyboards/planck/keymaps/narze/keymap.c b/keyboards/planck/keymaps/narze/keymap.c index c5703f58d..71e9cccb2 100644 --- a/keyboards/planck/keymaps/narze/keymap.c +++ b/keyboards/planck/keymaps/narze/keymap.c | |||
@@ -1,6 +1,7 @@ | |||
1 | // This is the canonical layout file for the Quantum project. If you want to add another keyboard, | 1 | // This is the canonical layout file for the Quantum project. If you want to add another keyboard, |
2 | // this is the style you want to emulate. | 2 | // this is the style you want to emulate. |
3 | 3 | ||
4 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
4 | #include "planck.h" | 5 | #include "planck.h" |
5 | #include "action_layer.h" | 6 | #include "action_layer.h" |
6 | #ifdef AUDIO_ENABLE | 7 | #ifdef AUDIO_ENABLE |
diff --git a/keyboards/planck/keymaps/navi/keymap.c b/keyboards/planck/keymaps/navi/keymap.c index 56d52d983..0f0e48ad8 100644 --- a/keyboards/planck/keymaps/navi/keymap.c +++ b/keyboards/planck/keymaps/navi/keymap.c | |||
@@ -15,6 +15,7 @@ | |||
15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
18 | #include "planck.h" | 19 | #include "planck.h" |
19 | #include "action_layer.h" | 20 | #include "action_layer.h" |
20 | #ifdef AUDIO_ENABLE | 21 | #ifdef AUDIO_ENABLE |
@@ -170,7 +171,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
170 | * `-----------------------------------------------------------------------------------' | 171 | * `-----------------------------------------------------------------------------------' |
171 | */ | 172 | */ |
172 | 173 | ||
173 | [_FUNCTION] = { | 174 | [_FUNCTION] = { |
174 | {KC_ESC , _______, KC_MPRV, KC_MPLY, KC_MNXT, _______,_______,_______, KC_KP_7, KC_KP_8, KC_KP_9,KC_BSPC}, | 175 | {KC_ESC , _______, KC_MPRV, KC_MPLY, KC_MNXT, _______,_______,_______, KC_KP_7, KC_KP_8, KC_KP_9,KC_BSPC}, |
175 | {_______, _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, _______, KC_PPLS, KC_KP_4, KC_KP_5, KC_KP_6, KC_PMNS}, | 176 | {_______, _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, _______, KC_PPLS, KC_KP_4, KC_KP_5, KC_KP_6, KC_PMNS}, |
176 | {KC_CALC, _______, _______, _______, _______, _______, _______, KC_DLR, KC_KP_1, KC_KP_2, KC_KP_3, KC_ENT}, | 177 | {KC_CALC, _______, _______, _______, _______, _______, _______, KC_DLR, KC_KP_1, KC_KP_2, KC_KP_3, KC_ENT}, |
diff --git a/keyboards/planck/keymaps/neo2planck/keymap.c b/keyboards/planck/keymaps/neo2planck/keymap.c index d51b123ff..1ecc80059 100644 --- a/keyboards/planck/keymaps/neo2planck/keymap.c +++ b/keyboards/planck/keymaps/neo2planck/keymap.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include "planck.h" | 1 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" |
2 | #include "planck.h" | ||
2 | #ifdef BACKLIGHT_ENABLE | 3 | #ifdef BACKLIGHT_ENABLE |
3 | #include "backlight.h" | 4 | #include "backlight.h" |
4 | #endif | 5 | #endif |
@@ -21,7 +22,7 @@ The special character layer and the navigation & number block layer are designed | |||
21 | */ | 22 | */ |
22 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 23 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
23 | 24 | ||
24 | /* | 25 | /* |
25 | ,-----------------------------------------------------------------------------------. | 26 | ,-----------------------------------------------------------------------------------. |
26 | | Esc | X | V | L | C | W | K | H | G | F | Q | Bksp | | 27 | | Esc | X | V | L | C | W | K | H | G | F | Q | Bksp | |
27 | |------+------+------+------+------+-------------+------+------+------+------+------| | 28 | |------+------+------+------+------+-------------+------+------+------+------+------| |
@@ -34,17 +35,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
34 | */ | 35 | */ |
35 | 36 | ||
36 | [0] = { | 37 | [0] = { |
37 | { KC_ESC, DE_X, DE_V, DE_L, DE_C, DE_W, DE_K, DE_H, DE_G, DE_F, DE_Q, KC_BSPC }, | 38 | { KC_ESC, DE_X, DE_V, DE_L, DE_C, DE_W, DE_K, DE_H, DE_G, DE_F, DE_Q, KC_BSPC }, |
38 | { KC_ENT, DE_U, DE_I, DE_A, DE_E, DE_O, DE_S, DE_N, DE_R, DE_T, DE_D, DE_Y }, | 39 | { KC_ENT, DE_U, DE_I, DE_A, DE_E, DE_O, DE_S, DE_N, DE_R, DE_T, DE_D, DE_Y }, |
39 | { KC_LSFT, DE_UE, DE_OE, DE_AE, DE_P, DE_Z, DE_B, DE_M, DE_COMM, DE_DOT, DE_J, KC_LSFT }, | 40 | { KC_LSFT, DE_UE, DE_OE, DE_AE, DE_P, DE_Z, DE_B, DE_M, DE_COMM, DE_DOT, DE_J, KC_LSFT }, |
40 | { KC_LCTL , KC_RGUI, KC_LALT, MO(2), MO(1), KC_SPC, KC_SPC, MO(1), MO(2), KC_RALT, KC_BTN2, KC_RCTL } | 41 | { KC_LCTL , KC_RGUI, KC_LALT, MO(2), MO(1), KC_SPC, KC_SPC, MO(1), MO(2), KC_RALT, KC_BTN2, KC_RCTL } |
41 | }, | 42 | }, |
42 | 43 | ||
43 | /* M1 | 44 | /* M1 |
44 | ,-----------------------------------------------------------------------------------. | 45 | ,-----------------------------------------------------------------------------------. |
45 | | Esc | | _ | [ | ] | ^ | ! | < | > | = | & | ß | | 46 | | Esc | | _ | [ | ] | ^ | ! | < | > | = | & | ß | |
46 | |------+------+------+------+------+-------------+------+------+------+------+------| | 47 | |------+------+------+------+------+-------------+------+------+------+------+------| |
47 | | Tab | \ | / | { | } | * | ? | ( | ) | - | : | @ | | 48 | | Tab | \ | / | { | } | * | ? | ( | ) | - | : | @ | |
48 | |------+------+------+------+------+------|------+------+------+------+------+------| | 49 | |------+------+------+------+------+------|------+------+------+------+------+------| |
49 | | Shift| # | $ | | | ~ | ` | + | % | " | ' | ; |Shift | | 50 | | Shift| # | $ | | | ~ | ` | + | % | " | ' | ; |Shift | |
50 | |------+------+------+------+------+------+------+------+------+------+------+------| | 51 | |------+------+------+------+------+------+------+------+------+------+------+------| |
@@ -52,10 +53,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
52 | `-----------------------------------------------------------------------------------' | 53 | `-----------------------------------------------------------------------------------' |
53 | */ | 54 | */ |
54 | [1] = { | 55 | [1] = { |
55 | { _______, _______, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, DE_SS }, | 56 | { _______, _______, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, DE_SS }, |
56 | { KC_TAB, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, DE_AT }, | 57 | { KC_TAB, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, DE_AT }, |
57 | { _______, DE_HASH, DE_DLR, DE_PIPE, DE_TILD, DE_ACUT, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ }, | 58 | { _______, DE_HASH, DE_DLR, DE_PIPE, DE_TILD, DE_ACUT, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ }, |
58 | { _______, _______, _______, MO(3), _______, _______, _______, _______, MO(3), _______, _______, _______ } | 59 | { _______, _______, _______, MO(3), _______, _______, _______, _______, MO(3), _______, _______, _______ } |
59 | }, | 60 | }, |
60 | 61 | ||
61 | /* M2 Navigation & Number Blocks | 62 | /* M2 Navigation & Number Blocks |
@@ -71,10 +72,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
71 | * `-----------------------------------------------------------------------------------' | 72 | * `-----------------------------------------------------------------------------------' |
72 | */ | 73 | */ |
73 | [2] = { | 74 | [2] = { |
74 | { XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_INS }, | 75 | { XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_INS }, |
75 | { KC_TAB, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_ENT }, | 76 | { KC_TAB, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_ENT }, |
76 | { _______, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, DE_0, DE_1, DE_2, DE_3, DE_COMM, _______ }, | 77 | { _______, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, DE_0, DE_1, DE_2, DE_3, DE_COMM, _______ }, |
77 | { _______, _______, _______, _______, MO(3), _______, _______, MO(3), _______, _______, _______, _______ } | 78 | { _______, _______, _______, _______, MO(3), _______, _______, MO(3), _______, _______, _______, _______ } |
78 | }, | 79 | }, |
79 | 80 | ||
80 | /* M3 Function & Media Keys | 81 | /* M3 Function & Media Keys |
@@ -89,10 +90,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
89 | * `-----------------------------------------------------------------------------------' | 90 | * `-----------------------------------------------------------------------------------' |
90 | */ | 91 | */ |
91 | [3] = { | 92 | [3] = { |
92 | { XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX }, | 93 | { XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX }, |
93 | { KC_TAB, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_ENT }, | 94 | { KC_TAB, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_ENT }, |
94 | { _______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ }, | 95 | { _______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ }, |
95 | { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ } | 96 | { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ } |
96 | }, | 97 | }, |
97 | }; | 98 | }; |
98 | 99 | ||
@@ -102,19 +103,19 @@ const uint16_t PROGMEM fn_actions[] = { | |||
102 | 103 | ||
103 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | 104 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) |
104 | { | 105 | { |
105 | // MACRODOWN only works in this function | 106 | // MACRODOWN only works in this function |
106 | switch (id) { | 107 | switch (id) { |
107 | case 0: | 108 | case 0: |
108 | if (record->event.pressed) { | 109 | if (record->event.pressed) { |
109 | register_code(KC_RSFT); | 110 | register_code(KC_RSFT); |
110 | #ifdef BACKLIGHT_ENABLE | 111 | #ifdef BACKLIGHT_ENABLE |
111 | backlight_step(); | 112 | backlight_step(); |
112 | #endif | 113 | #endif |
113 | } | 114 | } |
114 | else { | 115 | else { |
115 | unregister_code(KC_RSFT); | 116 | unregister_code(KC_RSFT); |
116 | } | 117 | } |
117 | break; | 118 | break; |
118 | } | 119 | } |
119 | return MACRO_NONE; | 120 | return MACRO_NONE; |
120 | }; | 121 | }; |
diff --git a/keyboards/planck/keymaps/nico/keymap.c b/keyboards/planck/keymaps/nico/keymap.c index e7a5ba303..4efc271fc 100644 --- a/keyboards/planck/keymaps/nico/keymap.c +++ b/keyboards/planck/keymaps/nico/keymap.c | |||
@@ -1,4 +1,5 @@ | |||
1 | 1 | ||
2 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
2 | #include "planck.h" | 3 | #include "planck.h" |
3 | #include "backlight.h" | 4 | #include "backlight.h" |
4 | 5 | ||
diff --git a/keyboards/planck/keymaps/not-quite-neo/keymap.c b/keyboards/planck/keymaps/not-quite-neo/keymap.c index 8ea7679e3..d5f0d9c4b 100644 --- a/keyboards/planck/keymaps/not-quite-neo/keymap.c +++ b/keyboards/planck/keymaps/not-quite-neo/keymap.c | |||
@@ -4,6 +4,7 @@ A layout based on the | |||
4 | */ | 4 | */ |
5 | 5 | ||
6 | 6 | ||
7 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
7 | #include "planck.h" | 8 | #include "planck.h" |
8 | #include "nqn-keys-on-quertz-de-latin1.h" | 9 | #include "nqn-keys-on-quertz-de-latin1.h" |
9 | #include "nqn-basic-layout.h" | 10 | #include "nqn-basic-layout.h" |
diff --git a/keyboards/planck/keymaps/originerd/keymap.c b/keyboards/planck/keymaps/originerd/keymap.c index b72f2d3e1..4248ad9e7 100644 --- a/keyboards/planck/keymaps/originerd/keymap.c +++ b/keyboards/planck/keymaps/originerd/keymap.c | |||
@@ -1,4 +1,5 @@ | |||
1 | 1 | ||
2 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
2 | #include "planck.h" | 3 | #include "planck.h" |
3 | #include "action_layer.h" | 4 | #include "action_layer.h" |
4 | #ifdef AUDIO_ENABLE | 5 | #ifdef AUDIO_ENABLE |
diff --git a/keyboards/planck/keymaps/paget/keymap.c b/keyboards/planck/keymaps/paget/keymap.c index 02e9fd9f4..eb3c0f020 100755 --- a/keyboards/planck/keymaps/paget/keymap.c +++ b/keyboards/planck/keymaps/paget/keymap.c | |||
@@ -1,5 +1,6 @@ | |||
1 | //Keymap I created to suit my working style | 1 | //Keymap I created to suit my working style |
2 | 2 | ||
3 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
3 | #include "planck.h" | 4 | #include "planck.h" |
4 | #include "action_layer.h" | 5 | #include "action_layer.h" |
5 | 6 | ||
@@ -23,10 +24,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
23 | */ | 24 | */ |
24 | 25 | ||
25 | [_QWERTY] = { | 26 | [_QWERTY] = { |
26 | {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, | 27 | {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, |
27 | {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, | 28 | {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, |
28 | {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, | 29 | {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, |
29 | {KC_LCTL, KC_ENT, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} | 30 | {KC_LCTL, KC_ENT, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} |
30 | }, | 31 | }, |
31 | 32 | ||
32 | /* | 33 | /* |
@@ -41,10 +42,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
41 | * `-----------------------------------------------------------------------------------' | 42 | * `-----------------------------------------------------------------------------------' |
42 | */ | 43 | */ |
43 | [_LOWER] = { | 44 | [_LOWER] = { |
44 | {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL}, | 45 | {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL}, |
45 | {KC_GRV, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LBRC, KC_RBRC}, | 46 | {KC_GRV, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LBRC, KC_RBRC}, |
46 | {KC_TRNS, KC_NUBS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NUHS, KC_TRNS}, | 47 | {KC_TRNS, KC_NUBS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NUHS, KC_TRNS}, |
47 | {KC_TRNS, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO} | 48 | {KC_TRNS, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO} |
48 | }, | 49 | }, |
49 | 50 | ||
50 | /* | 51 | /* |
@@ -60,10 +61,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
60 | */ | 61 | */ |
61 | 62 | ||
62 | [_RAISE] = { | 63 | [_RAISE] = { |
63 | {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, | 64 | {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, |
64 | {KC_CAPS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO}, | 65 | {KC_CAPS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO}, |
65 | {KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_INS, KC_HOME, KC_PGUP, KC_TRNS}, | 66 | {KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_INS, KC_HOME, KC_PGUP, KC_TRNS}, |
66 | {KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_END, KC_PGDN, KC_NO} | 67 | {KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_END, KC_PGDN, KC_NO} |
67 | } | 68 | } |
68 | 69 | ||
69 | }; | 70 | }; |
diff --git a/keyboards/planck/keymaps/palleiko/keymap.c b/keyboards/planck/keymaps/palleiko/keymap.c index 603a6edba..c844191d1 100644 --- a/keyboards/planck/keymaps/palleiko/keymap.c +++ b/keyboards/planck/keymaps/palleiko/keymap.c | |||
@@ -16,6 +16,7 @@ | |||
16 | * Palleiko Layout | 16 | * Palleiko Layout |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
19 | #include "planck.h" | 20 | #include "planck.h" |
20 | #include "action_layer.h" | 21 | #include "action_layer.h" |
21 | 22 | ||
diff --git a/keyboards/planck/keymaps/pete/keymap.c b/keyboards/planck/keymaps/pete/keymap.c index 07970158b..de5c50cd1 100644 --- a/keyboards/planck/keymaps/pete/keymap.c +++ b/keyboards/planck/keymaps/pete/keymap.c | |||
@@ -1,4 +1,5 @@ | |||
1 | 1 | ||
2 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
2 | #include "planck.h" | 3 | #include "planck.h" |
3 | #include "action_layer.h" | 4 | #include "action_layer.h" |
4 | #ifdef AUDIO_ENABLE | 5 | #ifdef AUDIO_ENABLE |
diff --git a/keyboards/planck/keymaps/phreed/keymap.c b/keyboards/planck/keymaps/phreed/keymap.c index ff2205c10..05574a938 100644 --- a/keyboards/planck/keymaps/phreed/keymap.c +++ b/keyboards/planck/keymaps/phreed/keymap.c | |||
@@ -14,6 +14,7 @@ | |||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
17 | #include "planck.h" | 18 | #include "planck.h" |
18 | #include "action_layer.h" | 19 | #include "action_layer.h" |
19 | 20 | ||
diff --git a/keyboards/planck/keymaps/piemod/keymap.c b/keyboards/planck/keymaps/piemod/keymap.c index e6e7a8a5a..12f1be2ae 100644 --- a/keyboards/planck/keymaps/piemod/keymap.c +++ b/keyboards/planck/keymaps/piemod/keymap.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
1 | #include "planck.h" | 2 | #include "planck.h" |
2 | #include "action_layer.h" | 3 | #include "action_layer.h" |
3 | #ifdef AUDIO_ENABLE | 4 | #ifdef AUDIO_ENABLE |
@@ -98,13 +99,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
98 | [2] = ACTION_LAYER_TAP_KEY(2, KC_O), // FN2 = Momentary symbOl layer on O. | 99 | [2] = ACTION_LAYER_TAP_KEY(2, KC_O), // FN2 = Momentary symbOl layer on O. |
99 | [3] = ACTION_LAYER_TAP_KEY(3, KC_E), // FN3 = Momentary numbEr layer on E. | 100 | [3] = ACTION_LAYER_TAP_KEY(3, KC_E), // FN3 = Momentary numbEr layer on E. |
100 | [4] = ACTION_LAYER_TAP_KEY(4, KC_U), // FN4 = Momentary fUnction layer on U. | 101 | [4] = ACTION_LAYER_TAP_KEY(4, KC_U), // FN4 = Momentary fUnction layer on U. |
101 | [5] = ACTION_LAYER_TAP_KEY(5, KC_Q), // FN5 = Momentary emaQs layer on Q. | 102 | [5] = ACTION_LAYER_TAP_KEY(5, KC_Q), // FN5 = Momentary emaQs layer on Q. |
102 | [6] = ACTION_LAYER_TAP_KEY(6, KC_LCTRL), // FN6 = Momentary MACROS on ??? key. | 103 | [6] = ACTION_LAYER_TAP_KEY(6, KC_LCTRL), // FN6 = Momentary MACROS on ??? key. |
103 | [7] = ACTION_LAYER_TAP_KEY(7, KC_COMMA), // FN7 = Momentary MOUSE on , key. | 104 | [7] = ACTION_LAYER_TAP_KEY(7, KC_COMMA), // FN7 = Momentary MOUSE on , key. |
104 | 105 | ||
105 | // Special Keys | 106 | // Special Keys |
106 | [10] = ACTION_MODS_KEY(KC_LCTRL, KC_LALT), // FN10 = Ctrl + Alt. | 107 | [10] = ACTION_MODS_KEY(KC_LCTRL, KC_LALT), // FN10 = Ctrl + Alt. |
107 | 108 | ||
108 | // Symbols | 109 | // Symbols |
109 | [21] = ACTION_MODS_KEY(MOD_LSFT, KC_SLASH), // FN21 = Question mark. | 110 | [21] = ACTION_MODS_KEY(MOD_LSFT, KC_SLASH), // FN21 = Question mark. |
110 | 111 | ||
diff --git a/keyboards/planck/keymaps/pok3r/keymap.c b/keyboards/planck/keymaps/pok3r/keymap.c index 245e918d5..ad8370142 100644 --- a/keyboards/planck/keymaps/pok3r/keymap.c +++ b/keyboards/planck/keymaps/pok3r/keymap.c | |||
@@ -14,6 +14,7 @@ | |||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
17 | #include "planck.h" | 18 | #include "planck.h" |
18 | #include "action_layer.h" | 19 | #include "action_layer.h" |
19 | 20 | ||
diff --git a/keyboards/planck/keymaps/premek/keymap.c b/keyboards/planck/keymaps/premek/keymap.c index 43f5cb643..e5a73ba7e 100644 --- a/keyboards/planck/keymaps/premek/keymap.c +++ b/keyboards/planck/keymaps/premek/keymap.c | |||
@@ -1,4 +1,5 @@ | |||
1 | 1 | ||
2 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
2 | #include "planck.h" | 3 | #include "planck.h" |
3 | #include "action_layer.h" | 4 | #include "action_layer.h" |
4 | #ifdef AUDIO_ENABLE | 5 | #ifdef AUDIO_ENABLE |
diff --git a/keyboards/planck/keymaps/pvc/keymap.c b/keyboards/planck/keymaps/pvc/keymap.c index 2e81dcad6..14e1041f4 100644 --- a/keyboards/planck/keymaps/pvc/keymap.c +++ b/keyboards/planck/keymaps/pvc/keymap.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
1 | #include "planck.h" | 2 | #include "planck.h" |
2 | #include "action_layer.h" | 3 | #include "action_layer.h" |
3 | #include "eeconfig.h" | 4 | #include "eeconfig.h" |
@@ -602,4 +603,4 @@ void music_scale_user(void) | |||
602 | PLAY_SONG(music_scale); | 603 | PLAY_SONG(music_scale); |
603 | } | 604 | } |
604 | 605 | ||
605 | #endif /* AUDIO_ENABLE */ \ No newline at end of file | 606 | #endif /* AUDIO_ENABLE */ |
diff --git a/keyboards/planck/keymaps/rai-suta/keymap.c b/keyboards/planck/keymaps/rai-suta/keymap.c index 3206ffd35..59fe34b1e 100644 --- a/keyboards/planck/keymaps/rai-suta/keymap.c +++ b/keyboards/planck/keymaps/rai-suta/keymap.c | |||
@@ -1,5 +1,6 @@ | |||
1 | // This keymap assumes that the keyboard is recognized as JIS keyboard from the OS. | 1 | // This keymap assumes that the keyboard is recognized as JIS keyboard from the OS. |
2 | 2 | ||
3 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
3 | #include "planck.h" | 4 | #include "planck.h" |
4 | #include "version.h" | 5 | #include "version.h" |
5 | 6 | ||
diff --git a/keyboards/planck/keymaps/rodhaene/keymap.c b/keyboards/planck/keymaps/rodhaene/keymap.c index b8a4b7f18..d866684dd 100644 --- a/keyboards/planck/keymaps/rodhaene/keymap.c +++ b/keyboards/planck/keymaps/rodhaene/keymap.c | |||
@@ -14,6 +14,7 @@ | |||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
17 | #include "planck.h" | 18 | #include "planck.h" |
18 | #include "action_layer.h" | 19 | #include "action_layer.h" |
19 | 20 | ||
diff --git a/keyboards/planck/keymaps/sascha/keymap.c b/keyboards/planck/keymaps/sascha/keymap.c index 922c4c81d..afa73e212 100644 --- a/keyboards/planck/keymaps/sascha/keymap.c +++ b/keyboards/planck/keymaps/sascha/keymap.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include "backlight.h" | 1 | #include "backlight.h" |
2 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
2 | #include "planck.h" | 3 | #include "planck.h" |
3 | 4 | ||
4 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 5 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
diff --git a/keyboards/planck/keymaps/sdothum/keymap.c b/keyboards/planck/keymaps/sdothum/keymap.c index ac509c41d..1b8a7b717 100644 --- a/keyboards/planck/keymaps/sdothum/keymap.c +++ b/keyboards/planck/keymaps/sdothum/keymap.c | |||
@@ -67,6 +67,7 @@ | |||
67 | 67 | ||
68 | 68 | ||
69 | #include "config.h" | 69 | #include "config.h" |
70 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
70 | #include "planck.h" | 71 | #include "planck.h" |
71 | #include "action_layer.h" | 72 | #include "action_layer.h" |
72 | #ifdef STENO_ENABLE | 73 | #ifdef STENO_ENABLE |
diff --git a/keyboards/planck/keymaps/sean/keymap.c b/keyboards/planck/keymaps/sean/keymap.c index d61d802b0..497efeaab 100644 --- a/keyboards/planck/keymaps/sean/keymap.c +++ b/keyboards/planck/keymaps/sean/keymap.c | |||
@@ -1,6 +1,7 @@ | |||
1 | // This is Sean Hunter's keymap file, customized from the canonical layout file for the Quantum project. | 1 | // This is Sean Hunter's keymap file, customized from the canonical layout file for the Quantum project. |
2 | // If you want to add another keyboard, that is the style you want to emulate. | 2 | // If you want to add another keyboard, that is the style you want to emulate. |
3 | 3 | ||
4 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
4 | #include "planck.h" | 5 | #include "planck.h" |
5 | #include "action_layer.h" | 6 | #include "action_layer.h" |
6 | #include "eeconfig.h" | 7 | #include "eeconfig.h" |
@@ -94,7 +95,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
94 | {KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT} | 95 | {KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT} |
95 | }, | 96 | }, |
96 | 97 | ||
97 | /* 'Software Dvorak': Designed to look like dvorak in the mapping but depend on software | 98 | /* 'Software Dvorak': Designed to look like dvorak in the mapping but depend on software |
98 | * dvorak (ie the OS keymapping changed to dvorak). | 99 | * dvorak (ie the OS keymapping changed to dvorak). |
99 | * ,-----------------------------------------------------------------------------------. | 100 | * ,-----------------------------------------------------------------------------------. |
100 | * | " | , | . | P | Y | / | = | F | G | C | R | L | | 101 | * | " | , | . | P | Y | / | = | F | G | C | R | L | |
diff --git a/keyboards/planck/keymaps/sgoodwin/keymap.c b/keyboards/planck/keymaps/sgoodwin/keymap.c index 9805b7257..a7f9c6c1d 100644 --- a/keyboards/planck/keymaps/sgoodwin/keymap.c +++ b/keyboards/planck/keymaps/sgoodwin/keymap.c | |||
@@ -2,6 +2,7 @@ | |||
2 | // It doesn't have Plover or Dvorak layers because he doesn't use that. | 2 | // It doesn't have Plover or Dvorak layers because he doesn't use that. |
3 | // It Also doesn't allow for swapping alt with CMD because that only happens in error. | 3 | // It Also doesn't allow for swapping alt with CMD because that only happens in error. |
4 | 4 | ||
5 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
5 | #include "planck.h" | 6 | #include "planck.h" |
6 | #include "action_layer.h" | 7 | #include "action_layer.h" |
7 | #ifdef AUDIO_ENABLE | 8 | #ifdef AUDIO_ENABLE |
diff --git a/keyboards/planck/keymaps/smt/keymap.c b/keyboards/planck/keymaps/smt/keymap.c index 8a5dde886..895a4bf05 100644 --- a/keyboards/planck/keymaps/smt/keymap.c +++ b/keyboards/planck/keymaps/smt/keymap.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
1 | #include "planck.h" | 2 | #include "planck.h" |
2 | #include "action_layer.h" | 3 | #include "action_layer.h" |
3 | #ifdef AUDIO_ENABLE | 4 | #ifdef AUDIO_ENABLE |
diff --git a/keyboards/planck/keymaps/steno/keymap.c b/keyboards/planck/keymaps/steno/keymap.c index 38540a261..849fefa5c 100644 --- a/keyboards/planck/keymaps/steno/keymap.c +++ b/keyboards/planck/keymaps/steno/keymap.c | |||
@@ -14,6 +14,7 @@ | |||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
17 | #include "planck.h" | 18 | #include "planck.h" |
18 | #include "action_layer.h" | 19 | #include "action_layer.h" |
19 | #include "keymap_steno.h" | 20 | #include "keymap_steno.h" |
@@ -253,4 +254,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
253 | break; | 254 | break; |
254 | } | 255 | } |
255 | return true; | 256 | return true; |
256 | } \ No newline at end of file | 257 | } |
diff --git a/keyboards/planck/keymaps/tak3over/keymap.c b/keyboards/planck/keymaps/tak3over/keymap.c index c47224a3e..f8fb0fb37 100644 --- a/keyboards/planck/keymaps/tak3over/keymap.c +++ b/keyboards/planck/keymaps/tak3over/keymap.c | |||
@@ -1,6 +1,7 @@ | |||
1 | // | 1 | // |
2 | //Dropped the Dvorak layer and added two my layer buttons. Both Raise and lower can be accessed from either side now. | 2 | //Dropped the Dvorak layer and added two my layer buttons. Both Raise and lower can be accessed from either side now. |
3 | 3 | ||
4 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
4 | #include "planck.h" | 5 | #include "planck.h" |
5 | #ifdef BACKLIGHT_ENABLE | 6 | #ifdef BACKLIGHT_ENABLE |
6 | #include "backlight.h" | 7 | #include "backlight.h" |
@@ -43,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
43 | * |------+------+------+------+------+------|------+------+------+------+------+------| | 44 | * |------+------+------+------+------+------|------+------+------+------+------+------| |
44 | * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | | 45 | * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | |
45 | * |------+------+------+------+------+------+------+------+------+------+------+------| | 46 | * |------+------+------+------+------+------+------+------+------+------+------+------| |
46 | * | Ctrl | Alt | GUI |Func |Lower | Space |Raise | Left | Down | Up |Right | 47 | * | Ctrl | Alt | GUI |Func |Lower | Space |Raise | Left | Down | Up |Right |
47 | * `-----------------------------------------------------------------------------------' | 48 | * `-----------------------------------------------------------------------------------' |
48 | */ | 49 | */ |
49 | [_CM] = { | 50 | [_CM] = { |
@@ -54,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
54 | }, | 55 | }, |
55 | /* Raise | 56 | /* Raise |
56 | * ,-----------------------------------------------------------------------------------. | 57 | * ,-----------------------------------------------------------------------------------. |
57 | * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | 58 | * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
58 | * |------+------+------+------+------+-------------+------+------+------+------+------| | 59 | * |------+------+------+------+------+-------------+------+------+------+------+------| |
59 | * | Esc | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | | | | 60 | * | Esc | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | | | |
60 | * |------+------+------+------+------+------|------+------+------+------+------+------| | 61 | * |------+------+------+------+------+------|------+------+------+------+------+------| |
diff --git a/keyboards/planck/keymaps/tehwalris/keymap.c b/keyboards/planck/keymaps/tehwalris/keymap.c index f36bad3ed..0af864d9e 100644 --- a/keyboards/planck/keymaps/tehwalris/keymap.c +++ b/keyboards/planck/keymaps/tehwalris/keymap.c | |||
@@ -14,6 +14,7 @@ | |||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
17 | #include "planck.h" | 18 | #include "planck.h" |
18 | #include "action_layer.h" | 19 | #include "action_layer.h" |
19 | 20 | ||
diff --git a/keyboards/planck/keymaps/that_canadian/keymap.c b/keyboards/planck/keymaps/that_canadian/keymap.c index 993a0d686..512fc6bd4 100644 --- a/keyboards/planck/keymaps/that_canadian/keymap.c +++ b/keyboards/planck/keymaps/that_canadian/keymap.c | |||
@@ -1,6 +1,7 @@ | |||
1 | // This is the canonical layout file for the Quantum project. If you want to add another keyboard, | 1 | // This is the canonical layout file for the Quantum project. If you want to add another keyboard, |
2 | // this is the style you want to emulate. | 2 | // this is the style you want to emulate. |
3 | 3 | ||
4 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
4 | #include "planck.h" | 5 | #include "planck.h" |
5 | #include "action_layer.h" | 6 | #include "action_layer.h" |
6 | #ifdef AUDIO_ENABLE | 7 | #ifdef AUDIO_ENABLE |
diff --git a/keyboards/planck/keymaps/thermal_printer/keymap.c b/keyboards/planck/keymaps/thermal_printer/keymap.c index 1a1119bf3..2b05f2b08 100644 --- a/keyboards/planck/keymaps/thermal_printer/keymap.c +++ b/keyboards/planck/keymaps/thermal_printer/keymap.c | |||
@@ -1,4 +1,5 @@ | |||
1 | 1 | ||
2 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
2 | #include "planck.h" | 3 | #include "planck.h" |
3 | #include "action_layer.h" | 4 | #include "action_layer.h" |
4 | #ifdef AUDIO_ENABLE | 5 | #ifdef AUDIO_ENABLE |
diff --git a/keyboards/planck/keymaps/tong92/keymap.c b/keyboards/planck/keymaps/tong92/keymap.c index 2be28fb4f..60c8d793b 100644 --- a/keyboards/planck/keymaps/tong92/keymap.c +++ b/keyboards/planck/keymaps/tong92/keymap.c | |||
@@ -1,5 +1,6 @@ | |||
1 | //Author: tong92 <tong92power@gmail.com> | 1 | //Author: tong92 <tong92power@gmail.com> |
2 | 2 | ||
3 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
3 | #include "planck.h" | 4 | #include "planck.h" |
4 | #ifdef BACKLIGHT_ENABLE | 5 | #ifdef BACKLIGHT_ENABLE |
5 | #include "backlight.h" | 6 | #include "backlight.h" |
@@ -101,7 +102,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
101 | {XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,GO_DEFT,GO_DEFT,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX} | 102 | {XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,GO_DEFT,GO_DEFT,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX} |
102 | } | 103 | } |
103 | 104 | ||
104 | }; | 105 | }; |
105 | //Layout END | 106 | //Layout END |
106 | 107 | ||
107 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | 108 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) |
@@ -143,4 +144,4 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
143 | break; | 144 | break; |
144 | } | 145 | } |
145 | return MACRO_NONE; | 146 | return MACRO_NONE; |
146 | }; \ No newline at end of file | 147 | }; |
diff --git a/keyboards/planck/keymaps/unicode/keymap.c b/keyboards/planck/keymaps/unicode/keymap.c index 4674be066..d869eedd4 100644 --- a/keyboards/planck/keymaps/unicode/keymap.c +++ b/keyboards/planck/keymaps/unicode/keymap.c | |||
@@ -21,6 +21,7 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | 23 | ||
24 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
24 | #include "planck.h" | 25 | #include "planck.h" |
25 | #include "action_layer.h" | 26 | #include "action_layer.h" |
26 | #ifdef AUDIO_ENABLE | 27 | #ifdef AUDIO_ENABLE |
diff --git a/keyboards/planck/keymaps/vifon/keymap.c b/keyboards/planck/keymaps/vifon/keymap.c index 2563548f6..0fa8d9066 100644 --- a/keyboards/planck/keymaps/vifon/keymap.c +++ b/keyboards/planck/keymaps/vifon/keymap.c | |||
@@ -1,4 +1,5 @@ | |||
1 | 1 | ||
2 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
2 | #include "planck.h" | 3 | #include "planck.h" |
3 | #ifdef BACKLIGHT_ENABLE | 4 | #ifdef BACKLIGHT_ENABLE |
4 | # include "backlight.h" | 5 | # include "backlight.h" |
diff --git a/keyboards/planck/keymaps/yale/keymap.c b/keyboards/planck/keymaps/yale/keymap.c index edbe65430..bbecc66fb 100644 --- a/keyboards/planck/keymaps/yale/keymap.c +++ b/keyboards/planck/keymaps/yale/keymap.c | |||
@@ -1,8 +1,9 @@ | |||
1 | // | 1 | // |
2 | 2 | ||
3 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
3 | #include "planck.h" | 4 | #include "planck.h" |
4 | #ifdef BACKLIGHT_ENABLE | 5 | #ifdef BACKLIGHT_ENABLE |
5 | #include "backlight.h" | 6 | #include "backlight.h" |
6 | #endif | 7 | #endif |
7 | 8 | ||
8 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | 9 | // Each layer gets a name for readability, which is then used in the keymap matrix below. |
@@ -32,10 +33,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
32 | * `-----------------------------------------------------------------------------------' | 33 | * `-----------------------------------------------------------------------------------' |
33 | */ | 34 | */ |
34 | [_QWERTY] = { | 35 | [_QWERTY] = { |
35 | {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, | 36 | {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, |
36 | {CTL_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, | 37 | {CTL_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, |
37 | {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, | 38 | {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, |
38 | {KC_LCTL, KC_LALT, KC_LGUI, KC_LGUI, MO(_NUM), KC_SPC, KC_SPC, MO(_FUNC), KC_RGUI, KC_RALT, KC_RCTL, KC_ENT} | 39 | {KC_LCTL, KC_LALT, KC_LGUI, KC_LGUI, MO(_NUM), KC_SPC, KC_SPC, MO(_FUNC), KC_RGUI, KC_RALT, KC_RCTL, KC_ENT} |
39 | }, | 40 | }, |
40 | 41 | ||
41 | /* _NUM | 42 | /* _NUM |
@@ -50,10 +51,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
50 | * `-----------------------------------------------------------------------------------' | 51 | * `-----------------------------------------------------------------------------------' |
51 | */ | 52 | */ |
52 | [_NUM] = { | 53 | [_NUM] = { |
53 | {_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, | 54 | {_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, |
54 | {KC_LCTL, KC_GRV, KC_LBRC, KC_LCBR, KC_LPRN, KC_SLSH, KC_BSLS, KC_RPRN, KC_RCBR, KC_RBRC, KC_MINS, KC_EQL}, | 55 | {KC_LCTL, KC_GRV, KC_LBRC, KC_LCBR, KC_LPRN, KC_SLSH, KC_BSLS, KC_RPRN, KC_RCBR, KC_RBRC, KC_MINS, KC_EQL}, |
55 | {_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_UNDS, KC_PLUS, _______}, | 56 | {_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_UNDS, KC_PLUS, _______}, |
56 | {_______, _______, _______, _______, _______, _______, _______, MO(_NAV), _______, _______, _______, _______} | 57 | {_______, _______, _______, _______, _______, _______, _______, MO(_NAV), _______, _______, _______, _______} |
57 | }, | 58 | }, |
58 | 59 | ||
59 | /* _FUNC | 60 | /* _FUNC |
@@ -68,17 +69,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
68 | * `-----------------------------------------------------------------------------------' | 69 | * `-----------------------------------------------------------------------------------' |
69 | */ | 70 | */ |
70 | [_FUNC] = { | 71 | [_FUNC] = { |
71 | {_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, | 72 | {_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, |
72 | {_______, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, _______}, | 73 | {_______, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, _______}, |
73 | {_______, M(0), _______, KC_VOLD, KC_MPRV, KC_MPLY, KC_MUTE, KC_MNXT, KC_VOLU, _______, _______, _______}, | 74 | {_______, M(0), _______, KC_VOLD, KC_MPRV, KC_MPLY, KC_MUTE, KC_MNXT, KC_VOLU, _______, _______, _______}, |
74 | {_______, _______, _______, _______, MO(_NAV), _______, _______, _______, _______, _______, _______, _______} | 75 | {_______, _______, _______, _______, MO(_NAV), _______, _______, _______, _______, _______, _______, _______} |
75 | }, | 76 | }, |
76 | 77 | ||
77 | [_NAV] = { | 78 | [_NAV] = { |
78 | {KC_MS_ACCEL2, KC_FN1, KC_FN2, KC_FN3, KC_FN4, XXXXXXX, XXXXXXX, KC_WH_D, KC_WH_U, XXXXXXX, XXXXXXX, XXXXXXX}, | 79 | {KC_MS_ACCEL2, KC_FN1, KC_FN2, KC_FN3, KC_FN4, XXXXXXX, XXXXXXX, KC_WH_D, KC_WH_U, XXXXXXX, XXXXXXX, XXXXXXX}, |
79 | {KC_MS_ACCEL1, KC_MS_BTN4, KC_MS_BTN3, KC_MS_BTN2, KC_MS_BTN1, XXXXXXX, KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT, XXXXXXX, XXXXXXX}, | 80 | {KC_MS_ACCEL1, KC_MS_BTN4, KC_MS_BTN3, KC_MS_BTN2, KC_MS_BTN1, XXXXXXX, KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT, XXXXXXX, XXXXXXX}, |
80 | {KC_MS_ACCEL0, KC_FN9, KC_FN10, KC_FN11, KC_FN12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, | 81 | {KC_MS_ACCEL0, KC_FN9, KC_FN10, KC_FN11, KC_FN12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, |
81 | {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} | 82 | {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} |
82 | }, | 83 | }, |
83 | 84 | ||
84 | }; | 85 | }; |
@@ -89,18 +90,18 @@ const uint16_t PROGMEM fn_actions[] = { | |||
89 | 90 | ||
90 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | 91 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) |
91 | { | 92 | { |
92 | // MACRODOWN only works in this function | 93 | // MACRODOWN only works in this function |
93 | switch(id) { | 94 | switch(id) { |
94 | case 0: | 95 | case 0: |
95 | if (record->event.pressed) { | 96 | if (record->event.pressed) { |
96 | register_code(KC_RSFT); | 97 | register_code(KC_RSFT); |
97 | #ifdef BACKLIGHT_ENABLE | 98 | #ifdef BACKLIGHT_ENABLE |
98 | backlight_step(); | 99 | backlight_step(); |
99 | #endif | 100 | #endif |
100 | } else { | 101 | } else { |
101 | unregister_code(KC_RSFT); | 102 | unregister_code(KC_RSFT); |
102 | } | 103 | } |
103 | break; | 104 | break; |
104 | } | 105 | } |
105 | return MACRO_NONE; | 106 | return MACRO_NONE; |
106 | }; | 107 | }; |
diff --git a/keyboards/planck/keymaps/yang/keymap.c b/keyboards/planck/keymaps/yang/keymap.c index df291b453..e4a7a3312 100644 --- a/keyboards/planck/keymaps/yang/keymap.c +++ b/keyboards/planck/keymaps/yang/keymap.c | |||
@@ -1,4 +1,5 @@ | |||
1 | 1 | ||
2 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
2 | #include "planck.h" | 3 | #include "planck.h" |
3 | #ifdef BACKLIGHT_ENABLE | 4 | #ifdef BACKLIGHT_ENABLE |
4 | #include "backlight.h" | 5 | #include "backlight.h" |
@@ -56,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
56 | }; | 57 | }; |
57 | 58 | ||
58 | /*enum function_id { | 59 | /*enum function_id { |
59 | 60 | ||
60 | };*/ | 61 | };*/ |
61 | 62 | ||
62 | const uint16_t PROGMEM fn_actions[] = { | 63 | const uint16_t PROGMEM fn_actions[] = { |
@@ -83,6 +84,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
83 | 84 | ||
84 | void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { | 85 | void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { |
85 | switch (id) { | 86 | switch (id) { |
86 | 87 | ||
87 | } | 88 | } |
88 | } | 89 | } |
diff --git a/keyboards/planck/keymaps/zach/keymap.c b/keyboards/planck/keymaps/zach/keymap.c index 710477df5..ef1ac0fef 100644 --- a/keyboards/planck/keymaps/zach/keymap.c +++ b/keyboards/planck/keymaps/zach/keymap.c | |||
@@ -1,4 +1,5 @@ | |||
1 | // Zach Nielsen Custom Planck Keyboard layout | 1 | // Zach Nielsen Custom Planck Keyboard layout |
2 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
2 | #include "planck.h" | 3 | #include "planck.h" |
3 | #define PLANCK_YES // This is the Planck | 4 | #define PLANCK_YES // This is the Planck |
4 | #include "zach_common_functions.c" | 5 | #include "zach_common_functions.c" |
diff --git a/keyboards/planck/keymaps/zrichard/keymap.c b/keyboards/planck/keymaps/zrichard/keymap.c index 9ae4c7b74..151ec877b 100755 --- a/keyboards/planck/keymaps/zrichard/keymap.c +++ b/keyboards/planck/keymaps/zrichard/keymap.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" | ||
1 | #include "planck.h" | 2 | #include "planck.h" |
2 | #include "action_layer.h" | 3 | #include "action_layer.h" |
3 | #include "eeconfig.h" | 4 | #include "eeconfig.h" |
@@ -434,7 +435,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
434 | } | 435 | } |
435 | else | 436 | else |
436 | { | 437 | { |
437 | if (timer_elapsed(start) > 100) | 438 | if (timer_elapsed(start) > 100) |
438 | { | 439 | { |
439 | return MACRO( U(LSHIFT), END); | 440 | return MACRO( U(LSHIFT), END); |
440 | } | 441 | } |
diff --git a/keyboards/planck/planck.c b/keyboards/planck/planck.c index 6ac789cbe..d9e3f00f2 100644 --- a/keyboards/planck/planck.c +++ b/keyboards/planck/planck.c | |||
@@ -13,8 +13,17 @@ const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { | |||
13 | __attribute__ ((weak)) | 13 | __attribute__ ((weak)) |
14 | void matrix_init_kb(void) { | 14 | void matrix_init_kb(void) { |
15 | // Turn status LED on | 15 | // Turn status LED on |
16 | #ifdef __AVR__ | ||
16 | DDRE |= (1<<6); | 17 | DDRE |= (1<<6); |
17 | PORTE |= (1<<6); | 18 | PORTE |= (1<<6); |
19 | #endif | ||
18 | 20 | ||
19 | matrix_init_user(); | 21 | matrix_init_user(); |
20 | } | 22 | } |
23 | |||
24 | const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = LAYOUT_planck_grid( | ||
25 | 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, | ||
26 | 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, | ||
27 | 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, | ||
28 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 | ||
29 | ); \ No newline at end of file | ||
diff --git a/keyboards/planck/planck.h b/keyboards/planck/planck.h index b663ba1c7..f0a12d933 100644 --- a/keyboards/planck/planck.h +++ b/keyboards/planck/planck.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include "quantum.h" | 4 | #include "quantum.h" |
5 | 5 | ||
6 | #ifdef __AVR__ | ||
6 | #define LAYOUT_planck_mit( \ | 7 | #define LAYOUT_planck_mit( \ |
7 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ | 8 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ |
8 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ | 9 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ |
@@ -47,4 +48,97 @@ | |||
47 | #define LAYOUT_ortho_4x12 LAYOUT_planck_grid | 48 | #define LAYOUT_ortho_4x12 LAYOUT_planck_grid |
48 | #define KC_LAYOUT_ortho_4x12 KC_KEYMAP | 49 | #define KC_LAYOUT_ortho_4x12 KC_KEYMAP |
49 | 50 | ||
51 | #else | ||
52 | |||
53 | #define LAYOUT_planck_1x2uC( \ | ||
54 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ | ||
55 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ | ||
56 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ | ||
57 | k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ | ||
58 | ) \ | ||
59 | { \ | ||
60 | { k00, k01, k02, k03, k04, k05 }, \ | ||
61 | { k10, k11, k12, k13, k14, k15 }, \ | ||
62 | { k20, k21, k22, k23, k24, k25 }, \ | ||
63 | { k30, k31, k32, k39, k3a, k3b }, \ | ||
64 | { k06, k07, k08, k09, k0a, k0b }, \ | ||
65 | { k16, k17, k18, k19, k1a, k1b }, \ | ||
66 | { k26, k27, k28, k29, k2a, k2b }, \ | ||
67 | { k36, k37, k38, k33, k34, k35 } \ | ||
68 | } | ||
69 | |||
70 | #define LAYOUT_planck_1x2uR( \ | ||
71 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ | ||
72 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ | ||
73 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ | ||
74 | k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ | ||
75 | ) \ | ||
76 | { \ | ||
77 | { k00, k01, k02, k03, k04, k05 }, \ | ||
78 | { k10, k11, k12, k13, k14, k15 }, \ | ||
79 | { k20, k21, k22, k23, k24, k25 }, \ | ||
80 | { k30, k31, k32, k39, k3a, k3b }, \ | ||
81 | { k06, k07, k08, k09, k0a, k0b }, \ | ||
82 | { k16, k17, k18, k19, k1a, k1b }, \ | ||
83 | { k26, k27, k28, k29, k2a, k2b }, \ | ||
84 | { k36, k37, k38, k33, k34, k35 } \ | ||
85 | } | ||
86 | |||
87 | #define LAYOUT_planck_1x2uL( \ | ||
88 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ | ||
89 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ | ||
90 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ | ||
91 | k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a, k3b \ | ||
92 | ) \ | ||
93 | { \ | ||
94 | { k00, k01, k02, k03, k04, k05 }, \ | ||
95 | { k10, k11, k12, k13, k14, k15 }, \ | ||
96 | { k20, k21, k22, k23, k24, k25 }, \ | ||
97 | { k30, k31, k32, k39, k3a, k3b }, \ | ||
98 | { k06, k07, k08, k09, k0a, k0b }, \ | ||
99 | { k16, k17, k18, k19, k1a, k1b }, \ | ||
100 | { k26, k27, k28, k29, k2a, k2b }, \ | ||
101 | { k36, k37, k38, k33, k34, k35 } \ | ||
102 | } | ||
103 | |||
104 | #define LAYOUT_planck_2x2u( \ | ||
105 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ | ||
106 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ | ||
107 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ | ||
108 | k30, k31, k32, k33, k34, k36, k38, k39, k3a, k3b \ | ||
109 | ) \ | ||
110 | { \ | ||
111 | { k00, k01, k02, k03, k04, k05 }, \ | ||
112 | { k10, k11, k12, k13, k14, k15 }, \ | ||
113 | { k20, k21, k22, k23, k24, k25 }, \ | ||
114 | { k30, k31, k32, k39, k3a, k3b }, \ | ||
115 | { k06, k07, k08, k09, k0a, k0b }, \ | ||
116 | { k16, k17, k18, k19, k1a, k1b }, \ | ||
117 | { k26, k27, k28, k29, k2a, k2b }, \ | ||
118 | { k36, k37, k38, k33, k34, k35 } \ | ||
119 | } | ||
120 | |||
121 | #define LAYOUT_planck_grid( \ | ||
122 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ | ||
123 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ | ||
124 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ | ||
125 | k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ | ||
126 | ) \ | ||
127 | { \ | ||
128 | { k00, k01, k02, k03, k04, k05 }, \ | ||
129 | { k10, k11, k12, k13, k14, k15 }, \ | ||
130 | { k20, k21, k22, k23, k24, k25 }, \ | ||
131 | { k30, k31, k32, k39, k3a, k3b }, \ | ||
132 | { k06, k07, k08, k09, k0a, k0b }, \ | ||
133 | { k16, k17, k18, k19, k1a, k1b }, \ | ||
134 | { k26, k27, k28, k29, k2a, k2b }, \ | ||
135 | { k36, k37, k38, k33, k34, k35 } \ | ||
136 | } | ||
137 | |||
138 | #define KEYMAP LAYOUT_planck_grid | ||
139 | #define LAYOUT_ortho_4x12 LAYOUT_planck_grid | ||
140 | #define KC_LAYOUT_ortho_4x12 KC_KEYMAP | ||
141 | |||
142 | #endif | ||
143 | |||
50 | #endif | 144 | #endif |
diff --git a/keyboards/planck/rev6/boards/GENERIC_STM32_F303XC/board.c b/keyboards/planck/rev6/boards/GENERIC_STM32_F303XC/board.c new file mode 100644 index 000000000..4331155df --- /dev/null +++ b/keyboards/planck/rev6/boards/GENERIC_STM32_F303XC/board.c | |||
@@ -0,0 +1,126 @@ | |||
1 | /* | ||
2 | ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio | ||
3 | |||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | you may not use this file except in compliance with the License. | ||
6 | You may obtain a copy of the License at | ||
7 | |||
8 | http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | |||
10 | Unless required by applicable law or agreed to in writing, software | ||
11 | distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | See the License for the specific language governing permissions and | ||
14 | limitations under the License. | ||
15 | */ | ||
16 | |||
17 | #include "hal.h" | ||
18 | |||
19 | #if HAL_USE_PAL || defined(__DOXYGEN__) | ||
20 | /** | ||
21 | * @brief PAL setup. | ||
22 | * @details Digital I/O ports static configuration as defined in @p board.h. | ||
23 | * This variable is used by the HAL when initializing the PAL driver. | ||
24 | */ | ||
25 | const PALConfig pal_default_config = { | ||
26 | #if STM32_HAS_GPIOA | ||
27 | {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, | ||
28 | VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, | ||
29 | #endif | ||
30 | #if STM32_HAS_GPIOB | ||
31 | {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, | ||
32 | VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, | ||
33 | #endif | ||
34 | #if STM32_HAS_GPIOC | ||
35 | {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, | ||
36 | VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, | ||
37 | #endif | ||
38 | #if STM32_HAS_GPIOD | ||
39 | {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, | ||
40 | VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, | ||
41 | #endif | ||
42 | #if STM32_HAS_GPIOE | ||
43 | {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, | ||
44 | VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, | ||
45 | #endif | ||
46 | #if STM32_HAS_GPIOF | ||
47 | {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, | ||
48 | VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, | ||
49 | #endif | ||
50 | #if STM32_HAS_GPIOG | ||
51 | {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, | ||
52 | VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, | ||
53 | #endif | ||
54 | #if STM32_HAS_GPIOH | ||
55 | {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, | ||
56 | VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, | ||
57 | #endif | ||
58 | #if STM32_HAS_GPIOI | ||
59 | {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, | ||
60 | VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} | ||
61 | #endif | ||
62 | }; | ||
63 | #endif | ||
64 | |||
65 | void enter_bootloader_mode_if_requested(void); | ||
66 | |||
67 | /** | ||
68 | * @brief Early initialization code. | ||
69 | * @details This initialization must be performed just after stack setup | ||
70 | * and before any other initialization. | ||
71 | */ | ||
72 | void __early_init(void) { | ||
73 | enter_bootloader_mode_if_requested(); | ||
74 | stm32_clock_init(); | ||
75 | } | ||
76 | |||
77 | #if HAL_USE_SDC || defined(__DOXYGEN__) | ||
78 | /** | ||
79 | * @brief SDC card detection. | ||
80 | */ | ||
81 | bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { | ||
82 | |||
83 | (void)sdcp; | ||
84 | /* TODO: Fill the implementation.*/ | ||
85 | return true; | ||
86 | } | ||
87 | |||
88 | /** | ||
89 | * @brief SDC card write protection detection. | ||
90 | */ | ||
91 | bool sdc_lld_is_write_protected(SDCDriver *sdcp) { | ||
92 | |||
93 | (void)sdcp; | ||
94 | /* TODO: Fill the implementation.*/ | ||
95 | return false; | ||
96 | } | ||
97 | #endif /* HAL_USE_SDC */ | ||
98 | |||
99 | #if HAL_USE_MMC_SPI || defined(__DOXYGEN__) | ||
100 | /** | ||
101 | * @brief MMC_SPI card detection. | ||
102 | */ | ||
103 | bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { | ||
104 | |||
105 | (void)mmcp; | ||
106 | /* TODO: Fill the implementation.*/ | ||
107 | return true; | ||
108 | } | ||
109 | |||
110 | /** | ||
111 | * @brief MMC_SPI card write protection detection. | ||
112 | */ | ||
113 | bool mmc_lld_is_write_protected(MMCDriver *mmcp) { | ||
114 | |||
115 | (void)mmcp; | ||
116 | /* TODO: Fill the implementation.*/ | ||
117 | return false; | ||
118 | } | ||
119 | #endif | ||
120 | |||
121 | /** | ||
122 | * @brief Board-specific initialization code. | ||
123 | * @todo Add your board-specific code, if any. | ||
124 | */ | ||
125 | void boardInit(void) { | ||
126 | } | ||
diff --git a/keyboards/planck/rev6/boards/GENERIC_STM32_F303XC/board.h b/keyboards/planck/rev6/boards/GENERIC_STM32_F303XC/board.h new file mode 100644 index 000000000..ec26557f3 --- /dev/null +++ b/keyboards/planck/rev6/boards/GENERIC_STM32_F303XC/board.h | |||
@@ -0,0 +1,1187 @@ | |||
1 | /* | ||
2 | ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio | ||
3 | |||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | you may not use this file except in compliance with the License. | ||
6 | You may obtain a copy of the License at | ||
7 | |||
8 | http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | |||
10 | Unless required by applicable law or agreed to in writing, software | ||
11 | distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | See the License for the specific language governing permissions and | ||
14 | limitations under the License. | ||
15 | */ | ||
16 | |||
17 | #ifndef _BOARD_H_ | ||
18 | #define _BOARD_H_ | ||
19 | |||
20 | /* | ||
21 | * Setup for Clueboard 60% Keyboard | ||
22 | */ | ||
23 | |||
24 | /* | ||
25 | * Board identifier. | ||
26 | */ | ||
27 | #define BOARD_GENERIC_STM32_F303XC | ||
28 | #define BOARD_NAME "Planck PCB" | ||
29 | |||
30 | /* | ||
31 | * Board oscillators-related settings. | ||
32 | * NOTE: LSE not fitted. | ||
33 | */ | ||
34 | #if !defined(STM32_LSECLK) | ||
35 | #define STM32_LSECLK 0U | ||
36 | #endif | ||
37 | |||
38 | #define STM32_LSEDRV (3U << 3U) | ||
39 | |||
40 | #if !defined(STM32_HSECLK) | ||
41 | #define STM32_HSECLK 8000000U | ||
42 | #endif | ||
43 | |||
44 | // #define STM32_HSE_BYPASS | ||
45 | |||
46 | /* | ||
47 | * MCU type as defined in the ST header. | ||
48 | */ | ||
49 | #define STM32F303xC | ||
50 | |||
51 | /* | ||
52 | * IO pins assignments. | ||
53 | */ | ||
54 | #define GPIOA_PIN0 0U | ||
55 | #define GPIOA_PIN1 1U | ||
56 | #define GPIOA_PIN2 2U | ||
57 | #define GPIOA_PIN3 3U | ||
58 | #define GPIOA_PIN4 4U | ||
59 | #define GPIOA_PIN5 5U | ||
60 | #define GPIOA_PIN6 6U | ||
61 | #define GPIOA_PIN7 7U | ||
62 | #define GPIOA_PIN8 8U | ||
63 | #define GPIOA_PIN9 9U | ||
64 | #define GPIOA_PIN10 10U | ||
65 | #define GPIOA_USB_DM 11U | ||
66 | #define GPIOA_USB_DP 12U | ||
67 | #define GPIOA_SWDIO 13U | ||
68 | #define GPIOA_SWCLK 14U | ||
69 | #define GPIOA_PIN15 15U | ||
70 | |||
71 | #define GPIOB_PIN0 0U | ||
72 | #define GPIOB_PIN1 1U | ||
73 | #define GPIOB_PIN2 2U | ||
74 | #define GPIOB_PIN3 3U | ||
75 | #define GPIOB_PIN4 4U | ||
76 | #define GPIOB_PIN5 5U | ||
77 | #define GPIOB_PIN6 6U | ||
78 | #define GPIOB_PIN7 7U | ||
79 | #define GPIOB_PIN8 8U | ||
80 | #define GPIOB_PIN9 9U | ||
81 | #define GPIOB_PIN10 10U | ||
82 | #define GPIOB_PIN11 11U | ||
83 | #define GPIOB_PIN12 12U | ||
84 | #define GPIOB_PIN13 13U | ||
85 | #define GPIOB_PIN14 14U | ||
86 | #define GPIOB_PIN15 15U | ||
87 | |||
88 | #define GPIOC_PIN0 0U | ||
89 | #define GPIOC_PIN1 1U | ||
90 | #define GPIOC_PIN2 2U | ||
91 | #define GPIOC_PIN3 3U | ||
92 | #define GPIOC_PIN4 4U | ||
93 | #define GPIOC_PIN5 5U | ||
94 | #define GPIOC_PIN6 6U | ||
95 | #define GPIOC_PIN7 7U | ||
96 | #define GPIOC_PIN8 8U | ||
97 | #define GPIOC_PIN9 9U | ||
98 | #define GPIOC_PIN10 10U | ||
99 | #define GPIOC_PIN11 11U | ||
100 | #define GPIOC_PIN12 12U | ||
101 | #define GPIOC_PIN13 13U | ||
102 | #define GPIOC_PIN14 14U | ||
103 | #define GPIOC_PIN15 15U | ||
104 | |||
105 | #define GPIOD_PIN0 0U | ||
106 | #define GPIOD_PIN1 1U | ||
107 | #define GPIOD_PIN2 2U | ||
108 | #define GPIOD_PIN3 3U | ||
109 | #define GPIOD_PIN4 4U | ||
110 | #define GPIOD_PIN5 5U | ||
111 | #define GPIOD_PIN6 6U | ||
112 | #define GPIOD_PIN7 7U | ||
113 | #define GPIOD_PIN8 8U | ||
114 | #define GPIOD_PIN9 9U | ||
115 | #define GPIOD_PIN10 10U | ||
116 | #define GPIOD_PIN11 11U | ||
117 | #define GPIOD_PIN12 12U | ||
118 | #define GPIOD_PIN13 13U | ||
119 | #define GPIOD_PIN14 14U | ||
120 | #define GPIOD_PIN15 15U | ||
121 | |||
122 | #define GPIOE_PIN0 0U | ||
123 | #define GPIOE_PIN1 1U | ||
124 | #define GPIOE_PIN2 2U | ||
125 | #define GPIOE_PIN3 3U | ||
126 | #define GPIOE_PIN4 4U | ||
127 | #define GPIOE_PIN5 5U | ||
128 | #define GPIOE_PIN6 6U | ||
129 | #define GPIOE_PIN7 7U | ||
130 | #define GPIOE_PIN8 8U | ||
131 | #define GPIOE_PIN9 9U | ||
132 | #define GPIOE_PIN10 10U | ||
133 | #define GPIOE_PIN11 11U | ||
134 | #define GPIOE_PIN12 12U | ||
135 | #define GPIOE_PIN13 13U | ||
136 | #define GPIOE_PIN14 14U | ||
137 | #define GPIOE_PIN15 15U | ||
138 | |||
139 | #define GPIOF_I2C2_SDA 0U | ||
140 | #define GPIOF_I2C2_SCL 1U | ||
141 | #define GPIOF_PIN2 2U | ||
142 | #define GPIOF_PIN3 3U | ||
143 | #define GPIOF_PIN4 4U | ||
144 | #define GPIOF_PIN5 5U | ||
145 | #define GPIOF_PIN6 6U | ||
146 | #define GPIOF_PIN7 7U | ||
147 | #define GPIOF_PIN8 8U | ||
148 | #define GPIOF_PIN9 9U | ||
149 | #define GPIOF_PIN10 10U | ||
150 | #define GPIOF_PIN11 11U | ||
151 | #define GPIOF_PIN12 12U | ||
152 | #define GPIOF_PIN13 13U | ||
153 | #define GPIOF_PIN14 14U | ||
154 | #define GPIOF_PIN15 15U | ||
155 | |||
156 | #define GPIOG_PIN0 0U | ||
157 | #define GPIOG_PIN1 1U | ||
158 | #define GPIOG_PIN2 2U | ||
159 | #define GPIOG_PIN3 3U | ||
160 | #define GPIOG_PIN4 4U | ||
161 | #define GPIOG_PIN5 5U | ||
162 | #define GPIOG_PIN6 6U | ||
163 | #define GPIOG_PIN7 7U | ||
164 | #define GPIOG_PIN8 8U | ||
165 | #define GPIOG_PIN9 9U | ||
166 | #define GPIOG_PIN10 10U | ||
167 | #define GPIOG_PIN11 11U | ||
168 | #define GPIOG_PIN12 12U | ||
169 | #define GPIOG_PIN13 13U | ||
170 | #define GPIOG_PIN14 14U | ||
171 | #define GPIOG_PIN15 15U | ||
172 | |||
173 | #define GPIOH_PIN0 0U | ||
174 | #define GPIOH_PIN1 1U | ||
175 | #define GPIOH_PIN2 2U | ||
176 | #define GPIOH_PIN3 3U | ||
177 | #define GPIOH_PIN4 4U | ||
178 | #define GPIOH_PIN5 5U | ||
179 | #define GPIOH_PIN6 6U | ||
180 | #define GPIOH_PIN7 7U | ||
181 | #define GPIOH_PIN8 8U | ||
182 | #define GPIOH_PIN9 9U | ||
183 | #define GPIOH_PIN10 10U | ||
184 | #define GPIOH_PIN11 11U | ||
185 | #define GPIOH_PIN12 12U | ||
186 | #define GPIOH_PIN13 13U | ||
187 | #define GPIOH_PIN14 14U | ||
188 | #define GPIOH_PIN15 15U | ||
189 | |||
190 | /* | ||
191 | * IO lines assignments. | ||
192 | */ | ||
193 | #define LINE_L3GD20_SDI PAL_LINE(GPIOA, 7U) | ||
194 | #define LINE_USB_DM PAL_LINE(GPIOA, 11U) | ||
195 | #define LINE_USB_DP PAL_LINE(GPIOA, 12U) | ||
196 | #define LINE_SWDIO PAL_LINE(GPIOA, 13U) | ||
197 | #define LINE_SWCLK PAL_LINE(GPIOA, 14U) | ||
198 | |||
199 | #define LINE_PIN6 PAL_LINE(GPIOF, 0U) | ||
200 | #define LINE_PIN7 PAL_LINE(GPIOF, 1U) | ||
201 | |||
202 | #define LINE_CAPS_LOCK PAL_LINE(GPIOB, 7U) | ||
203 | |||
204 | |||
205 | /* | ||
206 | * I/O ports initial setup, this configuration is established soon after reset | ||
207 | * in the initialization code. | ||
208 | * Please refer to the STM32 Reference Manual for details. | ||
209 | */ | ||
210 | #define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) | ||
211 | #define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) | ||
212 | #define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) | ||
213 | #define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) | ||
214 | #define PIN_ODR_LOW(n) (0U << (n)) | ||
215 | #define PIN_ODR_HIGH(n) (1U << (n)) | ||
216 | #define PIN_OTYPE_PUSHPULL(n) (0U << (n)) | ||
217 | #define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) | ||
218 | #define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) | ||
219 | #define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) | ||
220 | #define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) | ||
221 | #define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) | ||
222 | #define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) | ||
223 | #define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) | ||
224 | #define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) | ||
225 | #define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) | ||
226 | |||
227 | /* | ||
228 | * GPIOA setup: | ||
229 | * | ||
230 | * PA0 - NC | ||
231 | * PA1 - NC | ||
232 | * PA2 - COL1 | ||
233 | * PA3 - COL2 | ||
234 | * PA4 - SPEAKER1 | ||
235 | * PA5 - SPEAKER2 | ||
236 | * PA6 - COL3 | ||
237 | * PA7 - COL8 | ||
238 | * PA8 - COL6 | ||
239 | * PA9 - COL7 | ||
240 | * PA10 - ROW5 | ||
241 | * PA11 - USB_DM (alternate 14). | ||
242 | * PA12 - USB_DP (alternate 14). | ||
243 | * PA13 - SWDIO (alternate 0). | ||
244 | * PA14 - SWCLK (alternate 0). | ||
245 | * PA15 - ROW4 | ||
246 | */ | ||
247 | #define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_PIN0) | \ | ||
248 | PIN_MODE_ALTERNATE(GPIOA_PIN1) | \ | ||
249 | PIN_MODE_INPUT(GPIOA_PIN2) | \ | ||
250 | PIN_MODE_INPUT(GPIOA_PIN3) | \ | ||
251 | PIN_MODE_INPUT(GPIOA_PIN4) | \ | ||
252 | PIN_MODE_INPUT(GPIOA_PIN5) | \ | ||
253 | PIN_MODE_INPUT(GPIOA_PIN6) | \ | ||
254 | PIN_MODE_INPUT(GPIOA_PIN7) | \ | ||
255 | PIN_MODE_INPUT(GPIOA_PIN8) | \ | ||
256 | PIN_MODE_INPUT(GPIOA_PIN9) | \ | ||
257 | PIN_MODE_INPUT(GPIOA_PIN10) | \ | ||
258 | PIN_MODE_ALTERNATE(GPIOA_USB_DM) | \ | ||
259 | PIN_MODE_ALTERNATE(GPIOA_USB_DP) | \ | ||
260 | PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ | ||
261 | PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ | ||
262 | PIN_MODE_INPUT(GPIOA_PIN15)) | ||
263 | #define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_PIN0) | \ | ||
264 | PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ | ||
265 | PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ | ||
266 | PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ | ||
267 | PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ | ||
268 | PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ | ||
269 | PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ | ||
270 | PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ | ||
271 | PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ | ||
272 | PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ | ||
273 | PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ | ||
274 | PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \ | ||
275 | PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \ | ||
276 | PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ | ||
277 | PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ | ||
278 | PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) | ||
279 | #define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_PIN0) | \ | ||
280 | PIN_OSPEED_HIGH(GPIOA_PIN1) | \ | ||
281 | PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ | ||
282 | PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ | ||
283 | PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ | ||
284 | PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ | ||
285 | PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ | ||
286 | PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ | ||
287 | PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ | ||
288 | PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ | ||
289 | PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ | ||
290 | PIN_OSPEED_HIGH(GPIOA_USB_DM) | \ | ||
291 | PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ | ||
292 | PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ | ||
293 | PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ | ||
294 | PIN_OSPEED_VERYLOW(GPIOA_PIN15)) | ||
295 | #define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_PIN0) | \ | ||
296 | PIN_PUPDR_FLOATING(GPIOA_PIN1) | \ | ||
297 | PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ | ||
298 | PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ | ||
299 | PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ | ||
300 | PIN_PUPDR_PULLUP(GPIOA_PIN5) | \ | ||
301 | PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ | ||
302 | PIN_PUPDR_FLOATING(GPIOA_PIN7) | \ | ||
303 | PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ | ||
304 | PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ | ||
305 | PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ | ||
306 | PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \ | ||
307 | PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \ | ||
308 | PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \ | ||
309 | PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ | ||
310 | PIN_PUPDR_PULLUP(GPIOA_PIN15)) | ||
311 | #define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_PIN0) | \ | ||
312 | PIN_ODR_HIGH(GPIOA_PIN1) | \ | ||
313 | PIN_ODR_HIGH(GPIOA_PIN2) | \ | ||
314 | PIN_ODR_HIGH(GPIOA_PIN3) | \ | ||
315 | PIN_ODR_HIGH(GPIOA_PIN4) | \ | ||
316 | PIN_ODR_HIGH(GPIOA_PIN5) | \ | ||
317 | PIN_ODR_HIGH(GPIOA_PIN6) | \ | ||
318 | PIN_ODR_HIGH(GPIOA_PIN7) | \ | ||
319 | PIN_ODR_HIGH(GPIOA_PIN8) | \ | ||
320 | PIN_ODR_HIGH(GPIOA_PIN9) | \ | ||
321 | PIN_ODR_HIGH(GPIOA_PIN10) | \ | ||
322 | PIN_ODR_HIGH(GPIOA_USB_DM) | \ | ||
323 | PIN_ODR_HIGH(GPIOA_USB_DP) | \ | ||
324 | PIN_ODR_HIGH(GPIOA_SWDIO) | \ | ||
325 | PIN_ODR_HIGH(GPIOA_SWCLK) | \ | ||
326 | PIN_ODR_HIGH(GPIOA_PIN15)) | ||
327 | #define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_PIN0, 0) | \ | ||
328 | PIN_AFIO_AF(GPIOA_PIN1, 1) | \ | ||
329 | PIN_AFIO_AF(GPIOA_PIN2, 0) | \ | ||
330 | PIN_AFIO_AF(GPIOA_PIN3, 0) | \ | ||
331 | PIN_AFIO_AF(GPIOA_PIN4, 0) | \ | ||
332 | PIN_AFIO_AF(GPIOA_PIN5, 5) | \ | ||
333 | PIN_AFIO_AF(GPIOA_PIN6, 5) | \ | ||
334 | PIN_AFIO_AF(GPIOA_PIN7, 5)) | ||
335 | #define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0) | \ | ||
336 | PIN_AFIO_AF(GPIOA_PIN9, 0) | \ | ||
337 | PIN_AFIO_AF(GPIOA_PIN10, 0) | \ | ||
338 | PIN_AFIO_AF(GPIOA_USB_DM, 14) | \ | ||
339 | PIN_AFIO_AF(GPIOA_USB_DP, 14) | \ | ||
340 | PIN_AFIO_AF(GPIOA_SWDIO, 0) | \ | ||
341 | PIN_AFIO_AF(GPIOA_SWCLK, 0) | \ | ||
342 | PIN_AFIO_AF(GPIOA_PIN15, 0)) | ||
343 | |||
344 | /* | ||
345 | * GPIOB setup: | ||
346 | * | ||
347 | * PB0 - PIN0 (input pullup). | ||
348 | * PB1 - PIN1 (input pullup). | ||
349 | * PB2 - PIN2 (input pullup). | ||
350 | * PB3 - PIN3 (alternate 0). | ||
351 | * PB4 - PIN4 (input pullup). | ||
352 | * PB5 - PIN5 (input pullup). | ||
353 | * PB6 - PIN6 LSM303DLHC_SCL (alternate 4). | ||
354 | * PB7 - PIN7 LSM303DLHC_SDA (alternate 4). | ||
355 | * PB8 - PIN8 (input pullup). | ||
356 | * PB9 - PIN9 (input pullup). | ||
357 | * PB10 - PIN10 (input pullup). | ||
358 | * PB11 - PIN11 (input pullup). | ||
359 | * PB12 - PIN12 (input pullup). | ||
360 | * PB13 - PIN13 (input pullup). | ||
361 | * PB14 - PIN14 (input pullup). | ||
362 | * PB15 - PIN15 (input pullup). | ||
363 | */ | ||
364 | #define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ | ||
365 | PIN_MODE_INPUT(GPIOB_PIN1) | \ | ||
366 | PIN_MODE_INPUT(GPIOB_PIN2) | \ | ||
367 | PIN_MODE_ALTERNATE(GPIOB_PIN3) | \ | ||
368 | PIN_MODE_INPUT(GPIOB_PIN4) | \ | ||
369 | PIN_MODE_INPUT(GPIOB_PIN5) | \ | ||
370 | PIN_MODE_ALTERNATE(GPIOB_PIN6) | \ | ||
371 | PIN_MODE_OUTPUT(GPIOB_PIN7) | \ | ||
372 | PIN_MODE_INPUT(GPIOB_PIN8) | \ | ||
373 | PIN_MODE_INPUT(GPIOB_PIN9) | \ | ||
374 | PIN_MODE_INPUT(GPIOB_PIN10) | \ | ||
375 | PIN_MODE_INPUT(GPIOB_PIN11) | \ | ||
376 | PIN_MODE_INPUT(GPIOB_PIN12) | \ | ||
377 | PIN_MODE_INPUT(GPIOB_PIN13) | \ | ||
378 | PIN_MODE_INPUT(GPIOB_PIN14) | \ | ||
379 | PIN_MODE_INPUT(GPIOB_PIN15)) | ||
380 | #define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ | ||
381 | PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ | ||
382 | PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ | ||
383 | PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ | ||
384 | PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ | ||
385 | PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ | ||
386 | PIN_OTYPE_OPENDRAIN(GPIOB_PIN6) | \ | ||
387 | PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ | ||
388 | PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ | ||
389 | PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ | ||
390 | PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ | ||
391 | PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ | ||
392 | PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ | ||
393 | PIN_OTYPE_PUSHPULL(GPIOB_PIN13) | \ | ||
394 | PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | \ | ||
395 | PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) | ||
396 | #define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ | ||
397 | PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ | ||
398 | PIN_OSPEED_VERYLOW(GPIOB_PIN2) | \ | ||
399 | PIN_OSPEED_HIGH(GPIOB_PIN3) | \ | ||
400 | PIN_OSPEED_VERYLOW(GPIOB_PIN4) | \ | ||
401 | PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ | ||
402 | PIN_OSPEED_HIGH(GPIOB_PIN6) | \ | ||
403 | PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ | ||
404 | PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ | ||
405 | PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \ | ||
406 | PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \ | ||
407 | PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \ | ||
408 | PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \ | ||
409 | PIN_OSPEED_VERYLOW(GPIOB_PIN13) | \ | ||
410 | PIN_OSPEED_VERYLOW(GPIOB_PIN14) | \ | ||
411 | PIN_OSPEED_VERYLOW(GPIOB_PIN15)) | ||
412 | #define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ | ||
413 | PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ | ||
414 | PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ | ||
415 | PIN_PUPDR_FLOATING(GPIOB_PIN3) | \ | ||
416 | PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ | ||
417 | PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ | ||
418 | PIN_PUPDR_FLOATING(GPIOB_PIN6) | \ | ||
419 | PIN_PUPDR_PULLDOWN(GPIOB_PIN7) | \ | ||
420 | PIN_PUPDR_PULLUP(GPIOB_PIN8) | \ | ||
421 | PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ | ||
422 | PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ | ||
423 | PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ | ||
424 | PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ | ||
425 | PIN_PUPDR_PULLUP(GPIOB_PIN13) | \ | ||
426 | PIN_PUPDR_PULLUP(GPIOB_PIN14) | \ | ||
427 | PIN_PUPDR_PULLUP(GPIOB_PIN15)) | ||
428 | #define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ | ||
429 | PIN_ODR_HIGH(GPIOB_PIN1) | \ | ||
430 | PIN_ODR_HIGH(GPIOB_PIN2) | \ | ||
431 | PIN_ODR_HIGH(GPIOB_PIN3) | \ | ||
432 | PIN_ODR_HIGH(GPIOB_PIN4) | \ | ||
433 | PIN_ODR_HIGH(GPIOB_PIN5) | \ | ||
434 | PIN_ODR_HIGH(GPIOB_PIN6) | \ | ||
435 | PIN_ODR_LOW(GPIOB_PIN7) | \ | ||
436 | PIN_ODR_HIGH(GPIOB_PIN8) | \ | ||
437 | PIN_ODR_HIGH(GPIOB_PIN9) | \ | ||
438 | PIN_ODR_HIGH(GPIOB_PIN10) | \ | ||
439 | PIN_ODR_HIGH(GPIOB_PIN11) | \ | ||
440 | PIN_ODR_HIGH(GPIOB_PIN12) | \ | ||
441 | PIN_ODR_HIGH(GPIOB_PIN13) | \ | ||
442 | PIN_ODR_HIGH(GPIOB_PIN14) | \ | ||
443 | PIN_ODR_HIGH(GPIOB_PIN15)) | ||
444 | #define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0) | \ | ||
445 | PIN_AFIO_AF(GPIOB_PIN1, 0) | \ | ||
446 | PIN_AFIO_AF(GPIOB_PIN2, 0) | \ | ||
447 | PIN_AFIO_AF(GPIOB_PIN3, 0) | \ | ||
448 | PIN_AFIO_AF(GPIOB_PIN4, 0) | \ | ||
449 | PIN_AFIO_AF(GPIOB_PIN5, 0) | \ | ||
450 | PIN_AFIO_AF(GPIOB_PIN6, 4) | \ | ||
451 | PIN_AFIO_AF(GPIOB_PIN7, 0)) | ||
452 | #define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0) | \ | ||
453 | PIN_AFIO_AF(GPIOB_PIN9, 0) | \ | ||
454 | PIN_AFIO_AF(GPIOB_PIN10, 0) | \ | ||
455 | PIN_AFIO_AF(GPIOB_PIN11, 0) | \ | ||
456 | PIN_AFIO_AF(GPIOB_PIN12, 0) | \ | ||
457 | PIN_AFIO_AF(GPIOB_PIN13, 0) | \ | ||
458 | PIN_AFIO_AF(GPIOB_PIN14, 0) | \ | ||
459 | PIN_AFIO_AF(GPIOB_PIN15, 0)) | ||
460 | |||
461 | /* | ||
462 | * GPIOC setup: | ||
463 | * | ||
464 | * PC0 - PIN0 (input pullup). | ||
465 | * PC1 - PIN1 (input pullup). | ||
466 | * PC2 - PIN2 (input pullup). | ||
467 | * PC3 - PIN3 (input pullup). | ||
468 | * PC4 - PIN4 (input pullup). | ||
469 | * PC5 - PIN5 (input pullup). | ||
470 | * PC6 - PIN6 (input pullup). | ||
471 | * PC7 - PIN7 (input pullup). | ||
472 | * PC8 - PIN8 (input pullup). | ||
473 | * PC9 - PIN9 (input pullup). | ||
474 | * PC10 - PIN10 (input pullup). | ||
475 | * PC11 - PIN11 (input pullup). | ||
476 | * PC12 - PIN12 (input pullup). | ||
477 | * PC13 - PIN13 (input pullup). | ||
478 | * PC14 - PIN14 (input floating). | ||
479 | * PC15 - PIN15 (input floating). | ||
480 | */ | ||
481 | #define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_PIN0) | \ | ||
482 | PIN_MODE_INPUT(GPIOC_PIN1) | \ | ||
483 | PIN_MODE_INPUT(GPIOC_PIN2) | \ | ||
484 | PIN_MODE_INPUT(GPIOC_PIN3) | \ | ||
485 | PIN_MODE_INPUT(GPIOC_PIN4) | \ | ||
486 | PIN_MODE_INPUT(GPIOC_PIN5) | \ | ||
487 | PIN_MODE_INPUT(GPIOC_PIN6) | \ | ||
488 | PIN_MODE_INPUT(GPIOC_PIN7) | \ | ||
489 | PIN_MODE_INPUT(GPIOC_PIN8) | \ | ||
490 | PIN_MODE_INPUT(GPIOC_PIN9) | \ | ||
491 | PIN_MODE_INPUT(GPIOC_PIN10) | \ | ||
492 | PIN_MODE_INPUT(GPIOC_PIN11) | \ | ||
493 | PIN_MODE_INPUT(GPIOC_PIN12) | \ | ||
494 | PIN_MODE_INPUT(GPIOC_PIN13) | \ | ||
495 | PIN_MODE_INPUT(GPIOC_PIN14) | \ | ||
496 | PIN_MODE_INPUT(GPIOC_PIN15)) | ||
497 | #define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_PIN0) | \ | ||
498 | PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ | ||
499 | PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ | ||
500 | PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ | ||
501 | PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ | ||
502 | PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ | ||
503 | PIN_OTYPE_PUSHPULL(GPIOC_PIN6) | \ | ||
504 | PIN_OTYPE_PUSHPULL(GPIOC_PIN7) | \ | ||
505 | PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | \ | ||
506 | PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | \ | ||
507 | PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ | ||
508 | PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ | ||
509 | PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ | ||
510 | PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ | ||
511 | PIN_OTYPE_PUSHPULL(GPIOC_PIN14) | \ | ||
512 | PIN_OTYPE_PUSHPULL(GPIOC_PIN15)) | ||
513 | #define VAL_GPIOC_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOC_PIN0) | \ | ||
514 | PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \ | ||
515 | PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \ | ||
516 | PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \ | ||
517 | PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \ | ||
518 | PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \ | ||
519 | PIN_OSPEED_VERYLOW(GPIOC_PIN6) | \ | ||
520 | PIN_OSPEED_VERYLOW(GPIOC_PIN7) | \ | ||
521 | PIN_OSPEED_VERYLOW(GPIOC_PIN8) | \ | ||
522 | PIN_OSPEED_VERYLOW(GPIOC_PIN9) | \ | ||
523 | PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ | ||
524 | PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ | ||
525 | PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ | ||
526 | PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ | ||
527 | PIN_OSPEED_HIGH(GPIOC_PIN14) | \ | ||
528 | PIN_OSPEED_HIGH(GPIOC_PIN15)) | ||
529 | #define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_PIN0) | \ | ||
530 | PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ | ||
531 | PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ | ||
532 | PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ | ||
533 | PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ | ||
534 | PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ | ||
535 | PIN_PUPDR_PULLUP(GPIOC_PIN6) | \ | ||
536 | PIN_PUPDR_PULLUP(GPIOC_PIN7) | \ | ||
537 | PIN_PUPDR_PULLUP(GPIOC_PIN8) | \ | ||
538 | PIN_PUPDR_PULLUP(GPIOC_PIN9) | \ | ||
539 | PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ | ||
540 | PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ | ||
541 | PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ | ||
542 | PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ | ||
543 | PIN_PUPDR_FLOATING(GPIOC_PIN14) | \ | ||
544 | PIN_PUPDR_FLOATING(GPIOC_PIN15)) | ||
545 | #define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_PIN0) | \ | ||
546 | PIN_ODR_HIGH(GPIOC_PIN1) | \ | ||
547 | PIN_ODR_HIGH(GPIOC_PIN2) | \ | ||
548 | PIN_ODR_HIGH(GPIOC_PIN3) | \ | ||
549 | PIN_ODR_HIGH(GPIOC_PIN4) | \ | ||
550 | PIN_ODR_HIGH(GPIOC_PIN5) | \ | ||
551 | PIN_ODR_HIGH(GPIOC_PIN6) | \ | ||
552 | PIN_ODR_HIGH(GPIOC_PIN7) | \ | ||
553 | PIN_ODR_HIGH(GPIOC_PIN8) | \ | ||
554 | PIN_ODR_HIGH(GPIOC_PIN9) | \ | ||
555 | PIN_ODR_HIGH(GPIOC_PIN10) | \ | ||
556 | PIN_ODR_HIGH(GPIOC_PIN11) | \ | ||
557 | PIN_ODR_HIGH(GPIOC_PIN12) | \ | ||
558 | PIN_ODR_HIGH(GPIOC_PIN13) | \ | ||
559 | PIN_ODR_HIGH(GPIOC_PIN14) | \ | ||
560 | PIN_ODR_HIGH(GPIOC_PIN15)) | ||
561 | #define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_PIN0, 0) | \ | ||
562 | PIN_AFIO_AF(GPIOC_PIN1, 0) | \ | ||
563 | PIN_AFIO_AF(GPIOC_PIN2, 0) | \ | ||
564 | PIN_AFIO_AF(GPIOC_PIN3, 0) | \ | ||
565 | PIN_AFIO_AF(GPIOC_PIN4, 0) | \ | ||
566 | PIN_AFIO_AF(GPIOC_PIN5, 0) | \ | ||
567 | PIN_AFIO_AF(GPIOC_PIN6, 0) | \ | ||
568 | PIN_AFIO_AF(GPIOC_PIN7, 0)) | ||
569 | #define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0) | \ | ||
570 | PIN_AFIO_AF(GPIOC_PIN9, 0) | \ | ||
571 | PIN_AFIO_AF(GPIOC_PIN10, 0) | \ | ||
572 | PIN_AFIO_AF(GPIOC_PIN11, 0) | \ | ||
573 | PIN_AFIO_AF(GPIOC_PIN12, 0) | \ | ||
574 | PIN_AFIO_AF(GPIOC_PIN13, 0) | \ | ||
575 | PIN_AFIO_AF(GPIOC_PIN14, 0) | \ | ||
576 | PIN_AFIO_AF(GPIOC_PIN15, 0)) | ||
577 | |||
578 | /* | ||
579 | * GPIOD setup: | ||
580 | * | ||
581 | * PD0 - PIN0 (input pullup). | ||
582 | * PD1 - PIN1 (input pullup). | ||
583 | * PD2 - PIN2 (input pullup). | ||
584 | * PD3 - PIN3 (input pullup). | ||
585 | * PD4 - PIN4 (input pullup). | ||
586 | * PD5 - PIN5 (input pullup). | ||
587 | * PD6 - PIN6 (input pullup). | ||
588 | * PD7 - PIN7 (input pullup). | ||
589 | * PD8 - PIN8 (input pullup). | ||
590 | * PD9 - PIN9 (input pullup). | ||
591 | * PD11 - PIN10 (input pullup). | ||
592 | * PD11 - PIN11 (input pullup). | ||
593 | * PD12 - PIN12 (input pullup). | ||
594 | * PD13 - PIN13 (input pullup). | ||
595 | * PD14 - PIN14 (input pullup). | ||
596 | * PD15 - PIN15 (input pullup). | ||
597 | */ | ||
598 | #define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ | ||
599 | PIN_MODE_INPUT(GPIOD_PIN1) | \ | ||
600 | PIN_MODE_INPUT(GPIOD_PIN2) | \ | ||
601 | PIN_MODE_INPUT(GPIOD_PIN3) | \ | ||
602 | PIN_MODE_INPUT(GPIOD_PIN4) | \ | ||
603 | PIN_MODE_INPUT(GPIOD_PIN5) | \ | ||
604 | PIN_MODE_INPUT(GPIOD_PIN6) | \ | ||
605 | PIN_MODE_INPUT(GPIOD_PIN7) | \ | ||
606 | PIN_MODE_INPUT(GPIOD_PIN8) | \ | ||
607 | PIN_MODE_INPUT(GPIOD_PIN9) | \ | ||
608 | PIN_MODE_INPUT(GPIOD_PIN10) | \ | ||
609 | PIN_MODE_INPUT(GPIOD_PIN11) | \ | ||
610 | PIN_MODE_INPUT(GPIOD_PIN12) | \ | ||
611 | PIN_MODE_INPUT(GPIOD_PIN13) | \ | ||
612 | PIN_MODE_INPUT(GPIOD_PIN14) | \ | ||
613 | PIN_MODE_INPUT(GPIOD_PIN15)) | ||
614 | #define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ | ||
615 | PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ | ||
616 | PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ | ||
617 | PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ | ||
618 | PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ | ||
619 | PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ | ||
620 | PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ | ||
621 | PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ | ||
622 | PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ | ||
623 | PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ | ||
624 | PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ | ||
625 | PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ | ||
626 | PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ | ||
627 | PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ | ||
628 | PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ | ||
629 | PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) | ||
630 | #define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \ | ||
631 | PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \ | ||
632 | PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \ | ||
633 | PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \ | ||
634 | PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \ | ||
635 | PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \ | ||
636 | PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \ | ||
637 | PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \ | ||
638 | PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \ | ||
639 | PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \ | ||
640 | PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \ | ||
641 | PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \ | ||
642 | PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \ | ||
643 | PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \ | ||
644 | PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \ | ||
645 | PIN_OSPEED_VERYLOW(GPIOD_PIN15)) | ||
646 | #define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ | ||
647 | PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ | ||
648 | PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ | ||
649 | PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ | ||
650 | PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ | ||
651 | PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ | ||
652 | PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ | ||
653 | PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ | ||
654 | PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ | ||
655 | PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ | ||
656 | PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ | ||
657 | PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ | ||
658 | PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ | ||
659 | PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ | ||
660 | PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ | ||
661 | PIN_PUPDR_PULLUP(GPIOD_PIN15)) | ||
662 | #define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ | ||
663 | PIN_ODR_HIGH(GPIOD_PIN1) | \ | ||
664 | PIN_ODR_HIGH(GPIOD_PIN2) | \ | ||
665 | PIN_ODR_HIGH(GPIOD_PIN3) | \ | ||
666 | PIN_ODR_HIGH(GPIOD_PIN4) | \ | ||
667 | PIN_ODR_HIGH(GPIOD_PIN5) | \ | ||
668 | PIN_ODR_HIGH(GPIOD_PIN6) | \ | ||
669 | PIN_ODR_HIGH(GPIOD_PIN7) | \ | ||
670 | PIN_ODR_HIGH(GPIOD_PIN8) | \ | ||
671 | PIN_ODR_HIGH(GPIOD_PIN9) | \ | ||
672 | PIN_ODR_HIGH(GPIOD_PIN10) | \ | ||
673 | PIN_ODR_HIGH(GPIOD_PIN11) | \ | ||
674 | PIN_ODR_HIGH(GPIOD_PIN12) | \ | ||
675 | PIN_ODR_HIGH(GPIOD_PIN13) | \ | ||
676 | PIN_ODR_HIGH(GPIOD_PIN14) | \ | ||
677 | PIN_ODR_HIGH(GPIOD_PIN15)) | ||
678 | #define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0) | \ | ||
679 | PIN_AFIO_AF(GPIOD_PIN1, 0) | \ | ||
680 | PIN_AFIO_AF(GPIOD_PIN2, 0) | \ | ||
681 | PIN_AFIO_AF(GPIOD_PIN3, 0) | \ | ||
682 | PIN_AFIO_AF(GPIOD_PIN4, 0) | \ | ||
683 | PIN_AFIO_AF(GPIOD_PIN5, 0) | \ | ||
684 | PIN_AFIO_AF(GPIOD_PIN6, 0) | \ | ||
685 | PIN_AFIO_AF(GPIOD_PIN7, 0)) | ||
686 | #define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0) | \ | ||
687 | PIN_AFIO_AF(GPIOD_PIN9, 0) | \ | ||
688 | PIN_AFIO_AF(GPIOD_PIN10, 0) | \ | ||
689 | PIN_AFIO_AF(GPIOD_PIN11, 0) | \ | ||
690 | PIN_AFIO_AF(GPIOD_PIN12, 0) | \ | ||
691 | PIN_AFIO_AF(GPIOD_PIN13, 0) | \ | ||
692 | PIN_AFIO_AF(GPIOD_PIN14, 0) | \ | ||
693 | PIN_AFIO_AF(GPIOD_PIN15, 0)) | ||
694 | |||
695 | /* | ||
696 | * GPIOE setup: | ||
697 | * | ||
698 | * PE0 - PIN0 (input pullup). | ||
699 | * PE1 - PIN1 (input pullup). | ||
700 | * PE2 - PIN2 (input pullup). | ||
701 | * PE3 - PIN3 L3GD20_CS (output pushpull maximum). | ||
702 | * PE4 - PIN4 (input pullup). | ||
703 | * PE5 - PIN5 (input pullup). | ||
704 | * PE6 - PIN6 (input pullup). | ||
705 | * PE7 - PIN7 (input pullup). | ||
706 | * PE8 - PIN8 (output pushpull maximum). | ||
707 | * PE9 - PIN9 (output pushpull maximum). | ||
708 | * PE10 - PIN10 (output pushpull maximum). | ||
709 | * PE11 - PIN11 (output pushpull maximum). | ||
710 | * PE12 - PIN12 (output pushpull maximum). | ||
711 | * PE13 - PIN13 (output pushpull maximum). | ||
712 | * PE14 - PIN14 (output pushpull maximum). | ||
713 | * PE15 - PIN15 (output pushpull maximum). | ||
714 | */ | ||
715 | #define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ | ||
716 | PIN_MODE_INPUT(GPIOE_PIN1) | \ | ||
717 | PIN_MODE_INPUT(GPIOE_PIN2) |\ | ||
718 | PIN_MODE_OUTPUT(GPIOE_PIN3) | \ | ||
719 | PIN_MODE_INPUT(GPIOE_PIN4) |\ | ||
720 | PIN_MODE_INPUT(GPIOE_PIN5) |\ | ||
721 | PIN_MODE_INPUT(GPIOE_PIN6) | \ | ||
722 | PIN_MODE_INPUT(GPIOE_PIN7) | \ | ||
723 | PIN_MODE_OUTPUT(GPIOE_PIN8) | \ | ||
724 | PIN_MODE_OUTPUT(GPIOE_PIN9) | \ | ||
725 | PIN_MODE_OUTPUT(GPIOE_PIN10) | \ | ||
726 | PIN_MODE_OUTPUT(GPIOE_PIN11) | \ | ||
727 | PIN_MODE_OUTPUT(GPIOE_PIN12) | \ | ||
728 | PIN_MODE_OUTPUT(GPIOE_PIN13) | \ | ||
729 | PIN_MODE_OUTPUT(GPIOE_PIN14) | \ | ||
730 | PIN_MODE_OUTPUT(GPIOE_PIN15)) | ||
731 | #define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) |\ | ||
732 | PIN_OTYPE_PUSHPULL(GPIOE_PIN1) |\ | ||
733 | PIN_OTYPE_PUSHPULL(GPIOE_PIN2) |\ | ||
734 | PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ | ||
735 | PIN_OTYPE_PUSHPULL(GPIOE_PIN4) |\ | ||
736 | PIN_OTYPE_PUSHPULL(GPIOE_PIN5) |\ | ||
737 | PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ | ||
738 | PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ | ||
739 | PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ | ||
740 | PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ | ||
741 | PIN_OTYPE_PUSHPULL(GPIOE_PIN10) |\ | ||
742 | PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ | ||
743 | PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ | ||
744 | PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ | ||
745 | PIN_OTYPE_PUSHPULL(GPIOE_PIN14) |\ | ||
746 | PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) | ||
747 | #define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) |\ | ||
748 | PIN_OSPEED_VERYLOW(GPIOE_PIN1) |\ | ||
749 | PIN_OSPEED_VERYLOW(GPIOE_PIN2) |\ | ||
750 | PIN_OSPEED_HIGH(GPIOE_PIN3) | \ | ||
751 | PIN_OSPEED_VERYLOW(GPIOE_PIN4) |\ | ||
752 | PIN_OSPEED_VERYLOW(GPIOE_PIN5) |\ | ||
753 | PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ | ||
754 | PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ | ||
755 | PIN_OSPEED_HIGH(GPIOE_PIN8) | \ | ||
756 | PIN_OSPEED_HIGH(GPIOE_PIN9) | \ | ||
757 | PIN_OSPEED_HIGH(GPIOE_PIN10) | \ | ||
758 | PIN_OSPEED_HIGH(GPIOE_PIN11) | \ | ||
759 | PIN_OSPEED_HIGH(GPIOE_PIN12) | \ | ||
760 | PIN_OSPEED_HIGH(GPIOE_PIN13) | \ | ||
761 | PIN_OSPEED_HIGH(GPIOE_PIN14) | \ | ||
762 | PIN_OSPEED_HIGH(GPIOE_PIN15)) | ||
763 | #define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ | ||
764 | PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ | ||
765 | PIN_PUPDR_PULLUP(GPIOE_PIN2) |\ | ||
766 | PIN_PUPDR_FLOATING(GPIOE_PIN3) | \ | ||
767 | PIN_PUPDR_PULLUP(GPIOE_PIN4) |\ | ||
768 | PIN_PUPDR_PULLUP(GPIOE_PIN5) |\ | ||
769 | PIN_PUPDR_PULLUP(GPIOE_PIN6) | \ | ||
770 | PIN_PUPDR_PULLUP(GPIOE_PIN7) | \ | ||
771 | PIN_PUPDR_PULLUP(GPIOE_PIN8) | \ | ||
772 | PIN_PUPDR_PULLUP(GPIOE_PIN9) | \ | ||
773 | PIN_PUPDR_PULLUP(GPIOE_PIN10) | \ | ||
774 | PIN_PUPDR_FLOATING(GPIOE_PIN11) | \ | ||
775 | PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ | ||
776 | PIN_PUPDR_FLOATING(GPIOE_PIN13) | \ | ||
777 | PIN_PUPDR_FLOATING(GPIOE_PIN14) |\ | ||
778 | PIN_PUPDR_FLOATING(GPIOE_PIN15)) | ||
779 | #define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ | ||
780 | PIN_ODR_HIGH(GPIOE_PIN1) | \ | ||
781 | PIN_ODR_HIGH(GPIOE_PIN2) | \ | ||
782 | PIN_ODR_HIGH(GPIOE_PIN3) | \ | ||
783 | PIN_ODR_HIGH(GPIOE_PIN4) | \ | ||
784 | PIN_ODR_HIGH(GPIOE_PIN5) | \ | ||
785 | PIN_ODR_HIGH(GPIOE_PIN6) | \ | ||
786 | PIN_ODR_HIGH(GPIOE_PIN7) | \ | ||
787 | PIN_ODR_LOW(GPIOE_PIN8) | \ | ||
788 | PIN_ODR_LOW(GPIOE_PIN9) | \ | ||
789 | PIN_ODR_LOW(GPIOE_PIN10) | \ | ||
790 | PIN_ODR_LOW(GPIOE_PIN11) | \ | ||
791 | PIN_ODR_LOW(GPIOE_PIN12) | \ | ||
792 | PIN_ODR_LOW(GPIOE_PIN13) | \ | ||
793 | PIN_ODR_LOW(GPIOE_PIN14) | \ | ||
794 | PIN_ODR_LOW(GPIOE_PIN15)) | ||
795 | #define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0) | \ | ||
796 | PIN_AFIO_AF(GPIOE_PIN1, 0) | \ | ||
797 | PIN_AFIO_AF(GPIOE_PIN2, 0) |\ | ||
798 | PIN_AFIO_AF(GPIOE_PIN3, 0) | \ | ||
799 | PIN_AFIO_AF(GPIOE_PIN4, 0) |\ | ||
800 | PIN_AFIO_AF(GPIOE_PIN5, 0) |\ | ||
801 | PIN_AFIO_AF(GPIOE_PIN6, 0) | \ | ||
802 | PIN_AFIO_AF(GPIOE_PIN7, 0)) | ||
803 | #define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0) | \ | ||
804 | PIN_AFIO_AF(GPIOE_PIN9, 0) | \ | ||
805 | PIN_AFIO_AF(GPIOE_PIN10, 0) | \ | ||
806 | PIN_AFIO_AF(GPIOE_PIN11, 0) | \ | ||
807 | PIN_AFIO_AF(GPIOE_PIN12, 0) | \ | ||
808 | PIN_AFIO_AF(GPIOE_PIN13, 0) | \ | ||
809 | PIN_AFIO_AF(GPIOE_PIN14, 0) | \ | ||
810 | PIN_AFIO_AF(GPIOE_PIN15, 0)) | ||
811 | |||
812 | /* | ||
813 | * GPIOF setup: | ||
814 | * | ||
815 | * PF0 - I2C2_SDA (input floating). | ||
816 | * PF1 - I2C2_SCL (input floating). | ||
817 | * PF2 - PIN2 (input pullup). | ||
818 | * PF3 - PIN3 (input pullup). | ||
819 | * PF4 - PIN4 (input pullup). | ||
820 | * PF5 - PIN5 (input pullup). | ||
821 | * PF6 - PIN6 (input pullup). | ||
822 | * PF7 - PIN7 (input pullup). | ||
823 | * PF8 - PIN8 (input pullup). | ||
824 | * PF9 - PIN9 (input pullup). | ||
825 | * PF10 - PIN10 (input pullup). | ||
826 | * PF11 - PIN11 (input pullup). | ||
827 | * PF12 - PIN12 (input pullup). | ||
828 | * PF13 - PIN13 (input pullup). | ||
829 | * PF14 - PIN14 (input pullup). | ||
830 | * PF15 - PIN15 (input pullup). | ||
831 | */ | ||
832 | #define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_I2C2_SDA) | \ | ||
833 | PIN_MODE_INPUT(GPIOF_I2C2_SCL) | \ | ||
834 | PIN_MODE_INPUT(GPIOF_PIN2) | \ | ||
835 | PIN_MODE_INPUT(GPIOF_PIN3) | \ | ||
836 | PIN_MODE_INPUT(GPIOF_PIN4) | \ | ||
837 | PIN_MODE_INPUT(GPIOF_PIN5) | \ | ||
838 | PIN_MODE_INPUT(GPIOF_PIN6) | \ | ||
839 | PIN_MODE_INPUT(GPIOF_PIN7) | \ | ||
840 | PIN_MODE_INPUT(GPIOF_PIN8) | \ | ||
841 | PIN_MODE_INPUT(GPIOF_PIN9) | \ | ||
842 | PIN_MODE_INPUT(GPIOF_PIN10) | \ | ||
843 | PIN_MODE_INPUT(GPIOF_PIN11) | \ | ||
844 | PIN_MODE_INPUT(GPIOF_PIN12) | \ | ||
845 | PIN_MODE_INPUT(GPIOF_PIN13) | \ | ||
846 | PIN_MODE_INPUT(GPIOF_PIN14) | \ | ||
847 | PIN_MODE_INPUT(GPIOF_PIN15)) | ||
848 | #define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SDA) | \ | ||
849 | PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SCL) | \ | ||
850 | PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ | ||
851 | PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ | ||
852 | PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ | ||
853 | PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ | ||
854 | PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ | ||
855 | PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ | ||
856 | PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ | ||
857 | PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ | ||
858 | PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ | ||
859 | PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ | ||
860 | PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ | ||
861 | PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ | ||
862 | PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ | ||
863 | PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) | ||
864 | #define VAL_GPIOF_OSPEEDR (PIN_OSPEED_HIGH(GPIOF_I2C2_SDA) | \ | ||
865 | PIN_OSPEED_HIGH(GPIOF_I2C2_SCL) | \ | ||
866 | PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \ | ||
867 | PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \ | ||
868 | PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \ | ||
869 | PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \ | ||
870 | PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \ | ||
871 | PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \ | ||
872 | PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \ | ||
873 | PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \ | ||
874 | PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \ | ||
875 | PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \ | ||
876 | PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \ | ||
877 | PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \ | ||
878 | PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \ | ||
879 | PIN_OSPEED_VERYLOW(GPIOF_PIN15)) | ||
880 | #define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_I2C2_SDA) | \ | ||
881 | PIN_PUPDR_FLOATING(GPIOF_I2C2_SCL) | \ | ||
882 | PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ | ||
883 | PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ | ||
884 | PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ | ||
885 | PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ | ||
886 | PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ | ||
887 | PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ | ||
888 | PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ | ||
889 | PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ | ||
890 | PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ | ||
891 | PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ | ||
892 | PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ | ||
893 | PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ | ||
894 | PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ | ||
895 | PIN_PUPDR_PULLUP(GPIOF_PIN15)) | ||
896 | #define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_I2C2_SDA) | \ | ||
897 | PIN_ODR_HIGH(GPIOF_I2C2_SCL) | \ | ||
898 | PIN_ODR_HIGH(GPIOF_PIN2) | \ | ||
899 | PIN_ODR_HIGH(GPIOF_PIN3) | \ | ||
900 | PIN_ODR_HIGH(GPIOF_PIN4) | \ | ||
901 | PIN_ODR_HIGH(GPIOF_PIN5) | \ | ||
902 | PIN_ODR_HIGH(GPIOF_PIN6) | \ | ||
903 | PIN_ODR_HIGH(GPIOF_PIN7) | \ | ||
904 | PIN_ODR_HIGH(GPIOF_PIN8) | \ | ||
905 | PIN_ODR_HIGH(GPIOF_PIN9) | \ | ||
906 | PIN_ODR_HIGH(GPIOF_PIN10) | \ | ||
907 | PIN_ODR_HIGH(GPIOF_PIN11) | \ | ||
908 | PIN_ODR_HIGH(GPIOF_PIN12) | \ | ||
909 | PIN_ODR_HIGH(GPIOF_PIN13) | \ | ||
910 | PIN_ODR_HIGH(GPIOF_PIN14) | \ | ||
911 | PIN_ODR_HIGH(GPIOF_PIN15)) | ||
912 | #define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_I2C2_SDA, 0) | \ | ||
913 | PIN_AFIO_AF(GPIOF_I2C2_SCL, 0) | \ | ||
914 | PIN_AFIO_AF(GPIOF_PIN2, 0) | \ | ||
915 | PIN_AFIO_AF(GPIOF_PIN3, 0) | \ | ||
916 | PIN_AFIO_AF(GPIOF_PIN4, 0) | \ | ||
917 | PIN_AFIO_AF(GPIOF_PIN5, 0) | \ | ||
918 | PIN_AFIO_AF(GPIOF_PIN6, 0) | \ | ||
919 | PIN_AFIO_AF(GPIOF_PIN7, 0)) | ||
920 | #define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0) | \ | ||
921 | PIN_AFIO_AF(GPIOF_PIN9, 0) | \ | ||
922 | PIN_AFIO_AF(GPIOF_PIN10, 0) | \ | ||
923 | PIN_AFIO_AF(GPIOF_PIN11, 0) | \ | ||
924 | PIN_AFIO_AF(GPIOF_PIN12, 0) | \ | ||
925 | PIN_AFIO_AF(GPIOF_PIN13, 0) | \ | ||
926 | PIN_AFIO_AF(GPIOF_PIN14, 0) | \ | ||
927 | PIN_AFIO_AF(GPIOF_PIN15, 0)) | ||
928 | |||
929 | /* | ||
930 | * GPIOG setup: | ||
931 | * | ||
932 | * PG0 - PIN0 (input pullup). | ||
933 | * PG1 - PIN1 (input pullup). | ||
934 | * PG2 - PIN2 (input pullup). | ||
935 | * PG3 - PIN3 (input pullup). | ||
936 | * PG4 - PIN4 (input pullup). | ||
937 | * PG5 - PIN5 (input pullup). | ||
938 | * PG6 - PIN6 (input pullup). | ||
939 | * PG7 - PIN7 (input pullup). | ||
940 | * PG8 - PIN8 (input pullup). | ||
941 | * PG9 - PIN9 (input pullup). | ||
942 | * PG10 - PIN10 (input pullup). | ||
943 | * PG11 - PIN11 (input pullup). | ||
944 | * PG12 - PIN12 (input pullup). | ||
945 | * PG13 - PIN13 (input pullup). | ||
946 | * PG14 - PIN14 (input pullup). | ||
947 | * PG15 - PIN15 (input pullup). | ||
948 | */ | ||
949 | #define VAL_GPIOG_MODER (PIN_MODE_INPUT(GPIOG_PIN0) | \ | ||
950 | PIN_MODE_INPUT(GPIOG_PIN1) | \ | ||
951 | PIN_MODE_INPUT(GPIOG_PIN2) | \ | ||
952 | PIN_MODE_INPUT(GPIOG_PIN3) | \ | ||
953 | PIN_MODE_INPUT(GPIOG_PIN4) | \ | ||
954 | PIN_MODE_INPUT(GPIOG_PIN5) | \ | ||
955 | PIN_MODE_INPUT(GPIOG_PIN6) | \ | ||
956 | PIN_MODE_INPUT(GPIOG_PIN7) | \ | ||
957 | PIN_MODE_INPUT(GPIOG_PIN8) | \ | ||
958 | PIN_MODE_INPUT(GPIOG_PIN9) | \ | ||
959 | PIN_MODE_INPUT(GPIOG_PIN10) | \ | ||
960 | PIN_MODE_INPUT(GPIOG_PIN11) | \ | ||
961 | PIN_MODE_INPUT(GPIOG_PIN12) | \ | ||
962 | PIN_MODE_INPUT(GPIOG_PIN13) | \ | ||
963 | PIN_MODE_INPUT(GPIOG_PIN14) | \ | ||
964 | PIN_MODE_INPUT(GPIOG_PIN15)) | ||
965 | #define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_PIN0) | \ | ||
966 | PIN_OTYPE_PUSHPULL(GPIOG_PIN1) | \ | ||
967 | PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | \ | ||
968 | PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | \ | ||
969 | PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | \ | ||
970 | PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | \ | ||
971 | PIN_OTYPE_PUSHPULL(GPIOG_PIN6) | \ | ||
972 | PIN_OTYPE_PUSHPULL(GPIOG_PIN7) | \ | ||
973 | PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | \ | ||
974 | PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | \ | ||
975 | PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | \ | ||
976 | PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | \ | ||
977 | PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | \ | ||
978 | PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | \ | ||
979 | PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | \ | ||
980 | PIN_OTYPE_PUSHPULL(GPIOG_PIN15)) | ||
981 | #define VAL_GPIOG_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOG_PIN0) | \ | ||
982 | PIN_OSPEED_VERYLOW(GPIOG_PIN1) | \ | ||
983 | PIN_OSPEED_VERYLOW(GPIOG_PIN2) | \ | ||
984 | PIN_OSPEED_VERYLOW(GPIOG_PIN3) | \ | ||
985 | PIN_OSPEED_VERYLOW(GPIOG_PIN4) | \ | ||
986 | PIN_OSPEED_VERYLOW(GPIOG_PIN5) | \ | ||
987 | PIN_OSPEED_VERYLOW(GPIOG_PIN6) | \ | ||
988 | PIN_OSPEED_VERYLOW(GPIOG_PIN7) | \ | ||
989 | PIN_OSPEED_VERYLOW(GPIOG_PIN8) | \ | ||
990 | PIN_OSPEED_VERYLOW(GPIOG_PIN9) | \ | ||
991 | PIN_OSPEED_VERYLOW(GPIOG_PIN10) | \ | ||
992 | PIN_OSPEED_VERYLOW(GPIOG_PIN11) | \ | ||
993 | PIN_OSPEED_VERYLOW(GPIOG_PIN12) | \ | ||
994 | PIN_OSPEED_VERYLOW(GPIOG_PIN13) | \ | ||
995 | PIN_OSPEED_VERYLOW(GPIOG_PIN14) | \ | ||
996 | PIN_OSPEED_VERYLOW(GPIOG_PIN15)) | ||
997 | #define VAL_GPIOG_PUPDR (PIN_PUPDR_PULLUP(GPIOG_PIN0) | \ | ||
998 | PIN_PUPDR_PULLUP(GPIOG_PIN1) | \ | ||
999 | PIN_PUPDR_PULLUP(GPIOG_PIN2) | \ | ||
1000 | PIN_PUPDR_PULLUP(GPIOG_PIN3) | \ | ||
1001 | PIN_PUPDR_PULLUP(GPIOG_PIN4) | \ | ||
1002 | PIN_PUPDR_PULLUP(GPIOG_PIN5) | \ | ||
1003 | PIN_PUPDR_PULLUP(GPIOG_PIN6) | \ | ||
1004 | PIN_PUPDR_PULLUP(GPIOG_PIN7) | \ | ||
1005 | PIN_PUPDR_PULLUP(GPIOG_PIN8) | \ | ||
1006 | PIN_PUPDR_PULLUP(GPIOG_PIN9) | \ | ||
1007 | PIN_PUPDR_PULLUP(GPIOG_PIN10) | \ | ||
1008 | PIN_PUPDR_PULLUP(GPIOG_PIN11) | \ | ||
1009 | PIN_PUPDR_PULLUP(GPIOG_PIN12) | \ | ||
1010 | PIN_PUPDR_PULLUP(GPIOG_PIN13) | \ | ||
1011 | PIN_PUPDR_PULLUP(GPIOG_PIN14) | \ | ||
1012 | PIN_PUPDR_PULLUP(GPIOG_PIN15)) | ||
1013 | #define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_PIN0) | \ | ||
1014 | PIN_ODR_HIGH(GPIOG_PIN1) | \ | ||
1015 | PIN_ODR_HIGH(GPIOG_PIN2) | \ | ||
1016 | PIN_ODR_HIGH(GPIOG_PIN3) | \ | ||
1017 | PIN_ODR_HIGH(GPIOG_PIN4) | \ | ||
1018 | PIN_ODR_HIGH(GPIOG_PIN5) | \ | ||
1019 | PIN_ODR_HIGH(GPIOG_PIN6) | \ | ||
1020 | PIN_ODR_HIGH(GPIOG_PIN7) | \ | ||
1021 | PIN_ODR_HIGH(GPIOG_PIN8) | \ | ||
1022 | PIN_ODR_HIGH(GPIOG_PIN9) | \ | ||
1023 | PIN_ODR_HIGH(GPIOG_PIN10) | \ | ||
1024 | PIN_ODR_HIGH(GPIOG_PIN11) | \ | ||
1025 | PIN_ODR_HIGH(GPIOG_PIN12) | \ | ||
1026 | PIN_ODR_HIGH(GPIOG_PIN13) | \ | ||
1027 | PIN_ODR_HIGH(GPIOG_PIN14) | \ | ||
1028 | PIN_ODR_HIGH(GPIOG_PIN15)) | ||
1029 | #define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_PIN0, 0) | \ | ||
1030 | PIN_AFIO_AF(GPIOG_PIN1, 0) | \ | ||
1031 | PIN_AFIO_AF(GPIOG_PIN2, 0) | \ | ||
1032 | PIN_AFIO_AF(GPIOG_PIN3, 0) | \ | ||
1033 | PIN_AFIO_AF(GPIOG_PIN4, 0) | \ | ||
1034 | PIN_AFIO_AF(GPIOG_PIN5, 0) | \ | ||
1035 | PIN_AFIO_AF(GPIOG_PIN6, 0) | \ | ||
1036 | PIN_AFIO_AF(GPIOG_PIN7, 0)) | ||
1037 | #define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0) | \ | ||
1038 | PIN_AFIO_AF(GPIOG_PIN9, 0) | \ | ||
1039 | PIN_AFIO_AF(GPIOG_PIN10, 0) | \ | ||
1040 | PIN_AFIO_AF(GPIOG_PIN11, 0) | \ | ||
1041 | PIN_AFIO_AF(GPIOG_PIN12, 0) | \ | ||
1042 | PIN_AFIO_AF(GPIOG_PIN13, 0) | \ | ||
1043 | PIN_AFIO_AF(GPIOG_PIN14, 0) | \ | ||
1044 | PIN_AFIO_AF(GPIOG_PIN15, 0)) | ||
1045 | |||
1046 | /* | ||
1047 | * GPIOH setup: | ||
1048 | * | ||
1049 | * PH0 - PIN0 (input pullup). | ||
1050 | * PH1 - PIN1 (input pullup). | ||
1051 | * PH2 - PIN2 (input pullup). | ||
1052 | * PH3 - PIN3 (input pullup). | ||
1053 | * PH4 - PIN4 (input pullup). | ||
1054 | * PH5 - PIN5 (input pullup). | ||
1055 | * PH6 - PIN6 (input pullup). | ||
1056 | * PH7 - PIN7 (input pullup). | ||
1057 | * PH8 - PIN8 (input pullup). | ||
1058 | * PH9 - PIN9 (input pullup). | ||
1059 | * PH10 - PIN10 (input pullup). | ||
1060 | * PH11 - PIN11 (input pullup). | ||
1061 | * PH12 - PIN12 (input pullup). | ||
1062 | * PH13 - PIN13 (input pullup). | ||
1063 | * PH14 - PIN14 (input pullup). | ||
1064 | * PH15 - PIN15 (input pullup). | ||
1065 | */ | ||
1066 | #define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_PIN0) | \ | ||
1067 | PIN_MODE_INPUT(GPIOH_PIN1) | \ | ||
1068 | PIN_MODE_INPUT(GPIOH_PIN2) | \ | ||
1069 | PIN_MODE_INPUT(GPIOH_PIN3) | \ | ||
1070 | PIN_MODE_INPUT(GPIOH_PIN4) | \ | ||
1071 | PIN_MODE_INPUT(GPIOH_PIN5) | \ | ||
1072 | PIN_MODE_INPUT(GPIOH_PIN6) | \ | ||
1073 | PIN_MODE_INPUT(GPIOH_PIN7) | \ | ||
1074 | PIN_MODE_INPUT(GPIOH_PIN8) | \ | ||
1075 | PIN_MODE_INPUT(GPIOH_PIN9) | \ | ||
1076 | PIN_MODE_INPUT(GPIOH_PIN10) | \ | ||
1077 | PIN_MODE_INPUT(GPIOH_PIN11) | \ | ||
1078 | PIN_MODE_INPUT(GPIOH_PIN12) | \ | ||
1079 | PIN_MODE_INPUT(GPIOH_PIN13) | \ | ||
1080 | PIN_MODE_INPUT(GPIOH_PIN14) | \ | ||
1081 | PIN_MODE_INPUT(GPIOH_PIN15)) | ||
1082 | #define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_PIN0) | \ | ||
1083 | PIN_OTYPE_PUSHPULL(GPIOH_PIN1) | \ | ||
1084 | PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | \ | ||
1085 | PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | \ | ||
1086 | PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | \ | ||
1087 | PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | \ | ||
1088 | PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | \ | ||
1089 | PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | \ | ||
1090 | PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | \ | ||
1091 | PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | \ | ||
1092 | PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | \ | ||
1093 | PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | \ | ||
1094 | PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | \ | ||
1095 | PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | \ | ||
1096 | PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | \ | ||
1097 | PIN_OTYPE_PUSHPULL(GPIOH_PIN15)) | ||
1098 | #define VAL_GPIOH_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOH_PIN0) | \ | ||
1099 | PIN_OSPEED_VERYLOW(GPIOH_PIN1) | \ | ||
1100 | PIN_OSPEED_VERYLOW(GPIOH_PIN2) | \ | ||
1101 | PIN_OSPEED_VERYLOW(GPIOH_PIN3) | \ | ||
1102 | PIN_OSPEED_VERYLOW(GPIOH_PIN4) | \ | ||
1103 | PIN_OSPEED_VERYLOW(GPIOH_PIN5) | \ | ||
1104 | PIN_OSPEED_VERYLOW(GPIOH_PIN6) | \ | ||
1105 | PIN_OSPEED_VERYLOW(GPIOH_PIN7) | \ | ||
1106 | PIN_OSPEED_VERYLOW(GPIOH_PIN8) | \ | ||
1107 | PIN_OSPEED_VERYLOW(GPIOH_PIN9) | \ | ||
1108 | PIN_OSPEED_VERYLOW(GPIOH_PIN10) | \ | ||
1109 | PIN_OSPEED_VERYLOW(GPIOH_PIN11) | \ | ||
1110 | PIN_OSPEED_VERYLOW(GPIOH_PIN12) | \ | ||
1111 | PIN_OSPEED_VERYLOW(GPIOH_PIN13) | \ | ||
1112 | PIN_OSPEED_VERYLOW(GPIOH_PIN14) | \ | ||
1113 | PIN_OSPEED_VERYLOW(GPIOH_PIN15)) | ||
1114 | #define VAL_GPIOH_PUPDR (PIN_PUPDR_PULLUP(GPIOH_PIN0) | \ | ||
1115 | PIN_PUPDR_PULLUP(GPIOH_PIN1) | \ | ||
1116 | PIN_PUPDR_PULLUP(GPIOH_PIN2) | \ | ||
1117 | PIN_PUPDR_PULLUP(GPIOH_PIN3) | \ | ||
1118 | PIN_PUPDR_PULLUP(GPIOH_PIN4) | \ | ||
1119 | PIN_PUPDR_PULLUP(GPIOH_PIN5) | \ | ||
1120 | PIN_PUPDR_PULLUP(GPIOH_PIN6) | \ | ||
1121 | PIN_PUPDR_PULLUP(GPIOH_PIN7) | \ | ||
1122 | PIN_PUPDR_PULLUP(GPIOH_PIN8) | \ | ||
1123 | PIN_PUPDR_PULLUP(GPIOH_PIN9) | \ | ||
1124 | PIN_PUPDR_PULLUP(GPIOH_PIN10) | \ | ||
1125 | PIN_PUPDR_PULLUP(GPIOH_PIN11) | \ | ||
1126 | PIN_PUPDR_PULLUP(GPIOH_PIN12) | \ | ||
1127 | PIN_PUPDR_PULLUP(GPIOH_PIN13) | \ | ||
1128 | PIN_PUPDR_PULLUP(GPIOH_PIN14) | \ | ||
1129 | PIN_PUPDR_PULLUP(GPIOH_PIN15)) | ||
1130 | #define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_PIN0) | \ | ||
1131 | PIN_ODR_HIGH(GPIOH_PIN1) | \ | ||
1132 | PIN_ODR_HIGH(GPIOH_PIN2) | \ | ||
1133 | PIN_ODR_HIGH(GPIOH_PIN3) | \ | ||
1134 | PIN_ODR_HIGH(GPIOH_PIN4) | \ | ||
1135 | PIN_ODR_HIGH(GPIOH_PIN5) | \ | ||
1136 | PIN_ODR_HIGH(GPIOH_PIN6) | \ | ||
1137 | PIN_ODR_HIGH(GPIOH_PIN7) | \ | ||
1138 | PIN_ODR_HIGH(GPIOH_PIN8) | \ | ||
1139 | PIN_ODR_HIGH(GPIOH_PIN9) | \ | ||
1140 | PIN_ODR_HIGH(GPIOH_PIN10) | \ | ||
1141 | PIN_ODR_HIGH(GPIOH_PIN11) | \ | ||
1142 | PIN_ODR_HIGH(GPIOH_PIN12) | \ | ||
1143 | PIN_ODR_HIGH(GPIOH_PIN13) | \ | ||
1144 | PIN_ODR_HIGH(GPIOH_PIN14) | \ | ||
1145 | PIN_ODR_HIGH(GPIOH_PIN15)) | ||
1146 | #define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_PIN0, 0) | \ | ||
1147 | PIN_AFIO_AF(GPIOH_PIN1, 0) | \ | ||
1148 | PIN_AFIO_AF(GPIOH_PIN2, 0) | \ | ||
1149 | PIN_AFIO_AF(GPIOH_PIN3, 0) | \ | ||
1150 | PIN_AFIO_AF(GPIOH_PIN4, 0) | \ | ||
1151 | PIN_AFIO_AF(GPIOH_PIN5, 0) | \ | ||
1152 | PIN_AFIO_AF(GPIOH_PIN6, 0) | \ | ||
1153 | PIN_AFIO_AF(GPIOH_PIN7, 0)) | ||
1154 | #define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0) | \ | ||
1155 | PIN_AFIO_AF(GPIOH_PIN9, 0) | \ | ||
1156 | PIN_AFIO_AF(GPIOH_PIN10, 0) | \ | ||
1157 | PIN_AFIO_AF(GPIOH_PIN11, 0) | \ | ||
1158 | PIN_AFIO_AF(GPIOH_PIN12, 0) | \ | ||
1159 | PIN_AFIO_AF(GPIOH_PIN13, 0) | \ | ||
1160 | PIN_AFIO_AF(GPIOH_PIN14, 0) | \ | ||
1161 | PIN_AFIO_AF(GPIOH_PIN15, 0)) | ||
1162 | |||
1163 | |||
1164 | /* | ||
1165 | * USB bus activation macro, required by the USB driver. | ||
1166 | */ | ||
1167 | // #define usb_lld_connect_bus(usbp) | ||
1168 | #define usb_lld_connect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_ALTERNATE(14))) | ||
1169 | // #define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT) | ||
1170 | /* | ||
1171 | * USB bus de-activation macro, required by the USB driver. | ||
1172 | */ | ||
1173 | // #define usb_lld_disconnect_bus(usbp) | ||
1174 | #define usb_lld_disconnect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_OUTPUT_PUSHPULL)); palClearPad(GPIOA, GPIOA_USB_DP) | ||
1175 | // #define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12) | ||
1176 | |||
1177 | #if !defined(_FROM_ASM_) | ||
1178 | #ifdef __cplusplus | ||
1179 | extern "C" { | ||
1180 | #endif | ||
1181 | void boardInit(void); | ||
1182 | #ifdef __cplusplus | ||
1183 | } | ||
1184 | #endif | ||
1185 | #endif /* _FROM_ASM_ */ | ||
1186 | |||
1187 | #endif /* _BOARD_H_ */ | ||
diff --git a/keyboards/planck/rev6/boards/GENERIC_STM32_F303XC/board.mk b/keyboards/planck/rev6/boards/GENERIC_STM32_F303XC/board.mk new file mode 100644 index 000000000..43377629a --- /dev/null +++ b/keyboards/planck/rev6/boards/GENERIC_STM32_F303XC/board.mk | |||
@@ -0,0 +1,5 @@ | |||
1 | # List of all the board related files. | ||
2 | BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC/board.c | ||
3 | |||
4 | # Required include directories | ||
5 | BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC | ||
diff --git a/keyboards/planck/rev6/bootloader_defs.h b/keyboards/planck/rev6/bootloader_defs.h new file mode 100644 index 000000000..3b0e9d20a --- /dev/null +++ b/keyboards/planck/rev6/bootloader_defs.h | |||
@@ -0,0 +1,7 @@ | |||
1 | /* Address for jumping to bootloader on STM32 chips. */ | ||
2 | /* It is chip dependent, the correct number can be looked up here: | ||
3 | * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf | ||
4 | * This also requires a patch to chibios: | ||
5 | * <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch | ||
6 | */ | ||
7 | #define STM32_BOOTLOADER_ADDRESS 0x1FFFD800 | ||
diff --git a/keyboards/planck/rev6/chconf.h b/keyboards/planck/rev6/chconf.h new file mode 100644 index 000000000..b52ca7d2c --- /dev/null +++ b/keyboards/planck/rev6/chconf.h | |||
@@ -0,0 +1,520 @@ | |||
1 | /* | ||
2 | ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio | ||
3 | |||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | you may not use this file except in compliance with the License. | ||
6 | You may obtain a copy of the License at | ||
7 | |||
8 | http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | |||
10 | Unless required by applicable law or agreed to in writing, software | ||
11 | distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | See the License for the specific language governing permissions and | ||
14 | limitations under the License. | ||
15 | */ | ||
16 | |||
17 | /** | ||
18 | * @file templates/chconf.h | ||
19 | * @brief Configuration file template. | ||
20 | * @details A copy of this file must be placed in each project directory, it | ||
21 | * contains the application specific kernel settings. | ||
22 | * | ||
23 | * @addtogroup config | ||
24 | * @details Kernel related settings and hooks. | ||
25 | * @{ | ||
26 | */ | ||
27 | |||
28 | #ifndef CHCONF_H | ||
29 | #define CHCONF_H | ||
30 | |||
31 | #define _CHIBIOS_RT_CONF_ | ||
32 | |||
33 | /*===========================================================================*/ | ||
34 | /** | ||
35 | * @name System timers settings | ||
36 | * @{ | ||
37 | */ | ||
38 | /*===========================================================================*/ | ||
39 | |||
40 | /** | ||
41 | * @brief System time counter resolution. | ||
42 | * @note Allowed values are 16 or 32 bits. | ||
43 | */ | ||
44 | #define CH_CFG_ST_RESOLUTION 16 | ||
45 | |||
46 | /** | ||
47 | * @brief System tick frequency. | ||
48 | * @details Frequency of the system timer that drives the system ticks. This | ||
49 | * setting also defines the system tick time unit. | ||
50 | */ | ||
51 | #define CH_CFG_ST_FREQUENCY 10000 | ||
52 | |||
53 | /** | ||
54 | * @brief Time delta constant for the tick-less mode. | ||
55 | * @note If this value is zero then the system uses the classic | ||
56 | * periodic tick. This value represents the minimum number | ||
57 | * of ticks that is safe to specify in a timeout directive. | ||
58 | * The value one is not valid, timeouts are rounded up to | ||
59 | * this value. | ||
60 | */ | ||
61 | #define CH_CFG_ST_TIMEDELTA 2 | ||
62 | |||
63 | /** @} */ | ||
64 | |||
65 | /*===========================================================================*/ | ||
66 | /** | ||
67 | * @name Kernel parameters and options | ||
68 | * @{ | ||
69 | */ | ||
70 | /*===========================================================================*/ | ||
71 | |||
72 | /** | ||
73 | * @brief Round robin interval. | ||
74 | * @details This constant is the number of system ticks allowed for the | ||
75 | * threads before preemption occurs. Setting this value to zero | ||
76 | * disables the preemption for threads with equal priority and the | ||
77 | * round robin becomes cooperative. Note that higher priority | ||
78 | * threads can still preempt, the kernel is always preemptive. | ||
79 | * @note Disabling the round robin preemption makes the kernel more compact | ||
80 | * and generally faster. | ||
81 | * @note The round robin preemption is not supported in tickless mode and | ||
82 | * must be set to zero in that case. | ||
83 | */ | ||
84 | #define CH_CFG_TIME_QUANTUM 0 | ||
85 | |||
86 | /** | ||
87 | * @brief Managed RAM size. | ||
88 | * @details Size of the RAM area to be managed by the OS. If set to zero | ||
89 | * then the whole available RAM is used. The core memory is made | ||
90 | * available to the heap allocator and/or can be used directly through | ||
91 | * the simplified core memory allocator. | ||
92 | * | ||
93 | * @note In order to let the OS manage the whole RAM the linker script must | ||
94 | * provide the @p __heap_base__ and @p __heap_end__ symbols. | ||
95 | * @note Requires @p CH_CFG_USE_MEMCORE. | ||
96 | */ | ||
97 | #define CH_CFG_MEMCORE_SIZE 0 | ||
98 | |||
99 | /** | ||
100 | * @brief Idle thread automatic spawn suppression. | ||
101 | * @details When this option is activated the function @p chSysInit() | ||
102 | * does not spawn the idle thread. The application @p main() | ||
103 | * function becomes the idle thread and must implement an | ||
104 | * infinite loop. | ||
105 | */ | ||
106 | #define CH_CFG_NO_IDLE_THREAD FALSE | ||
107 | |||
108 | /** @} */ | ||
109 | |||
110 | /*===========================================================================*/ | ||
111 | /** | ||
112 | * @name Performance options | ||
113 | * @{ | ||
114 | */ | ||
115 | /*===========================================================================*/ | ||
116 | |||
117 | /** | ||
118 | * @brief OS optimization. | ||
119 | * @details If enabled then time efficient rather than space efficient code | ||
120 | * is used when two possible implementations exist. | ||
121 | * | ||
122 | * @note This is not related to the compiler optimization options. | ||
123 | * @note The default is @p TRUE. | ||
124 | */ | ||
125 | #define CH_CFG_OPTIMIZE_SPEED TRUE | ||
126 | |||
127 | /** @} */ | ||
128 | |||
129 | /*===========================================================================*/ | ||
130 | /** | ||
131 | * @name Subsystem options | ||
132 | * @{ | ||
133 | */ | ||
134 | /*===========================================================================*/ | ||
135 | |||
136 | /** | ||
137 | * @brief Time Measurement APIs. | ||
138 | * @details If enabled then the time measurement APIs are included in | ||
139 | * the kernel. | ||
140 | * | ||
141 | * @note The default is @p TRUE. | ||
142 | */ | ||
143 | #define CH_CFG_USE_TM TRUE | ||
144 | |||
145 | /** | ||
146 | * @brief Threads registry APIs. | ||
147 | * @details If enabled then the registry APIs are included in the kernel. | ||
148 | * | ||
149 | * @note The default is @p TRUE. | ||
150 | */ | ||
151 | #define CH_CFG_USE_REGISTRY TRUE | ||
152 | |||
153 | /** | ||
154 | * @brief Threads synchronization APIs. | ||
155 | * @details If enabled then the @p chThdWait() function is included in | ||
156 | * the kernel. | ||
157 | * | ||
158 | * @note The default is @p TRUE. | ||
159 | */ | ||
160 | #define CH_CFG_USE_WAITEXIT TRUE | ||
161 | |||
162 | /** | ||
163 | * @brief Semaphores APIs. | ||
164 | * @details If enabled then the Semaphores APIs are included in the kernel. | ||
165 | * | ||
166 | * @note The default is @p TRUE. | ||
167 | */ | ||
168 | #define CH_CFG_USE_SEMAPHORES TRUE | ||
169 | |||
170 | /** | ||
171 | * @brief Semaphores queuing mode. | ||
172 | * @details If enabled then the threads are enqueued on semaphores by | ||
173 | * priority rather than in FIFO order. | ||
174 | * | ||
175 | * @note The default is @p FALSE. Enable this if you have special | ||
176 | * requirements. | ||
177 | * @note Requires @p CH_CFG_USE_SEMAPHORES. | ||
178 | */ | ||
179 | #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE | ||
180 | |||
181 | /** | ||
182 | * @brief Mutexes APIs. | ||
183 | * @details If enabled then the mutexes APIs are included in the kernel. | ||
184 | * | ||
185 | * @note The default is @p TRUE. | ||
186 | */ | ||
187 | #define CH_CFG_USE_MUTEXES TRUE | ||
188 | |||
189 | /** | ||
190 | * @brief Enables recursive behavior on mutexes. | ||
191 | * @note Recursive mutexes are heavier and have an increased | ||
192 | * memory footprint. | ||
193 | * | ||
194 | * @note The default is @p FALSE. | ||
195 | * @note Requires @p CH_CFG_USE_MUTEXES. | ||
196 | */ | ||
197 | #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE | ||
198 | |||
199 | /** | ||
200 | * @brief Conditional Variables APIs. | ||
201 | * @details If enabled then the conditional variables APIs are included | ||
202 | * in the kernel. | ||
203 | * | ||
204 | * @note The default is @p TRUE. | ||
205 | * @note Requires @p CH_CFG_USE_MUTEXES. | ||
206 | */ | ||
207 | #define CH_CFG_USE_CONDVARS TRUE | ||
208 | |||
209 | /** | ||
210 | * @brief Conditional Variables APIs with timeout. | ||
211 | * @details If enabled then the conditional variables APIs with timeout | ||
212 | * specification are included in the kernel. | ||
213 | * | ||
214 | * @note The default is @p TRUE. | ||
215 | * @note Requires @p CH_CFG_USE_CONDVARS. | ||
216 | */ | ||
217 | #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE | ||
218 | |||
219 | /** | ||
220 | * @brief Events Flags APIs. | ||
221 | * @details If enabled then the event flags APIs are included in the kernel. | ||
222 | * | ||
223 | * @note The default is @p TRUE. | ||
224 | */ | ||
225 | #define CH_CFG_USE_EVENTS TRUE | ||
226 | |||
227 | /** | ||
228 | * @brief Events Flags APIs with timeout. | ||
229 | * @details If enabled then the events APIs with timeout specification | ||
230 | * are included in the kernel. | ||
231 | * | ||
232 | * @note The default is @p TRUE. | ||
233 | * @note Requires @p CH_CFG_USE_EVENTS. | ||
234 | */ | ||
235 | #define CH_CFG_USE_EVENTS_TIMEOUT TRUE | ||
236 | |||
237 | /** | ||
238 | * @brief Synchronous Messages APIs. | ||
239 | * @details If enabled then the synchronous messages APIs are included | ||
240 | * in the kernel. | ||
241 | * | ||
242 | * @note The default is @p TRUE. | ||
243 | */ | ||
244 | #define CH_CFG_USE_MESSAGES TRUE | ||
245 | |||
246 | /** | ||
247 | * @brief Synchronous Messages queuing mode. | ||
248 | * @details If enabled then messages are served by priority rather than in | ||
249 | * FIFO order. | ||
250 | * | ||
251 | * @note The default is @p FALSE. Enable this if you have special | ||
252 | * requirements. | ||
253 | * @note Requires @p CH_CFG_USE_MESSAGES. | ||
254 | */ | ||
255 | #define CH_CFG_USE_MESSAGES_PRIORITY TRUE | ||
256 | |||
257 | /** | ||
258 | * @brief Mailboxes APIs. | ||
259 | * @details If enabled then the asynchronous messages (mailboxes) APIs are | ||
260 | * included in the kernel. | ||
261 | * | ||
262 | * @note The default is @p TRUE. | ||
263 | * @note Requires @p CH_CFG_USE_SEMAPHORES. | ||
264 | */ | ||
265 | #define CH_CFG_USE_MAILBOXES TRUE | ||
266 | |||
267 | /** | ||
268 | * @brief Core Memory Manager APIs. | ||
269 | * @details If enabled then the core memory manager APIs are included | ||
270 | * in the kernel. | ||
271 | * | ||
272 | * @note The default is @p TRUE. | ||
273 | */ | ||
274 | #define CH_CFG_USE_MEMCORE TRUE | ||
275 | |||
276 | /** | ||
277 | * @brief Heap Allocator APIs. | ||
278 | * @details If enabled then the memory heap allocator APIs are included | ||
279 | * in the kernel. | ||
280 | * | ||
281 | * @note The default is @p TRUE. | ||
282 | * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or | ||
283 | * @p CH_CFG_USE_SEMAPHORES. | ||
284 | * @note Mutexes are recommended. | ||
285 | */ | ||
286 | #define CH_CFG_USE_HEAP TRUE | ||
287 | |||
288 | /** | ||
289 | * @brief Memory Pools Allocator APIs. | ||
290 | * @details If enabled then the memory pools allocator APIs are included | ||
291 | * in the kernel. | ||
292 | * | ||
293 | * @note The default is @p TRUE. | ||
294 | */ | ||
295 | #define CH_CFG_USE_MEMPOOLS TRUE | ||
296 | |||
297 | /** | ||
298 | * @brief Dynamic Threads APIs. | ||
299 | * @details If enabled then the dynamic threads creation APIs are included | ||
300 | * in the kernel. | ||
301 | * | ||
302 | * @note The default is @p TRUE. | ||
303 | * @note Requires @p CH_CFG_USE_WAITEXIT. | ||
304 | * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. | ||
305 | */ | ||
306 | #define CH_CFG_USE_DYNAMIC TRUE | ||
307 | |||
308 | /** @} */ | ||
309 | |||
310 | /*===========================================================================*/ | ||
311 | /** | ||
312 | * @name Debug options | ||
313 | * @{ | ||
314 | */ | ||
315 | /*===========================================================================*/ | ||
316 | |||
317 | /** | ||
318 | * @brief Debug option, kernel statistics. | ||
319 | * | ||
320 | * @note The default is @p FALSE. | ||
321 | */ | ||
322 | #define CH_DBG_STATISTICS FALSE | ||
323 | |||
324 | /** | ||
325 | * @brief Debug option, system state check. | ||
326 | * @details If enabled the correct call protocol for system APIs is checked | ||
327 | * at runtime. | ||
328 | * | ||
329 | * @note The default is @p FALSE. | ||
330 | */ | ||
331 | #define CH_DBG_SYSTEM_STATE_CHECK FALSE | ||
332 | |||
333 | /** | ||
334 | * @brief Debug option, parameters checks. | ||
335 | * @details If enabled then the checks on the API functions input | ||
336 | * parameters are activated. | ||
337 | * | ||
338 | * @note The default is @p FALSE. | ||
339 | */ | ||
340 | #define CH_DBG_ENABLE_CHECKS FALSE | ||
341 | |||
342 | /** | ||
343 | * @brief Debug option, consistency checks. | ||
344 | * @details If enabled then all the assertions in the kernel code are | ||
345 | * activated. This includes consistency checks inside the kernel, | ||
346 | * runtime anomalies and port-defined checks. | ||
347 | * | ||
348 | * @note The default is @p FALSE. | ||
349 | */ | ||
350 | #define CH_DBG_ENABLE_ASSERTS FALSE | ||
351 | |||
352 | /** | ||
353 | * @brief Debug option, trace buffer. | ||
354 | * @details If enabled then the trace buffer is activated. | ||
355 | * | ||
356 | * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. | ||
357 | */ | ||
358 | #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED | ||
359 | |||
360 | /** | ||
361 | * @brief Trace buffer entries. | ||
362 | * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is | ||
363 | * different from @p CH_DBG_TRACE_MASK_DISABLED. | ||
364 | */ | ||
365 | #define CH_DBG_TRACE_BUFFER_SIZE 128 | ||
366 | |||
367 | /** | ||
368 | * @brief Debug option, stack checks. | ||
369 | * @details If enabled then a runtime stack check is performed. | ||
370 | * | ||
371 | * @note The default is @p FALSE. | ||
372 | * @note The stack check is performed in a architecture/port dependent way. | ||
373 | * It may not be implemented or some ports. | ||
374 | * @note The default failure mode is to halt the system with the global | ||
375 | * @p panic_msg variable set to @p NULL. | ||
376 | */ | ||
377 | #define CH_DBG_ENABLE_STACK_CHECK TRUE | ||
378 | |||
379 | /** | ||
380 | * @brief Debug option, stacks initialization. | ||
381 | * @details If enabled then the threads working area is filled with a byte | ||
382 | * value when a thread is created. This can be useful for the | ||
383 | * runtime measurement of the used stack. | ||
384 | * | ||
385 | * @note The default is @p FALSE. | ||
386 | */ | ||
387 | #define CH_DBG_FILL_THREADS FALSE | ||
388 | |||
389 | /** | ||
390 | * @brief Debug option, threads profiling. | ||
391 | * @details If enabled then a field is added to the @p thread_t structure that | ||
392 | * counts the system ticks occurred while executing the thread. | ||
393 | * | ||
394 | * @note The default is @p FALSE. | ||
395 | * @note This debug option is not currently compatible with the | ||
396 | * tickless mode. | ||
397 | */ | ||
398 | #define CH_DBG_THREADS_PROFILING FALSE | ||
399 | |||
400 | /** @} */ | ||
401 | |||
402 | /*===========================================================================*/ | ||
403 | /** | ||
404 | * @name Kernel hooks | ||
405 | * @{ | ||
406 | */ | ||
407 | /*===========================================================================*/ | ||
408 | |||
409 | /** | ||
410 | * @brief Threads descriptor structure extension. | ||
411 | * @details User fields added to the end of the @p thread_t structure. | ||
412 | */ | ||
413 | #define CH_CFG_THREAD_EXTRA_FIELDS \ | ||
414 | /* Add threads custom fields here.*/ | ||
415 | |||
416 | /** | ||
417 | * @brief Threads initialization hook. | ||
418 | * @details User initialization code added to the @p chThdInit() API. | ||
419 | * | ||
420 | * @note It is invoked from within @p chThdInit() and implicitly from all | ||
421 | * the threads creation APIs. | ||
422 | */ | ||
423 | #define CH_CFG_THREAD_INIT_HOOK(tp) { \ | ||
424 | /* Add threads initialization code here.*/ \ | ||
425 | } | ||
426 | |||
427 | /** | ||
428 | * @brief Threads finalization hook. | ||
429 | * @details User finalization code added to the @p chThdExit() API. | ||
430 | */ | ||
431 | #define CH_CFG_THREAD_EXIT_HOOK(tp) { \ | ||
432 | /* Add threads finalization code here.*/ \ | ||
433 | } | ||
434 | |||
435 | /** | ||
436 | * @brief Context switch hook. | ||
437 | * @details This hook is invoked just before switching between threads. | ||
438 | */ | ||
439 | #define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ | ||
440 | /* Context switch code here.*/ \ | ||
441 | } | ||
442 | |||
443 | /** | ||
444 | * @brief ISR enter hook. | ||
445 | */ | ||
446 | #define CH_CFG_IRQ_PROLOGUE_HOOK() { \ | ||
447 | /* IRQ prologue code here.*/ \ | ||
448 | } | ||
449 | |||
450 | /** | ||
451 | * @brief ISR exit hook. | ||
452 | */ | ||
453 | #define CH_CFG_IRQ_EPILOGUE_HOOK() { \ | ||
454 | /* IRQ epilogue code here.*/ \ | ||
455 | } | ||
456 | |||
457 | /** | ||
458 | * @brief Idle thread enter hook. | ||
459 | * @note This hook is invoked within a critical zone, no OS functions | ||
460 | * should be invoked from here. | ||
461 | * @note This macro can be used to activate a power saving mode. | ||
462 | */ | ||
463 | #define CH_CFG_IDLE_ENTER_HOOK() { \ | ||
464 | /* Idle-enter code here.*/ \ | ||
465 | } | ||
466 | |||
467 | /** | ||
468 | * @brief Idle thread leave hook. | ||
469 | * @note This hook is invoked within a critical zone, no OS functions | ||
470 | * should be invoked from here. | ||
471 | * @note This macro can be used to deactivate a power saving mode. | ||
472 | */ | ||
473 | #define CH_CFG_IDLE_LEAVE_HOOK() { \ | ||
474 | /* Idle-leave code here.*/ \ | ||
475 | } | ||
476 | |||
477 | /** | ||
478 | * @brief Idle Loop hook. | ||
479 | * @details This hook is continuously invoked by the idle thread loop. | ||
480 | */ | ||
481 | #define CH_CFG_IDLE_LOOP_HOOK() { \ | ||
482 | /* Idle loop code here.*/ \ | ||
483 | } | ||
484 | |||
485 | /** | ||
486 | * @brief System tick event hook. | ||
487 | * @details This hook is invoked in the system tick handler immediately | ||
488 | * after processing the virtual timers queue. | ||
489 | */ | ||
490 | #define CH_CFG_SYSTEM_TICK_HOOK() { \ | ||
491 | /* System tick event code here.*/ \ | ||
492 | } | ||
493 | |||
494 | /** | ||
495 | * @brief System halt hook. | ||
496 | * @details This hook is invoked in case to a system halting error before | ||
497 | * the system is halted. | ||
498 | */ | ||
499 | #define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ | ||
500 | /* System halt code here.*/ \ | ||
501 | } | ||
502 | |||
503 | /** | ||
504 | * @brief Trace hook. | ||
505 | * @details This hook is invoked each time a new record is written in the | ||
506 | * trace buffer. | ||
507 | */ | ||
508 | #define CH_CFG_TRACE_HOOK(tep) { \ | ||
509 | /* Trace code here.*/ \ | ||
510 | } | ||
511 | |||
512 | /** @} */ | ||
513 | |||
514 | /*===========================================================================*/ | ||
515 | /* Port-specific settings (override port settings defaulted in chcore.h). */ | ||
516 | /*===========================================================================*/ | ||
517 | |||
518 | #endif /* CHCONF_H */ | ||
519 | |||
520 | /** @} */ | ||
diff --git a/keyboards/planck/rev6/config.h b/keyboards/planck/rev6/config.h new file mode 100644 index 000000000..0e462180b --- /dev/null +++ b/keyboards/planck/rev6/config.h | |||
@@ -0,0 +1,138 @@ | |||
1 | /* | ||
2 | * Copyright 2018 Jack Humbert <jack.humb@gmail.com> | ||
3 | * | ||
4 | * This program is free software: you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation, either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | #ifndef REV6_CONFIG_H | ||
19 | #define REV6_CONFIG_H | ||
20 | |||
21 | /* USB Device descriptor parameter */ | ||
22 | #define DEVICE_VER 0x0006 | ||
23 | |||
24 | #undef MATRIX_ROWS | ||
25 | #undef MATRIX_COLS | ||
26 | /* key matrix size */ | ||
27 | #define MATRIX_ROWS 8 | ||
28 | #define MATRIX_COLS 6 | ||
29 | |||
30 | /* | ||
31 | * Keyboard Matrix Assignments | ||
32 | * | ||
33 | * Change this to how you wired your keyboard | ||
34 | * COLS: AVR pins used for columns, left to right | ||
35 | * ROWS: AVR pins used for rows, top to bottom | ||
36 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
37 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
38 | * | ||
39 | */ | ||
40 | /* Note: These are not used for arm boards. They're here purely as documentation. | ||
41 | * #define MATRIX_ROW_PINS { PB0, PB1, PB2, PA15, PA10 } | ||
42 | * #define MATRIX_COL_PINS { PA2, PA3, PA6, PB14, PB15, PA8, PA9, PA7, PB3, PB4, PC14, PC15, PC13, PB5, PB6 } | ||
43 | * #define UNUSED_PINS | ||
44 | */ | ||
45 | |||
46 | #define MUSIC_MAP | ||
47 | #undef AUDIO_VOICES | ||
48 | #undef C6_AUDIO | ||
49 | |||
50 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
51 | #define DEBOUNCE 6 | ||
52 | |||
53 | /* Prevent modifiers from being stuck on after layer changes. */ | ||
54 | #define PREVENT_STUCK_MODIFIERS | ||
55 | |||
56 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
57 | //#define LOCKING_SUPPORT_ENABLE | ||
58 | /* Locking resynchronize hack */ | ||
59 | //#define LOCKING_RESYNC_ENABLE | ||
60 | |||
61 | /* | ||
62 | * Force NKRO | ||
63 | * | ||
64 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
65 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
66 | * makefile for this to work.) | ||
67 | * | ||
68 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
69 | * until the next keyboard reset. | ||
70 | * | ||
71 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
72 | * fully operational during normal computer usage. | ||
73 | * | ||
74 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
75 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
76 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
77 | * power-up. | ||
78 | * | ||
79 | */ | ||
80 | //#define FORCE_NKRO | ||
81 | |||
82 | /* key combination for magic key command */ | ||
83 | #define IS_COMMAND() ( \ | ||
84 | keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ | ||
85 | ) | ||
86 | |||
87 | /* | ||
88 | * Feature disable options | ||
89 | * These options are also useful to firmware size reduction. | ||
90 | */ | ||
91 | |||
92 | /* disable debug print */ | ||
93 | //#define NO_DEBUG | ||
94 | |||
95 | /* disable print */ | ||
96 | //#define NO_PRINT | ||
97 | |||
98 | /* disable action features */ | ||
99 | //#define NO_ACTION_LAYER | ||
100 | //#define NO_ACTION_TAPPING | ||
101 | //#define NO_ACTION_ONESHOT | ||
102 | //#define NO_ACTION_MACRO | ||
103 | //#define NO_ACTION_FUNCTION | ||
104 | |||
105 | /* | ||
106 | * MIDI options | ||
107 | */ | ||
108 | |||
109 | /* Prevent use of disabled MIDI features in the keymap */ | ||
110 | //#define MIDI_ENABLE_STRICT 1 | ||
111 | |||
112 | /* enable basic MIDI features: | ||
113 | - MIDI notes can be sent when in Music mode is on | ||
114 | */ | ||
115 | //#define MIDI_BASIC | ||
116 | |||
117 | /* enable advanced MIDI features: | ||
118 | - MIDI notes can be added to the keymap | ||
119 | - Octave shift and transpose | ||
120 | - Virtual sustain, portamento, and modulation wheel | ||
121 | - etc. | ||
122 | */ | ||
123 | //#define MIDI_ADVANCED | ||
124 | |||
125 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | ||
126 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 | ||
127 | |||
128 | #define WS2812_LED_N 2 | ||
129 | #define RGBLED_NUM WS2812_LED_N | ||
130 | #define WS2812_TIM_N 2 | ||
131 | #define WS2812_TIM_CH 2 | ||
132 | #define PORT_WS2812 GPIOA | ||
133 | #define PIN_WS2812 1 | ||
134 | #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection) | ||
135 | //#define WS2812_DMA_CHANNEL 7 // DMA channel for TIMx_UP | ||
136 | //#define WS2812_EXTERNAL_PULLUP | ||
137 | |||
138 | #endif | ||
diff --git a/keyboards/planck/rev6/halconf.h b/keyboards/planck/rev6/halconf.h new file mode 100644 index 000000000..5e5d70219 --- /dev/null +++ b/keyboards/planck/rev6/halconf.h | |||
@@ -0,0 +1,388 @@ | |||
1 | /* | ||
2 | ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio | ||
3 | |||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | you may not use this file except in compliance with the License. | ||
6 | You may obtain a copy of the License at | ||
7 | |||
8 | http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | |||
10 | Unless required by applicable law or agreed to in writing, software | ||
11 | distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | See the License for the specific language governing permissions and | ||
14 | limitations under the License. | ||
15 | */ | ||
16 | |||
17 | /** | ||
18 | * @file templates/halconf.h | ||
19 | * @brief HAL configuration header. | ||
20 | * @details HAL configuration file, this file allows to enable or disable the | ||
21 | * various device drivers from your application. You may also use | ||
22 | * this file in order to override the device drivers default settings. | ||
23 | * | ||
24 | * @addtogroup HAL_CONF | ||
25 | * @{ | ||
26 | */ | ||
27 | |||
28 | #ifndef HALCONF_H | ||
29 | #define HALCONF_H | ||
30 | |||
31 | #include "mcuconf.h" | ||
32 | |||
33 | /** | ||
34 | * @brief Enables the PAL subsystem. | ||
35 | */ | ||
36 | #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) | ||
37 | #define HAL_USE_PAL TRUE | ||
38 | #endif | ||
39 | |||
40 | /** | ||
41 | * @brief Enables the ADC subsystem. | ||
42 | */ | ||
43 | #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) | ||
44 | #define HAL_USE_ADC FALSE | ||
45 | #endif | ||
46 | |||
47 | /** | ||
48 | * @brief Enables the CAN subsystem. | ||
49 | */ | ||
50 | #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) | ||
51 | #define HAL_USE_CAN FALSE | ||
52 | #endif | ||
53 | |||
54 | /** | ||
55 | * @brief Enables the DAC subsystem. | ||
56 | */ | ||
57 | #if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) | ||
58 | #define HAL_USE_DAC TRUE | ||
59 | #endif | ||
60 | |||
61 | /** | ||
62 | * @brief Enables the EXT subsystem. | ||
63 | */ | ||
64 | #if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) | ||
65 | #define HAL_USE_EXT FALSE | ||
66 | #endif | ||
67 | |||
68 | /** | ||
69 | * @brief Enables the GPT subsystem. | ||
70 | */ | ||
71 | #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) | ||
72 | #define HAL_USE_GPT TRUE | ||
73 | #endif | ||
74 | |||
75 | /** | ||
76 | * @brief Enables the I2C subsystem. | ||
77 | */ | ||
78 | #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) | ||
79 | #define HAL_USE_I2C FALSE | ||
80 | #endif | ||
81 | |||
82 | /** | ||
83 | * @brief Enables the I2S subsystem. | ||
84 | */ | ||
85 | #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) | ||
86 | #define HAL_USE_I2S FALSE | ||
87 | #endif | ||
88 | |||
89 | /** | ||
90 | * @brief Enables the ICU subsystem. | ||
91 | */ | ||
92 | #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) | ||
93 | #define HAL_USE_ICU FALSE | ||
94 | #endif | ||
95 | |||
96 | /** | ||
97 | * @brief Enables the MAC subsystem. | ||
98 | */ | ||
99 | #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) | ||
100 | #define HAL_USE_MAC FALSE | ||
101 | #endif | ||
102 | |||
103 | /** | ||
104 | * @brief Enables the MMC_SPI subsystem. | ||
105 | */ | ||
106 | #if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) | ||
107 | #define HAL_USE_MMC_SPI FALSE | ||
108 | #endif | ||
109 | |||
110 | /** | ||
111 | * @brief Enables the PWM subsystem. | ||
112 | */ | ||
113 | #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) | ||
114 | #define HAL_USE_PWM TRUE | ||
115 | #endif | ||
116 | |||
117 | /** | ||
118 | * @brief Enables the QSPI subsystem. | ||
119 | */ | ||
120 | #if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__) | ||
121 | #define HAL_USE_QSPI FALSE | ||
122 | #endif | ||
123 | |||
124 | /** | ||
125 | * @brief Enables the RTC subsystem. | ||
126 | */ | ||
127 | #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) | ||
128 | #define HAL_USE_RTC FALSE | ||
129 | #endif | ||
130 | |||
131 | /** | ||
132 | * @brief Enables the SDC subsystem. | ||
133 | */ | ||
134 | #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) | ||
135 | #define HAL_USE_SDC FALSE | ||
136 | #endif | ||
137 | |||
138 | /** | ||
139 | * @brief Enables the SERIAL subsystem. | ||
140 | */ | ||
141 | #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) | ||
142 | #define HAL_USE_SERIAL FALSE | ||
143 | #endif | ||
144 | |||
145 | /** | ||
146 | * @brief Enables the SERIAL over USB subsystem. | ||
147 | */ | ||
148 | #if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) | ||
149 | #define HAL_USE_SERIAL_USB TRUE | ||
150 | #endif | ||
151 | |||
152 | /** | ||
153 | * @brief Enables the SPI subsystem. | ||
154 | */ | ||
155 | #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) | ||
156 | #define HAL_USE_SPI FALSE | ||
157 | #endif | ||
158 | |||
159 | /** | ||
160 | * @brief Enables the UART subsystem. | ||
161 | */ | ||
162 | #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) | ||
163 | #define HAL_USE_UART FALSE | ||
164 | #endif | ||
165 | |||
166 | /** | ||
167 | * @brief Enables the USB subsystem. | ||
168 | */ | ||
169 | #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) | ||
170 | #define HAL_USE_USB TRUE | ||
171 | #endif | ||
172 | |||
173 | /** | ||
174 | * @brief Enables the WDG subsystem. | ||
175 | */ | ||
176 | #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) | ||
177 | #define HAL_USE_WDG FALSE | ||
178 | #endif | ||
179 | |||
180 | /*===========================================================================*/ | ||
181 | /* ADC driver related settings. */ | ||
182 | /*===========================================================================*/ | ||
183 | |||
184 | /** | ||
185 | * @brief Enables synchronous APIs. | ||
186 | * @note Disabling this option saves both code and data space. | ||
187 | */ | ||
188 | #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) | ||
189 | #define ADC_USE_WAIT TRUE | ||
190 | #endif | ||
191 | |||
192 | /** | ||
193 | * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. | ||
194 | * @note Disabling this option saves both code and data space. | ||
195 | */ | ||
196 | #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
197 | #define ADC_USE_MUTUAL_EXCLUSION TRUE | ||
198 | #endif | ||
199 | |||
200 | /*===========================================================================*/ | ||
201 | /* CAN driver related settings. */ | ||
202 | /*===========================================================================*/ | ||
203 | |||
204 | /** | ||
205 | * @brief Sleep mode related APIs inclusion switch. | ||
206 | */ | ||
207 | #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) | ||
208 | #define CAN_USE_SLEEP_MODE TRUE | ||
209 | #endif | ||
210 | |||
211 | /*===========================================================================*/ | ||
212 | /* I2C driver related settings. */ | ||
213 | /*===========================================================================*/ | ||
214 | |||
215 | /** | ||
216 | * @brief Enables the mutual exclusion APIs on the I2C bus. | ||
217 | */ | ||
218 | #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
219 | #define I2C_USE_MUTUAL_EXCLUSION TRUE | ||
220 | #endif | ||
221 | |||
222 | /*===========================================================================*/ | ||
223 | /* MAC driver related settings. */ | ||
224 | /*===========================================================================*/ | ||
225 | |||
226 | /** | ||
227 | * @brief Enables an event sources for incoming packets. | ||
228 | */ | ||
229 | #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) | ||
230 | #define MAC_USE_ZERO_COPY FALSE | ||
231 | #endif | ||
232 | |||
233 | /** | ||
234 | * @brief Enables an event sources for incoming packets. | ||
235 | */ | ||
236 | #if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) | ||
237 | #define MAC_USE_EVENTS TRUE | ||
238 | #endif | ||
239 | |||
240 | /*===========================================================================*/ | ||
241 | /* MMC_SPI driver related settings. */ | ||
242 | /*===========================================================================*/ | ||
243 | |||
244 | /** | ||
245 | * @brief Delays insertions. | ||
246 | * @details If enabled this options inserts delays into the MMC waiting | ||
247 | * routines releasing some extra CPU time for the threads with | ||
248 | * lower priority, this may slow down the driver a bit however. | ||
249 | * This option is recommended also if the SPI driver does not | ||
250 | * use a DMA channel and heavily loads the CPU. | ||
251 | */ | ||
252 | #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) | ||
253 | #define MMC_NICE_WAITING TRUE | ||
254 | #endif | ||
255 | |||
256 | /*===========================================================================*/ | ||
257 | /* SDC driver related settings. */ | ||
258 | /*===========================================================================*/ | ||
259 | |||
260 | /** | ||
261 | * @brief Number of initialization attempts before rejecting the card. | ||
262 | * @note Attempts are performed at 10mS intervals. | ||
263 | */ | ||
264 | #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) | ||
265 | #define SDC_INIT_RETRY 100 | ||
266 | #endif | ||
267 | |||
268 | /** | ||
269 | * @brief Include support for MMC cards. | ||
270 | * @note MMC support is not yet implemented so this option must be kept | ||
271 | * at @p FALSE. | ||
272 | */ | ||
273 | #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) | ||
274 | #define SDC_MMC_SUPPORT FALSE | ||
275 | #endif | ||
276 | |||
277 | /** | ||
278 | * @brief Delays insertions. | ||
279 | * @details If enabled this options inserts delays into the MMC waiting | ||
280 | * routines releasing some extra CPU time for the threads with | ||
281 | * lower priority, this may slow down the driver a bit however. | ||
282 | */ | ||
283 | #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) | ||
284 | #define SDC_NICE_WAITING TRUE | ||
285 | #endif | ||
286 | |||
287 | /*===========================================================================*/ | ||
288 | /* SERIAL driver related settings. */ | ||
289 | /*===========================================================================*/ | ||
290 | |||
291 | /** | ||
292 | * @brief Default bit rate. | ||
293 | * @details Configuration parameter, this is the baud rate selected for the | ||
294 | * default configuration. | ||
295 | */ | ||
296 | #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) | ||
297 | #define SERIAL_DEFAULT_BITRATE 38400 | ||
298 | #endif | ||
299 | |||
300 | /** | ||
301 | * @brief Serial buffers size. | ||
302 | * @details Configuration parameter, you can change the depth of the queue | ||
303 | * buffers depending on the requirements of your application. | ||
304 | * @note The default is 16 bytes for both the transmission and receive | ||
305 | * buffers. | ||
306 | */ | ||
307 | #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) | ||
308 | #define SERIAL_BUFFERS_SIZE 16 | ||
309 | #endif | ||
310 | |||
311 | /*===========================================================================*/ | ||
312 | /* SERIAL_USB driver related setting. */ | ||
313 | /*===========================================================================*/ | ||
314 | |||
315 | /** | ||
316 | * @brief Serial over USB buffers size. | ||
317 | * @details Configuration parameter, the buffer size must be a multiple of | ||
318 | * the USB data endpoint maximum packet size. | ||
319 | * @note The default is 256 bytes for both the transmission and receive | ||
320 | * buffers. | ||
321 | */ | ||
322 | #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) | ||
323 | #define SERIAL_USB_BUFFERS_SIZE 1 | ||
324 | #endif | ||
325 | |||
326 | /** | ||
327 | * @brief Serial over USB number of buffers. | ||
328 | * @note The default is 2 buffers. | ||
329 | */ | ||
330 | #if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) | ||
331 | #define SERIAL_USB_BUFFERS_NUMBER 2 | ||
332 | #endif | ||
333 | |||
334 | /*===========================================================================*/ | ||
335 | /* SPI driver related settings. */ | ||
336 | /*===========================================================================*/ | ||
337 | |||
338 | /** | ||
339 | * @brief Enables synchronous APIs. | ||
340 | * @note Disabling this option saves both code and data space. | ||
341 | */ | ||
342 | #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) | ||
343 | #define SPI_USE_WAIT TRUE | ||
344 | #endif | ||
345 | |||
346 | /** | ||
347 | * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. | ||
348 | * @note Disabling this option saves both code and data space. | ||
349 | */ | ||
350 | #if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
351 | #define SPI_USE_MUTUAL_EXCLUSION TRUE | ||
352 | #endif | ||
353 | |||
354 | /*===========================================================================*/ | ||
355 | /* UART driver related settings. */ | ||
356 | /*===========================================================================*/ | ||
357 | |||
358 | /** | ||
359 | * @brief Enables synchronous APIs. | ||
360 | * @note Disabling this option saves both code and data space. | ||
361 | */ | ||
362 | #if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) | ||
363 | #define UART_USE_WAIT FALSE | ||
364 | #endif | ||
365 | |||
366 | /** | ||
367 | * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. | ||
368 | * @note Disabling this option saves both code and data space. | ||
369 | */ | ||
370 | #if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
371 | #define UART_USE_MUTUAL_EXCLUSION FALSE | ||
372 | #endif | ||
373 | |||
374 | /*===========================================================================*/ | ||
375 | /* USB driver related settings. */ | ||
376 | /*===========================================================================*/ | ||
377 | |||
378 | /** | ||
379 | * @brief Enables synchronous APIs. | ||
380 | * @note Disabling this option saves both code and data space. | ||
381 | */ | ||
382 | #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) | ||
383 | #define USB_USE_WAIT TRUE | ||
384 | #endif | ||
385 | |||
386 | #endif /* HALCONF_H */ | ||
387 | |||
388 | /** @} */ | ||
diff --git a/keyboards/planck/rev6/matrix.c b/keyboards/planck/rev6/matrix.c new file mode 100644 index 000000000..e4ebe48ac --- /dev/null +++ b/keyboards/planck/rev6/matrix.c | |||
@@ -0,0 +1,205 @@ | |||
1 | #include <stdint.h> | ||
2 | #include <stdbool.h> | ||
3 | #include <string.h> | ||
4 | #include "hal.h" | ||
5 | #include "timer.h" | ||
6 | #include "wait.h" | ||
7 | #include "printf.h" | ||
8 | #include "backlight.h" | ||
9 | #include "matrix.h" | ||
10 | #include "action.h" | ||
11 | #include "keycode.h" | ||
12 | #include <string.h> | ||
13 | |||
14 | /* | ||
15 | * col: { B11, B10, B2, B1, A7, B0 } | ||
16 | * row: { A10, A9, A8, B15, C13, C14, C15, A2 } | ||
17 | */ | ||
18 | /* matrix state(1:on, 0:off) */ | ||
19 | static matrix_row_t matrix[MATRIX_ROWS]; | ||
20 | static matrix_row_t matrix_debouncing[MATRIX_COLS]; | ||
21 | static bool debouncing = false; | ||
22 | static uint16_t debouncing_time = 0; | ||
23 | |||
24 | static uint8_t encoder_state = 0; | ||
25 | static int8_t encoder_value = 0; | ||
26 | static int8_t encoder_LUT[] = { 0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0 }; | ||
27 | |||
28 | static bool dip_switch[4] = {0, 0, 0, 0}; | ||
29 | |||
30 | __attribute__ ((weak)) | ||
31 | void matrix_init_user(void) {} | ||
32 | |||
33 | __attribute__ ((weak)) | ||
34 | void matrix_scan_user(void) {} | ||
35 | |||
36 | __attribute__ ((weak)) | ||
37 | void matrix_init_kb(void) { | ||
38 | matrix_init_user(); | ||
39 | } | ||
40 | |||
41 | __attribute__ ((weak)) | ||
42 | void matrix_scan_kb(void) { | ||
43 | matrix_scan_user(); | ||
44 | } | ||
45 | |||
46 | void matrix_init(void) { | ||
47 | printf("matrix init\n"); | ||
48 | //debug_matrix = true; | ||
49 | |||
50 | // dip switch setup | ||
51 | palSetPadMode(GPIOB, 14, PAL_MODE_INPUT_PULLUP); | ||
52 | palSetPadMode(GPIOA, 15, PAL_MODE_INPUT_PULLUP); | ||
53 | palSetPadMode(GPIOA, 10, PAL_MODE_INPUT_PULLUP); | ||
54 | palSetPadMode(GPIOB, 9, PAL_MODE_INPUT_PULLUP); | ||
55 | |||
56 | // encoder setup | ||
57 | palSetPadMode(GPIOB, 12, PAL_MODE_INPUT_PULLUP); | ||
58 | palSetPadMode(GPIOB, 13, PAL_MODE_INPUT_PULLUP); | ||
59 | |||
60 | encoder_state = (palReadPad(GPIOB, 12) << 0) | (palReadPad(GPIOB, 13) << 1); | ||
61 | |||
62 | // actual matrix setup | ||
63 | palSetPadMode(GPIOB, 11, PAL_MODE_OUTPUT_PUSHPULL); | ||
64 | palSetPadMode(GPIOB, 10, PAL_MODE_OUTPUT_PUSHPULL); | ||
65 | palSetPadMode(GPIOB, 2, PAL_MODE_OUTPUT_PUSHPULL); | ||
66 | palSetPadMode(GPIOB, 1, PAL_MODE_OUTPUT_PUSHPULL); | ||
67 | palSetPadMode(GPIOA, 7, PAL_MODE_OUTPUT_PUSHPULL); | ||
68 | palSetPadMode(GPIOB, 0, PAL_MODE_OUTPUT_PUSHPULL); | ||
69 | |||
70 | palSetPadMode(GPIOA, 10, PAL_MODE_INPUT_PULLDOWN); | ||
71 | palSetPadMode(GPIOA, 9, PAL_MODE_INPUT_PULLDOWN); | ||
72 | palSetPadMode(GPIOA, 8, PAL_MODE_INPUT_PULLDOWN); | ||
73 | palSetPadMode(GPIOB, 15, PAL_MODE_INPUT_PULLDOWN); | ||
74 | palSetPadMode(GPIOC, 13, PAL_MODE_INPUT_PULLDOWN); | ||
75 | palSetPadMode(GPIOC, 14, PAL_MODE_INPUT_PULLDOWN); | ||
76 | palSetPadMode(GPIOC, 15, PAL_MODE_INPUT_PULLDOWN); | ||
77 | palSetPadMode(GPIOA, 2, PAL_MODE_INPUT_PULLDOWN); | ||
78 | |||
79 | |||
80 | memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); | ||
81 | memset(matrix_debouncing, 0, MATRIX_COLS * sizeof(matrix_row_t)); | ||
82 | |||
83 | |||
84 | matrix_init_quantum(); | ||
85 | } | ||
86 | |||
87 | __attribute__ ((weak)) | ||
88 | void dip_update(uint8_t index, bool active) { } | ||
89 | |||
90 | __attribute__ ((weak)) | ||
91 | void encoder_update(bool clockwise) { } | ||
92 | |||
93 | bool last_dip_switch[4] = {0}; | ||
94 | |||
95 | #ifndef ENCODER_RESOLUTION | ||
96 | #define ENCODER_RESOLUTION 4 | ||
97 | #endif | ||
98 | |||
99 | uint8_t matrix_scan(void) { | ||
100 | // dip switch | ||
101 | dip_switch[0] = !palReadPad(GPIOB, 14); | ||
102 | dip_switch[1] = !palReadPad(GPIOA, 15); | ||
103 | dip_switch[2] = !palReadPad(GPIOA, 10); | ||
104 | dip_switch[3] = !palReadPad(GPIOB, 9); | ||
105 | for (uint8_t i = 0; i < 4; i++) { | ||
106 | if (last_dip_switch[i] ^ dip_switch[i]) | ||
107 | dip_update(i, dip_switch[i]); | ||
108 | } | ||
109 | memcpy(last_dip_switch, dip_switch, sizeof(&dip_switch)); | ||
110 | |||
111 | // encoder on B12 and B13 | ||
112 | encoder_state <<= 2; | ||
113 | encoder_state |= (palReadPad(GPIOB, 12) << 0) | (palReadPad(GPIOB, 13) << 1); | ||
114 | encoder_value += encoder_LUT[encoder_state & 0xF]; | ||
115 | if (encoder_value >= ENCODER_RESOLUTION) { | ||
116 | encoder_update(0); | ||
117 | } | ||
118 | if (encoder_value <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise | ||
119 | encoder_update(1); | ||
120 | } | ||
121 | encoder_value %= ENCODER_RESOLUTION; | ||
122 | |||
123 | // actual matrix | ||
124 | for (int col = 0; col < MATRIX_COLS; col++) { | ||
125 | matrix_row_t data = 0; | ||
126 | |||
127 | // strobe col { B11, B10, B2, B1, A7, B0 } | ||
128 | switch (col) { | ||
129 | case 0: palSetPad(GPIOB, 11); break; | ||
130 | case 1: palSetPad(GPIOB, 10); break; | ||
131 | case 2: palSetPad(GPIOB, 2); break; | ||
132 | case 3: palSetPad(GPIOB, 1); break; | ||
133 | case 4: palSetPad(GPIOA, 7); break; | ||
134 | case 5: palSetPad(GPIOB, 0); break; | ||
135 | } | ||
136 | |||
137 | // need wait to settle pin state | ||
138 | wait_us(20); | ||
139 | |||
140 | // read row data { A10, A9, A8, B15, C13, C14, C15, A2 } | ||
141 | data = ( | ||
142 | (palReadPad(GPIOA, 10) << 0 ) | | ||
143 | (palReadPad(GPIOA, 9) << 1 ) | | ||
144 | (palReadPad(GPIOA, 8) << 2 ) | | ||
145 | (palReadPad(GPIOB, 15) << 3 ) | | ||
146 | (palReadPad(GPIOC, 13) << 4 ) | | ||
147 | (palReadPad(GPIOC, 14) << 5 ) | | ||
148 | (palReadPad(GPIOC, 15) << 6 ) | | ||
149 | (palReadPad(GPIOA, 2) << 7 ) | ||
150 | ); | ||
151 | |||
152 | // unstrobe col { B11, B10, B2, B1, A7, B0 } | ||
153 | switch (col) { | ||
154 | case 0: palClearPad(GPIOB, 11); break; | ||
155 | case 1: palClearPad(GPIOB, 10); break; | ||
156 | case 2: palClearPad(GPIOB, 2); break; | ||
157 | case 3: palClearPad(GPIOB, 1); break; | ||
158 | case 4: palClearPad(GPIOA, 7); break; | ||
159 | case 5: palClearPad(GPIOB, 0); break; | ||
160 | } | ||
161 | |||
162 | if (matrix_debouncing[col] != data) { | ||
163 | matrix_debouncing[col] = data; | ||
164 | debouncing = true; | ||
165 | debouncing_time = timer_read(); | ||
166 | } | ||
167 | } | ||
168 | |||
169 | if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { | ||
170 | for (int row = 0; row < MATRIX_ROWS; row++) { | ||
171 | matrix[row] = 0; | ||
172 | for (int col = 0; col < MATRIX_COLS; col++) { | ||
173 | matrix[row] |= ((matrix_debouncing[col] & (1 << row) ? 1 : 0) << col); | ||
174 | } | ||
175 | } | ||
176 | debouncing = false; | ||
177 | } | ||
178 | |||
179 | matrix_scan_quantum(); | ||
180 | |||
181 | return 1; | ||
182 | } | ||
183 | |||
184 | bool matrix_is_on(uint8_t row, uint8_t col) { | ||
185 | return (matrix[row] & (1<<col)); | ||
186 | } | ||
187 | |||
188 | matrix_row_t matrix_get_row(uint8_t row) { | ||
189 | return matrix[row]; | ||
190 | } | ||
191 | |||
192 | void matrix_print(void) { | ||
193 | printf("\nr/c 01234567\n"); | ||
194 | for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | ||
195 | printf("%X0: ", row); | ||
196 | matrix_row_t data = matrix_get_row(row); | ||
197 | for (int col = 0; col < MATRIX_COLS; col++) { | ||
198 | if (data & (1<<col)) | ||
199 | printf("1"); | ||
200 | else | ||
201 | printf("0"); | ||
202 | } | ||
203 | printf("\n"); | ||
204 | } | ||
205 | } | ||
diff --git a/keyboards/planck/rev6/mcuconf.h b/keyboards/planck/rev6/mcuconf.h new file mode 100644 index 000000000..2d27bee4e --- /dev/null +++ b/keyboards/planck/rev6/mcuconf.h | |||
@@ -0,0 +1,257 @@ | |||
1 | /* | ||
2 | ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio | ||
3 | |||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | you may not use this file except in compliance with the License. | ||
6 | You may obtain a copy of the License at | ||
7 | |||
8 | http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | |||
10 | Unless required by applicable law or agreed to in writing, software | ||
11 | distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | See the License for the specific language governing permissions and | ||
14 | limitations under the License. | ||
15 | */ | ||
16 | |||
17 | #ifndef MCUCONF_H | ||
18 | #define MCUCONF_H | ||
19 | |||
20 | /* | ||
21 | * STM32F3xx drivers configuration. | ||
22 | * The following settings override the default settings present in | ||
23 | * the various device driver implementation headers. | ||
24 | * Note that the settings for each driver only have effect if the whole | ||
25 | * driver is enabled in halconf.h. | ||
26 | * | ||
27 | * IRQ priorities: | ||
28 | * 15...0 Lowest...Highest. | ||
29 | * | ||
30 | * DMA priorities: | ||
31 | * 0...3 Lowest...Highest. | ||
32 | */ | ||
33 | |||
34 | #define STM32F3xx_MCUCONF | ||
35 | |||
36 | /* | ||
37 | * HAL driver system settings. | ||
38 | */ | ||
39 | #define STM32_NO_INIT FALSE | ||
40 | #define STM32_PVD_ENABLE FALSE | ||
41 | #define STM32_PLS STM32_PLS_LEV0 | ||
42 | #define STM32_HSI_ENABLED TRUE | ||
43 | #define STM32_LSI_ENABLED TRUE | ||
44 | #define STM32_HSE_ENABLED TRUE | ||
45 | #define STM32_LSE_ENABLED FALSE | ||
46 | #define STM32_SW STM32_SW_PLL | ||
47 | #define STM32_PLLSRC STM32_PLLSRC_HSE | ||
48 | #define STM32_PREDIV_VALUE 1 | ||
49 | #define STM32_PLLMUL_VALUE 9 | ||
50 | #define STM32_HPRE STM32_HPRE_DIV1 | ||
51 | #define STM32_PPRE1 STM32_PPRE1_DIV2 | ||
52 | #define STM32_PPRE2 STM32_PPRE2_DIV2 | ||
53 | #define STM32_MCOSEL STM32_MCOSEL_NOCLOCK | ||
54 | #define STM32_ADC12PRES STM32_ADC12PRES_DIV1 | ||
55 | #define STM32_ADC34PRES STM32_ADC34PRES_DIV1 | ||
56 | #define STM32_USART1SW STM32_USART1SW_PCLK | ||
57 | #define STM32_USART2SW STM32_USART2SW_PCLK | ||
58 | #define STM32_USART3SW STM32_USART3SW_PCLK | ||
59 | #define STM32_UART4SW STM32_UART4SW_PCLK | ||
60 | #define STM32_UART5SW STM32_UART5SW_PCLK | ||
61 | #define STM32_I2C1SW STM32_I2C1SW_SYSCLK | ||
62 | #define STM32_I2C2SW STM32_I2C2SW_SYSCLK | ||
63 | #define STM32_TIM1SW STM32_TIM1SW_PCLK2 | ||
64 | #define STM32_TIM8SW STM32_TIM8SW_PCLK2 | ||
65 | #define STM32_RTCSEL STM32_RTCSEL_LSI | ||
66 | #define STM32_USB_CLOCK_REQUIRED TRUE | ||
67 | #define STM32_USBPRE STM32_USBPRE_DIV1P5 | ||
68 | |||
69 | #undef STM32_HSE_BYPASS | ||
70 | // #error "oh no" | ||
71 | // #endif | ||
72 | |||
73 | /* | ||
74 | * ADC driver system settings. | ||
75 | */ | ||
76 | #define STM32_ADC_DUAL_MODE FALSE | ||
77 | #define STM32_ADC_COMPACT_SAMPLES FALSE | ||
78 | #define STM32_ADC_USE_ADC1 FALSE | ||
79 | #define STM32_ADC_USE_ADC2 FALSE | ||
80 | #define STM32_ADC_USE_ADC3 FALSE | ||
81 | #define STM32_ADC_USE_ADC4 FALSE | ||
82 | #define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1) | ||
83 | #define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 1) | ||
84 | #define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) | ||
85 | #define STM32_ADC_ADC4_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) | ||
86 | #define STM32_ADC_ADC1_DMA_PRIORITY 2 | ||
87 | #define STM32_ADC_ADC2_DMA_PRIORITY 2 | ||
88 | #define STM32_ADC_ADC3_DMA_PRIORITY 2 | ||
89 | #define STM32_ADC_ADC4_DMA_PRIORITY 2 | ||
90 | #define STM32_ADC_ADC12_IRQ_PRIORITY 5 | ||
91 | #define STM32_ADC_ADC3_IRQ_PRIORITY 5 | ||
92 | #define STM32_ADC_ADC4_IRQ_PRIORITY 5 | ||
93 | #define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 5 | ||
94 | #define STM32_ADC_ADC2_DMA_IRQ_PRIORITY 5 | ||
95 | #define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 5 | ||
96 | #define STM32_ADC_ADC4_DMA_IRQ_PRIORITY 5 | ||
97 | #define STM32_ADC_ADC12_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 | ||
98 | #define STM32_ADC_ADC34_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 | ||
99 | |||
100 | /* | ||
101 | * CAN driver system settings. | ||
102 | */ | ||
103 | #define STM32_CAN_USE_CAN1 FALSE | ||
104 | #define STM32_CAN_CAN1_IRQ_PRIORITY 11 | ||
105 | |||
106 | /* | ||
107 | * DAC driver system settings. | ||
108 | */ | ||
109 | #define STM32_DAC_DUAL_MODE FALSE | ||
110 | #define STM32_DAC_USE_DAC1_CH1 TRUE | ||
111 | #define STM32_DAC_USE_DAC1_CH2 TRUE | ||
112 | #define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10 | ||
113 | #define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10 | ||
114 | #define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 | ||
115 | #define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2 | ||
116 | |||
117 | /* | ||
118 | * EXT driver system settings. | ||
119 | */ | ||
120 | #define STM32_EXT_EXTI0_IRQ_PRIORITY 6 | ||
121 | #define STM32_EXT_EXTI1_IRQ_PRIORITY 6 | ||
122 | #define STM32_EXT_EXTI2_IRQ_PRIORITY 6 | ||
123 | #define STM32_EXT_EXTI3_IRQ_PRIORITY 6 | ||
124 | #define STM32_EXT_EXTI4_IRQ_PRIORITY 6 | ||
125 | #define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 | ||
126 | #define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 | ||
127 | #define STM32_EXT_EXTI16_IRQ_PRIORITY 6 | ||
128 | #define STM32_EXT_EXTI17_IRQ_PRIORITY 6 | ||
129 | #define STM32_EXT_EXTI18_IRQ_PRIORITY 6 | ||
130 | #define STM32_EXT_EXTI19_IRQ_PRIORITY 6 | ||
131 | #define STM32_EXT_EXTI20_IRQ_PRIORITY 6 | ||
132 | #define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6 | ||
133 | #define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6 | ||
134 | #define STM32_EXT_EXTI33_IRQ_PRIORITY 6 | ||
135 | |||
136 | /* | ||
137 | * GPT driver system settings. | ||
138 | */ | ||
139 | #define STM32_GPT_USE_TIM1 FALSE | ||
140 | #define STM32_GPT_USE_TIM2 FALSE | ||
141 | #define STM32_GPT_USE_TIM3 FALSE | ||
142 | #define STM32_GPT_USE_TIM4 FALSE | ||
143 | #define STM32_GPT_USE_TIM6 TRUE | ||
144 | #define STM32_GPT_USE_TIM7 TRUE | ||
145 | #define STM32_GPT_USE_TIM8 TRUE | ||
146 | #define STM32_GPT_TIM1_IRQ_PRIORITY 7 | ||
147 | #define STM32_GPT_TIM2_IRQ_PRIORITY 7 | ||
148 | #define STM32_GPT_TIM3_IRQ_PRIORITY 7 | ||
149 | #define STM32_GPT_TIM4_IRQ_PRIORITY 7 | ||
150 | #define STM32_GPT_TIM6_IRQ_PRIORITY 7 | ||
151 | #define STM32_GPT_TIM7_IRQ_PRIORITY 7 | ||
152 | #define STM32_GPT_TIM8_IRQ_PRIORITY 7 | ||
153 | |||
154 | /* | ||
155 | * I2C driver system settings. | ||
156 | */ | ||
157 | #define STM32_I2C_USE_I2C1 FALSE | ||
158 | #define STM32_I2C_USE_I2C2 FALSE | ||
159 | #define STM32_I2C_BUSY_TIMEOUT 50 | ||
160 | #define STM32_I2C_I2C1_IRQ_PRIORITY 10 | ||
161 | #define STM32_I2C_I2C2_IRQ_PRIORITY 10 | ||
162 | #define STM32_I2C_USE_DMA TRUE | ||
163 | #define STM32_I2C_I2C1_DMA_PRIORITY 1 | ||
164 | #define STM32_I2C_I2C2_DMA_PRIORITY 1 | ||
165 | #define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") | ||
166 | |||
167 | /* | ||
168 | * ICU driver system settings. | ||
169 | */ | ||
170 | #define STM32_ICU_USE_TIM1 FALSE | ||
171 | #define STM32_ICU_USE_TIM2 FALSE | ||
172 | #define STM32_ICU_USE_TIM3 FALSE | ||
173 | #define STM32_ICU_USE_TIM4 FALSE | ||
174 | #define STM32_ICU_USE_TIM8 FALSE | ||
175 | #define STM32_ICU_TIM1_IRQ_PRIORITY 7 | ||
176 | #define STM32_ICU_TIM2_IRQ_PRIORITY 7 | ||
177 | #define STM32_ICU_TIM3_IRQ_PRIORITY 7 | ||
178 | #define STM32_ICU_TIM4_IRQ_PRIORITY 7 | ||
179 | #define STM32_ICU_TIM8_IRQ_PRIORITY 7 | ||
180 | |||
181 | /* | ||
182 | * PWM driver system settings. | ||
183 | */ | ||
184 | #define STM32_PWM_USE_ADVANCED FALSE | ||
185 | #define STM32_PWM_USE_TIM1 FALSE | ||
186 | #define STM32_PWM_USE_TIM2 TRUE | ||
187 | #define STM32_PWM_USE_TIM3 TRUE | ||
188 | #define STM32_PWM_USE_TIM4 FALSE | ||
189 | #define STM32_PWM_USE_TIM8 FALSE | ||
190 | #define STM32_PWM_TIM1_IRQ_PRIORITY 7 | ||
191 | #define STM32_PWM_TIM2_IRQ_PRIORITY 7 | ||
192 | #define STM32_PWM_TIM3_IRQ_PRIORITY 7 | ||
193 | #define STM32_PWM_TIM4_IRQ_PRIORITY 7 | ||
194 | #define STM32_PWM_TIM8_IRQ_PRIORITY 7 | ||
195 | |||
196 | /* | ||
197 | * SERIAL driver system settings. | ||
198 | */ | ||
199 | #define STM32_SERIAL_USE_USART1 FALSE | ||
200 | #define STM32_SERIAL_USE_USART2 TRUE | ||
201 | #define STM32_SERIAL_USE_USART3 FALSE | ||
202 | #define STM32_SERIAL_USE_UART4 FALSE | ||
203 | #define STM32_SERIAL_USE_UART5 FALSE | ||
204 | #define STM32_SERIAL_USART1_PRIORITY 12 | ||
205 | #define STM32_SERIAL_USART2_PRIORITY 12 | ||
206 | #define STM32_SERIAL_USART3_PRIORITY 12 | ||
207 | #define STM32_SERIAL_UART4_PRIORITY 12 | ||
208 | #define STM32_SERIAL_UART5_PRIORITY 12 | ||
209 | |||
210 | /* | ||
211 | * SPI driver system settings. | ||
212 | */ | ||
213 | #define STM32_SPI_USE_SPI1 FALSE | ||
214 | #define STM32_SPI_USE_SPI2 FALSE | ||
215 | #define STM32_SPI_USE_SPI3 FALSE | ||
216 | #define STM32_SPI_SPI1_DMA_PRIORITY 1 | ||
217 | #define STM32_SPI_SPI2_DMA_PRIORITY 1 | ||
218 | #define STM32_SPI_SPI3_DMA_PRIORITY 1 | ||
219 | #define STM32_SPI_SPI1_IRQ_PRIORITY 10 | ||
220 | #define STM32_SPI_SPI2_IRQ_PRIORITY 10 | ||
221 | #define STM32_SPI_SPI3_IRQ_PRIORITY 10 | ||
222 | #define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") | ||
223 | |||
224 | /* | ||
225 | * ST driver system settings. | ||
226 | */ | ||
227 | #define STM32_ST_IRQ_PRIORITY 8 | ||
228 | #define STM32_ST_USE_TIMER 4 | ||
229 | |||
230 | /* | ||
231 | * UART driver system settings. | ||
232 | */ | ||
233 | #define STM32_UART_USE_USART1 FALSE | ||
234 | #define STM32_UART_USE_USART2 FALSE | ||
235 | #define STM32_UART_USE_USART3 FALSE | ||
236 | #define STM32_UART_USART1_IRQ_PRIORITY 12 | ||
237 | #define STM32_UART_USART2_IRQ_PRIORITY 12 | ||
238 | #define STM32_UART_USART3_IRQ_PRIORITY 12 | ||
239 | #define STM32_UART_USART1_DMA_PRIORITY 0 | ||
240 | #define STM32_UART_USART2_DMA_PRIORITY 0 | ||
241 | #define STM32_UART_USART3_DMA_PRIORITY 0 | ||
242 | #define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") | ||
243 | |||
244 | /* | ||
245 | * USB driver system settings. | ||
246 | */ | ||
247 | #define STM32_USB_USE_USB1 TRUE | ||
248 | #define STM32_USB_LOW_POWER_ON_SUSPEND FALSE | ||
249 | #define STM32_USB_USB1_HP_IRQ_PRIORITY 13 | ||
250 | #define STM32_USB_USB1_LP_IRQ_PRIORITY 14 | ||
251 | |||
252 | /* | ||
253 | * WDG driver system settings. | ||
254 | */ | ||
255 | #define STM32_WDG_USE_IWDG FALSE | ||
256 | |||
257 | #endif /* MCUCONF_H */ | ||
diff --git a/keyboards/planck/rev6/rev6.c b/keyboards/planck/rev6/rev6.c new file mode 100644 index 000000000..650e1a194 --- /dev/null +++ b/keyboards/planck/rev6/rev6.c | |||
@@ -0,0 +1,24 @@ | |||
1 | /* Copyright 2018 Jack Humbert <jack.humb@gmail.com> | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | #include "rev6.h" | ||
17 | |||
18 | void matrix_init_kb(void) { | ||
19 | matrix_init_user(); | ||
20 | } | ||
21 | |||
22 | void matrix_scan_kb(void) { | ||
23 | matrix_scan_user(); | ||
24 | } | ||
diff --git a/keyboards/planck/rev6/rev6.h b/keyboards/planck/rev6/rev6.h new file mode 100644 index 000000000..75c2904c5 --- /dev/null +++ b/keyboards/planck/rev6/rev6.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* Copyright 2018 Jack Humbert <jack.humb@gmail.com> | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | #ifndef REV6_H | ||
17 | #define REV6_H | ||
18 | |||
19 | #include "planck.h" | ||
20 | |||
21 | #endif | ||
diff --git a/keyboards/planck/rev6/rules.mk b/keyboards/planck/rev6/rules.mk new file mode 100644 index 000000000..3603e287b --- /dev/null +++ b/keyboards/planck/rev6/rules.mk | |||
@@ -0,0 +1,56 @@ | |||
1 | # project specific files | ||
2 | SRC = matrix.c | ||
3 | LAYOUTS += ortho_4x12 | ||
4 | |||
5 | ## chip/board settings | ||
6 | # - the next two should match the directories in | ||
7 | # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) | ||
8 | MCU_FAMILY = STM32 | ||
9 | MCU_SERIES = STM32F3xx | ||
10 | |||
11 | # Linker script to use | ||
12 | # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ | ||
13 | # or <this_dir>/ld/ | ||
14 | MCU_LDSCRIPT = STM32F303xC | ||
15 | |||
16 | # Startup code to use | ||
17 | # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ | ||
18 | MCU_STARTUP = stm32f3xx | ||
19 | |||
20 | # Board: it should exist either in <chibios>/os/hal/boards/ | ||
21 | # or <this_dir>/boards | ||
22 | BOARD = GENERIC_STM32_F303XC | ||
23 | |||
24 | # Cortex version | ||
25 | MCU = cortex-m4 | ||
26 | |||
27 | # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 | ||
28 | ARMV = 7 | ||
29 | |||
30 | USE_FPU = yes | ||
31 | |||
32 | # Vector table for application | ||
33 | # 0x00000000-0x00001000 area is occupied by bootlaoder.*/ | ||
34 | # The CORTEX_VTOR... is needed only for MCHCK/Infinity KB | ||
35 | # OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 | ||
36 | OPT_DEFS = | ||
37 | |||
38 | # Options to pass to dfu-util when flashing | ||
39 | DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave | ||
40 | |||
41 | # Build Options | ||
42 | # comment out to disable the options. | ||
43 | # | ||
44 | BACKLIGHT_ENABLE = no | ||
45 | BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration | ||
46 | ## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) | ||
47 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
48 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
49 | CONSOLE_ENABLE = yes # Console for debug | ||
50 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
51 | #SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend | ||
52 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
53 | CUSTOM_MATRIX = yes # Custom matrix file | ||
54 | AUDIO_ENABLE = yes | ||
55 | RGBLIGHT_ENABLE = no | ||
56 | # SERIAL_LINK_ENABLE = yes | ||
diff --git a/quantum/audio/audio_arm.c b/quantum/audio/audio_arm.c index 247dc337d..d38184f32 100644 --- a/quantum/audio/audio_arm.c +++ b/quantum/audio/audio_arm.c | |||
@@ -79,7 +79,7 @@ float startup_song[][2] = STARTUP_SONG; | |||
79 | 79 | ||
80 | static void gpt_cb8(GPTDriver *gptp); | 80 | static void gpt_cb8(GPTDriver *gptp); |
81 | 81 | ||
82 | #define DAC_BUFFER_SIZE 360 | 82 | #define DAC_BUFFER_SIZE 720 |
83 | 83 | ||
84 | #define START_CHANNEL_1() gptStart(&GPTD6, &gpt6cfg1); \ | 84 | #define START_CHANNEL_1() gptStart(&GPTD6, &gpt6cfg1); \ |
85 | gptStartContinuous(&GPTD6, 2U) | 85 | gptStartContinuous(&GPTD6, 2U) |
@@ -167,6 +167,39 @@ GPTConfig gpt8cfg1 = { | |||
167 | // 1622, 1657, 1692, 1727, 1763, 1798, 1834, 1869, 1905, 1940, 1976, 2012 | 167 | // 1622, 1657, 1692, 1727, 1763, 1798, 1834, 1869, 1905, 1940, 1976, 2012 |
168 | // }; | 168 | // }; |
169 | 169 | ||
170 | // static const dacsample_t dac_buffer_2[DAC_BUFFER_SIZE] = { | ||
171 | // 12, 8, 5, 3, 2, 1, 0, 1, 2, 3, 5, 8, | ||
172 | // 12, 16, 20, 26, 32, 38, 45, 53, 61, 70, 80, 90, | ||
173 | // 101, 112, 124, 136, 150, 163, 177, 192, 208, 224, 240, 257, | ||
174 | // 275, 293, 312, 331, 350, 371, 391, 413, 434, 457, 479, 503, | ||
175 | // 526, 550, 575, 600, 626, 651, 678, 705, 732, 759, 787, 816, | ||
176 | // 844, 873, 903, 933, 963, 993, 1024, 1055, 1086, 1118, 1150, 1182, | ||
177 | // 1215, 1248, 1281, 1314, 1347, 1381, 1415, 1449, 1483, 1518, 1552, 1587, | ||
178 | // 1622, 1657, 1692, 1727, 1763, 1798, 1834, 1869, 1905, 1940, 1976, 2012, | ||
179 | // 2047, 2082, 2118, 2154, 2189, 2225, 2260, 2296, 2331, 2367, 2402, 2437, | ||
180 | // 2472, 2507, 2542, 2576, 2611, 2645, 2679, 2713, 2747, 2780, 2813, 2846, | ||
181 | // 2879, 2912, 2944, 2976, 3008, 3039, 3070, 3101, 3131, 3161, 3191, 3221, | ||
182 | // 3250, 3278, 3307, 3335, 3362, 3389, 3416, 3443, 3468, 3494, 3519, 3544, | ||
183 | // 3568, 3591, 3615, 3637, 3660, 3681, 3703, 3723, 3744, 3763, 3782, 3801, | ||
184 | // 3819, 3837, 3854, 3870, 3886, 3902, 3917, 3931, 3944, 3958, 3970, 3982, | ||
185 | // 3993, 4004, 4014, 4024, 4033, 4041, 4049, 4056, 4062, 4068, 4074, 4078, | ||
186 | // 4082, 4086, 4089, 4091, 4092, 4093, 4094, 4093, 4092, 4091, 4089, 4086, | ||
187 | // 4082, 4078, 4074, 4068, 4062, 4056, 4049, 4041, 4033, 4024, 4014, 4004, | ||
188 | // 3993, 3982, 3970, 3958, 3944, 3931, 3917, 3902, 3886, 3870, 3854, 3837, | ||
189 | // 3819, 3801, 3782, 3763, 3744, 3723, 3703, 3681, 3660, 3637, 3615, 3591, | ||
190 | // 3568, 3544, 3519, 3494, 3468, 3443, 3416, 3389, 3362, 3335, 3307, 3278, | ||
191 | // 3250, 3221, 3191, 3161, 3131, 3101, 3070, 3039, 3008, 2976, 2944, 2912, | ||
192 | // 2879, 2846, 2813, 2780, 2747, 2713, 2679, 2645, 2611, 2576, 2542, 2507, | ||
193 | // 2472, 2437, 2402, 2367, 2331, 2296, 2260, 2225, 2189, 2154, 2118, 2082, | ||
194 | // 2047, 2012, 1976, 1940, 1905, 1869, 1834, 1798, 1763, 1727, 1692, 1657, | ||
195 | // 1622, 1587, 1552, 1518, 1483, 1449, 1415, 1381, 1347, 1314, 1281, 1248, | ||
196 | // 1215, 1182, 1150, 1118, 1086, 1055, 1024, 993, 963, 933, 903, 873, | ||
197 | // 844, 816, 787, 759, 732, 705, 678, 651, 626, 600, 575, 550, | ||
198 | // 526, 503, 479, 457, 434, 413, 391, 371, 350, 331, 312, 293, | ||
199 | // 275, 257, 240, 224, 208, 192, 177, 163, 150, 136, 124, 112, | ||
200 | // 101, 90, 80, 70, 61, 53, 45, 38, 32, 26, 20, 16 | ||
201 | // }; | ||
202 | |||
170 | // squarewave | 203 | // squarewave |
171 | static const dacsample_t dac_buffer[DAC_BUFFER_SIZE] = { | 204 | static const dacsample_t dac_buffer[DAC_BUFFER_SIZE] = { |
172 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | 205 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, |
@@ -184,6 +217,21 @@ static const dacsample_t dac_buffer[DAC_BUFFER_SIZE] = { | |||
184 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | 217 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, |
185 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | 218 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, |
186 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | 219 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, |
220 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
221 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
222 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
223 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
224 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
225 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
226 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
227 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
228 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
229 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
230 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
231 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
232 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
233 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
234 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
187 | 235 | ||
188 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 236 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
189 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 237 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
@@ -199,26 +247,26 @@ static const dacsample_t dac_buffer[DAC_BUFFER_SIZE] = { | |||
199 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 247 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
200 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 248 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
201 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 249 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
250 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
251 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
252 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
253 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
254 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
255 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
256 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
257 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
258 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
259 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
260 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
261 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
262 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
263 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
264 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
202 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 | 265 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
203 | }; | 266 | }; |
204 | 267 | ||
205 | // squarewave | 268 | // squarewave |
206 | static const dacsample_t dac_buffer_2[DAC_BUFFER_SIZE] = { | 269 | static const dacsample_t dac_buffer_2[DAC_BUFFER_SIZE] = { |
207 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
208 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
209 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
210 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
211 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
212 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
213 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
214 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
215 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
216 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
217 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
218 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
219 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
220 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
221 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
222 | 270 | ||
223 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 271 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
224 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 272 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
@@ -234,7 +282,52 @@ static const dacsample_t dac_buffer_2[DAC_BUFFER_SIZE] = { | |||
234 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 282 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
235 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 283 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
236 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 284 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
237 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 | 285 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
286 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
287 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
288 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
289 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
290 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
291 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
292 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
293 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
294 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
295 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
296 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
297 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
298 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
299 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
300 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
301 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
302 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
303 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
304 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
305 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
306 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
307 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
308 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
309 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
310 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
311 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
312 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
313 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
314 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
315 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
316 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
317 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
318 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
319 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
320 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
321 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
322 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
323 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
324 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
325 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
326 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
327 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
328 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
329 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, | ||
330 | 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047 | ||
238 | }; | 331 | }; |
239 | 332 | ||
240 | /* | 333 | /* |
@@ -317,7 +410,7 @@ void audio_init() | |||
317 | dacStart(&DACD2, &dac1cfg2); | 410 | dacStart(&DACD2, &dac1cfg2); |
318 | 411 | ||
319 | /* | 412 | /* |
320 | * Starting GPT6 driver, it is used for triggering the DAC. | 413 | * Starting GPT6/7 driver, it is used for triggering the DAC. |
321 | */ | 414 | */ |
322 | START_CHANNEL_1(); | 415 | START_CHANNEL_1(); |
323 | START_CHANNEL_2(); | 416 | START_CHANNEL_2(); |
@@ -325,12 +418,8 @@ void audio_init() | |||
325 | /* | 418 | /* |
326 | * Starting a continuous conversion. | 419 | * Starting a continuous conversion. |
327 | */ | 420 | */ |
328 | dacStartConversion(&DACD1, &dacgrpcfg1, | 421 | dacStartConversion(&DACD1, &dacgrpcfg1, (dacsample_t *)dac_buffer, DAC_BUFFER_SIZE); |
329 | (dacsample_t *)dac_buffer, DAC_BUFFER_SIZE); | 422 | dacStartConversion(&DACD2, &dacgrpcfg2, (dacsample_t *)dac_buffer_2, DAC_BUFFER_SIZE); |
330 | dacStartConversion(&DACD2, &dacgrpcfg2, | ||
331 | (dacsample_t *)dac_buffer_2, DAC_BUFFER_SIZE); | ||
332 | // gptStartContinuous(&GPTD6, 2U); | ||
333 | |||
334 | 423 | ||
335 | audio_initialized = true; | 424 | audio_initialized = true; |
336 | 425 | ||
@@ -469,6 +558,8 @@ static void gpt_cb8(GPTDriver *gptp) { | |||
469 | 558 | ||
470 | if (GET_CHANNEL_2_FREQ != (uint16_t)freq_alt) { | 559 | if (GET_CHANNEL_2_FREQ != (uint16_t)freq_alt) { |
471 | UPDATE_CHANNEL_2_FREQ(freq_alt); | 560 | UPDATE_CHANNEL_2_FREQ(freq_alt); |
561 | } else { | ||
562 | RESTART_CHANNEL_2(); | ||
472 | } | 563 | } |
473 | //note_timbre; | 564 | //note_timbre; |
474 | } | 565 | } |
@@ -528,6 +619,8 @@ static void gpt_cb8(GPTDriver *gptp) { | |||
528 | 619 | ||
529 | if (GET_CHANNEL_1_FREQ != (uint16_t)freq) { | 620 | if (GET_CHANNEL_1_FREQ != (uint16_t)freq) { |
530 | UPDATE_CHANNEL_1_FREQ(freq); | 621 | UPDATE_CHANNEL_1_FREQ(freq); |
622 | } else { | ||
623 | RESTART_CHANNEL_1(); | ||
531 | } | 624 | } |
532 | //note_timbre; | 625 | //note_timbre; |
533 | } | 626 | } |
@@ -565,11 +658,11 @@ static void gpt_cb8(GPTDriver *gptp) { | |||
565 | bool end_of_note = false; | 658 | bool end_of_note = false; |
566 | if (GET_CHANNEL_1_FREQ > 0) { | 659 | if (GET_CHANNEL_1_FREQ > 0) { |
567 | if (!note_resting) | 660 | if (!note_resting) |
568 | end_of_note = (note_position >= (note_length*16 - 1)); | 661 | end_of_note = (note_position >= (note_length*8 - 1)); |
569 | else | 662 | else |
570 | end_of_note = (note_position >= (note_length*16)); | 663 | end_of_note = (note_position >= (note_length*8)); |
571 | } else { | 664 | } else { |
572 | end_of_note = (note_position >= (note_length*16)); | 665 | end_of_note = (note_position >= (note_length*8)); |
573 | } | 666 | } |
574 | 667 | ||
575 | if (end_of_note) { | 668 | if (end_of_note) { |
@@ -622,6 +715,7 @@ void play_note(float freq, int vol) { | |||
622 | 715 | ||
623 | if (audio_config.enable && voices < 8) { | 716 | if (audio_config.enable && voices < 8) { |
624 | 717 | ||
718 | |||
625 | // Cancel notes if notes are playing | 719 | // Cancel notes if notes are playing |
626 | if (playing_notes) | 720 | if (playing_notes) |
627 | stop_all_notes(); | 721 | stop_all_notes(); |
diff --git a/quantum/audio/muse.c b/quantum/audio/muse.c new file mode 100644 index 000000000..f3cb592d8 --- /dev/null +++ b/quantum/audio/muse.c | |||
@@ -0,0 +1,111 @@ | |||
1 | #include "muse.h" | ||
2 | |||
3 | enum { | ||
4 | MUSE_OFF, | ||
5 | MUSE_ON, | ||
6 | MUSE_C_1_2, | ||
7 | MUSE_C1, | ||
8 | MUSE_C2, | ||
9 | MUSE_C4, | ||
10 | MUSE_C8, | ||
11 | MUSE_C3, | ||
12 | MUSE_C6, | ||
13 | MUSE_B1, | ||
14 | MUSE_B2, | ||
15 | MUSE_B3, | ||
16 | MUSE_B4, | ||
17 | MUSE_B5, | ||
18 | MUSE_B6, | ||
19 | MUSE_B7, | ||
20 | MUSE_B8, | ||
21 | MUSE_B9, | ||
22 | MUSE_B10, | ||
23 | MUSE_B11, | ||
24 | MUSE_B12, | ||
25 | MUSE_B13, | ||
26 | MUSE_B14, | ||
27 | MUSE_B15, | ||
28 | MUSE_B16, | ||
29 | MUSE_B17, | ||
30 | MUSE_B18, | ||
31 | MUSE_B19, | ||
32 | MUSE_B20, | ||
33 | MUSE_B21, | ||
34 | MUSE_B22, | ||
35 | MUSE_B23, | ||
36 | MUSE_B24, | ||
37 | MUSE_B25, | ||
38 | MUSE_B26, | ||
39 | MUSE_B27, | ||
40 | MUSE_B28, | ||
41 | MUSE_B29, | ||
42 | MUSE_B30, | ||
43 | MUSE_B31 | ||
44 | }; | ||
45 | |||
46 | bool number_of_ones_to_bool[16] = { | ||
47 | 1, 0, 0, 1, 0, 1, 1, 0, | ||
48 | 0, 1, 1, 0, 1, 0, 0, 1 | ||
49 | }; | ||
50 | |||
51 | uint8_t muse_interval[4] = {MUSE_B7, MUSE_B19, MUSE_B3, MUSE_B28}; | ||
52 | uint8_t muse_theme[4] = {MUSE_B8, MUSE_B23, MUSE_B18, MUSE_B17}; | ||
53 | |||
54 | bool muse_timer_1bit = 0; | ||
55 | uint8_t muse_timer_2bit = 0; | ||
56 | uint8_t muse_timer_2bit_counter = 0; | ||
57 | uint8_t muse_timer_4bit = 0; | ||
58 | uint32_t muse_timer_31bit = 0; | ||
59 | |||
60 | bool bit_for_value(uint8_t value) { | ||
61 | switch (value) { | ||
62 | case MUSE_OFF: | ||
63 | return 0; | ||
64 | case MUSE_ON: | ||
65 | return 1; | ||
66 | case MUSE_C_1_2: | ||
67 | return muse_timer_1bit; | ||
68 | case MUSE_C1: | ||
69 | return (muse_timer_4bit & 1); | ||
70 | case MUSE_C2: | ||
71 | return (muse_timer_4bit & 2); | ||
72 | case MUSE_C4: | ||
73 | return (muse_timer_4bit & 4); | ||
74 | case MUSE_C8: | ||
75 | return (muse_timer_4bit & 8); | ||
76 | case MUSE_C3: | ||
77 | return (muse_timer_2bit & 1); | ||
78 | case MUSE_C6: | ||
79 | return (muse_timer_2bit & 2); | ||
80 | default: | ||
81 | return muse_timer_31bit & (1UL << (value - MUSE_B1)); | ||
82 | } | ||
83 | } | ||
84 | |||
85 | uint8_t muse_clock_pulse(void) { | ||
86 | |||
87 | bool top = number_of_ones_to_bool[ | ||
88 | bit_for_value(muse_theme[0]) + | ||
89 | (bit_for_value(muse_theme[1]) << 1) + | ||
90 | (bit_for_value(muse_theme[2]) << 2) + | ||
91 | (bit_for_value(muse_theme[3]) << 3) | ||
92 | ]; | ||
93 | |||
94 | if (muse_timer_1bit == 0) { | ||
95 | if (muse_timer_2bit_counter == 0) { | ||
96 | muse_timer_2bit = (muse_timer_2bit + 1) % 4; | ||
97 | } | ||
98 | muse_timer_2bit_counter = (muse_timer_2bit_counter + 1) % 3; | ||
99 | muse_timer_4bit = (muse_timer_4bit + 1) % 16; | ||
100 | muse_timer_31bit = (muse_timer_31bit << 1) + top; | ||
101 | } | ||
102 | |||
103 | muse_timer_1bit = (muse_timer_1bit + 1) % 2; | ||
104 | |||
105 | return | ||
106 | bit_for_value(muse_interval[0]) + | ||
107 | (bit_for_value(muse_interval[1]) << 1) + | ||
108 | (bit_for_value(muse_interval[2]) << 2) + | ||
109 | (bit_for_value(muse_interval[3]) << 3); | ||
110 | |||
111 | } | ||
diff --git a/quantum/audio/muse.h b/quantum/audio/muse.h new file mode 100644 index 000000000..6f382a7fe --- /dev/null +++ b/quantum/audio/muse.h | |||
@@ -0,0 +1,9 @@ | |||
1 | #ifndef MUSE_H | ||
2 | #define MUSE_H | ||
3 | |||
4 | #include "quantum.h" | ||
5 | #include "process_audio.h" | ||
6 | |||
7 | uint8_t muse_clock_pulse(void); | ||
8 | |||
9 | #endif | ||
diff --git a/quantum/config_common.h b/quantum/config_common.h index 4c6a702af..f6f51b367 100644 --- a/quantum/config_common.h +++ b/quantum/config_common.h | |||
@@ -22,56 +22,58 @@ | |||
22 | #define ROW2COL 1 | 22 | #define ROW2COL 1 |
23 | #define CUSTOM_MATRIX 2 /* Disables built-in matrix scanning code */ | 23 | #define CUSTOM_MATRIX 2 /* Disables built-in matrix scanning code */ |
24 | 24 | ||
25 | /* I/O pins */ | 25 | #ifdef __AVR__ |
26 | #ifndef F0 | 26 | /* I/O pins */ |
27 | #define B0 0x30 | 27 | #ifndef F0 |
28 | #define B1 0x31 | 28 | #define B0 0x30 |
29 | #define B2 0x32 | 29 | #define B1 0x31 |
30 | #define B3 0x33 | 30 | #define B2 0x32 |
31 | #define B4 0x34 | 31 | #define B3 0x33 |
32 | #define B5 0x35 | 32 | #define B4 0x34 |
33 | #define B6 0x36 | 33 | #define B5 0x35 |
34 | #define B7 0x37 | 34 | #define B6 0x36 |
35 | #define C0 0x60 | 35 | #define B7 0x37 |
36 | #define C1 0x61 | 36 | #define C0 0x60 |
37 | #define C2 0x62 | 37 | #define C1 0x61 |
38 | #define C3 0x63 | 38 | #define C2 0x62 |
39 | #define C4 0x64 | 39 | #define C3 0x63 |
40 | #define C5 0x65 | 40 | #define C4 0x64 |
41 | #define C6 0x66 | 41 | #define C5 0x65 |
42 | #define C7 0x67 | 42 | #define C6 0x66 |
43 | #define D0 0x90 | 43 | #define C7 0x67 |
44 | #define D1 0x91 | 44 | #define D0 0x90 |
45 | #define D2 0x92 | 45 | #define D1 0x91 |
46 | #define D3 0x93 | 46 | #define D2 0x92 |
47 | #define D4 0x94 | 47 | #define D3 0x93 |
48 | #define D5 0x95 | 48 | #define D4 0x94 |
49 | #define D6 0x96 | 49 | #define D5 0x95 |
50 | #define D7 0x97 | 50 | #define D6 0x96 |
51 | #define E0 0xC0 | 51 | #define D7 0x97 |
52 | #define E1 0xC1 | 52 | #define E0 0xC0 |
53 | #define E2 0xC2 | 53 | #define E1 0xC1 |
54 | #define E3 0xC3 | 54 | #define E2 0xC2 |
55 | #define E4 0xC4 | 55 | #define E3 0xC3 |
56 | #define E5 0xC5 | 56 | #define E4 0xC4 |
57 | #define E6 0xC6 | 57 | #define E5 0xC5 |
58 | #define E7 0xC7 | 58 | #define E6 0xC6 |
59 | #define F0 0xF0 | 59 | #define E7 0xC7 |
60 | #define F1 0xF1 | 60 | #define F0 0xF0 |
61 | #define F2 0xF2 | 61 | #define F1 0xF1 |
62 | #define F3 0xF3 | 62 | #define F2 0xF2 |
63 | #define F4 0xF4 | 63 | #define F3 0xF3 |
64 | #define F5 0xF5 | 64 | #define F4 0xF4 |
65 | #define F6 0xF6 | 65 | #define F5 0xF5 |
66 | #define F7 0xF7 | 66 | #define F6 0xF6 |
67 | #define A0 0x00 | 67 | #define F7 0xF7 |
68 | #define A1 0x01 | 68 | #define A0 0x00 |
69 | #define A2 0x02 | 69 | #define A1 0x01 |
70 | #define A3 0x03 | 70 | #define A2 0x02 |
71 | #define A4 0x04 | 71 | #define A3 0x03 |
72 | #define A5 0x05 | 72 | #define A4 0x04 |
73 | #define A6 0x06 | 73 | #define A5 0x05 |
74 | #define A7 0x07 | 74 | #define A6 0x06 |
75 | #define A7 0x07 | ||
76 | #endif | ||
75 | #endif | 77 | #endif |
76 | 78 | ||
77 | /* USART configuration */ | 79 | /* USART configuration */ |
diff --git a/quantum/process_keycode/process_audio.c b/quantum/process_keycode/process_audio.c index e9b20512e..0a25aa535 100644 --- a/quantum/process_keycode/process_audio.c +++ b/quantum/process_keycode/process_audio.c | |||
@@ -10,9 +10,7 @@ float voice_change_song[][2] = VOICE_CHANGE_SONG; | |||
10 | #define PITCH_STANDARD_A 440.0f | 10 | #define PITCH_STANDARD_A 440.0f |
11 | #endif | 11 | #endif |
12 | 12 | ||
13 | 13 | float compute_freq_for_midi_note(uint8_t note) | |
14 | |||
15 | static float compute_freq_for_midi_note(uint8_t note) | ||
16 | { | 14 | { |
17 | // https://en.wikipedia.org/wiki/MIDI_tuning_standard | 15 | // https://en.wikipedia.org/wiki/MIDI_tuning_standard |
18 | return pow(2.0, (note - 69) / 12.0) * PITCH_STANDARD_A; | 16 | return pow(2.0, (note - 69) / 12.0) * PITCH_STANDARD_A; |
diff --git a/quantum/process_keycode/process_audio.h b/quantum/process_keycode/process_audio.h index 7ac15b733..3a84c3d86 100644 --- a/quantum/process_keycode/process_audio.h +++ b/quantum/process_keycode/process_audio.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef PROCESS_AUDIO_H | 1 | #ifndef PROCESS_AUDIO_H |
2 | #define PROCESS_AUDIO_H | 2 | #define PROCESS_AUDIO_H |
3 | 3 | ||
4 | float compute_freq_for_midi_note(uint8_t note); | ||
5 | |||
4 | bool process_audio(uint16_t keycode, keyrecord_t *record); | 6 | bool process_audio(uint16_t keycode, keyrecord_t *record); |
5 | void process_audio_noteon(uint8_t note); | 7 | void process_audio_noteon(uint8_t note); |
6 | void process_audio_noteoff(uint8_t note); | 8 | void process_audio_noteoff(uint8_t note); |
@@ -8,4 +10,4 @@ void process_audio_all_notes_off(void); | |||
8 | 10 | ||
9 | void audio_on_user(void); | 11 | void audio_on_user(void); |
10 | 12 | ||
11 | #endif \ No newline at end of file | 13 | #endif |
diff --git a/quantum/process_keycode/process_music.c b/quantum/process_keycode/process_music.c index 742bb08b1..697aa237f 100644 --- a/quantum/process_keycode/process_music.c +++ b/quantum/process_keycode/process_music.c | |||
@@ -197,17 +197,26 @@ bool process_music(uint16_t keycode, keyrecord_t *record) { | |||
197 | } | 197 | } |
198 | } | 198 | } |
199 | 199 | ||
200 | uint8_t note; | 200 | uint8_t note = 36; |
201 | if (music_mode == MUSIC_MODE_CHROMATIC) | 201 | #ifdef MUSIC_MAP |
202 | note = (music_starting_note + record->event.key.col + music_offset - 3)+12*(MATRIX_ROWS - record->event.key.row); | 202 | if (music_mode == MUSIC_MODE_CHROMATIC) { |
203 | else if (music_mode == MUSIC_MODE_GUITAR) | 203 | note = music_starting_note + music_offset + 36 + music_map[record->event.key.row][record->event.key.col]; |
204 | note = (music_starting_note + record->event.key.col + music_offset + 32)+5*(MATRIX_ROWS - record->event.key.row); | 204 | } else { |
205 | else if (music_mode == MUSIC_MODE_VIOLIN) | 205 | uint8_t position = music_map[record->event.key.row][record->event.key.col]; |
206 | note = (music_starting_note + record->event.key.col + music_offset + 32)+7*(MATRIX_ROWS - record->event.key.row); | 206 | note = music_starting_note + music_offset + 36 + SCALE[position % 12] + (position / 12)*12; |
207 | else if (music_mode == MUSIC_MODE_MAJOR) | 207 | } |
208 | note = (music_starting_note + SCALE[record->event.key.col + music_offset] - 3)+12*(MATRIX_ROWS - record->event.key.row); | 208 | #else |
209 | else | 209 | if (music_mode == MUSIC_MODE_CHROMATIC) |
210 | note = music_starting_note; | 210 | note = (music_starting_note + record->event.key.col + music_offset - 3)+12*(MATRIX_ROWS - record->event.key.row); |
211 | else if (music_mode == MUSIC_MODE_GUITAR) | ||
212 | note = (music_starting_note + record->event.key.col + music_offset + 32)+5*(MATRIX_ROWS - record->event.key.row); | ||
213 | else if (music_mode == MUSIC_MODE_VIOLIN) | ||
214 | note = (music_starting_note + record->event.key.col + music_offset + 32)+7*(MATRIX_ROWS - record->event.key.row); | ||
215 | else if (music_mode == MUSIC_MODE_MAJOR) | ||
216 | note = (music_starting_note + SCALE[record->event.key.col + music_offset] - 3)+12*(MATRIX_ROWS - record->event.key.row); | ||
217 | else | ||
218 | note = music_starting_note; | ||
219 | #endif | ||
211 | 220 | ||
212 | if (record->event.pressed) { | 221 | if (record->event.pressed) { |
213 | music_noteon(note); | 222 | music_noteon(note); |
diff --git a/quantum/process_keycode/process_music.h b/quantum/process_keycode/process_music.h index 8ccb7a3a5..f6753d4f2 100644 --- a/quantum/process_keycode/process_music.h +++ b/quantum/process_keycode/process_music.h | |||
@@ -29,6 +29,11 @@ enum music_modes { | |||
29 | NUMBER_OF_MODES | 29 | NUMBER_OF_MODES |
30 | }; | 30 | }; |
31 | 31 | ||
32 | |||
33 | #ifdef MUSIC_MAP | ||
34 | extern const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS]; | ||
35 | #endif | ||
36 | |||
32 | bool process_music(uint16_t keycode, keyrecord_t *record); | 37 | bool process_music(uint16_t keycode, keyrecord_t *record); |
33 | 38 | ||
34 | bool is_music_on(void); | 39 | bool is_music_on(void); |
diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 4e2671d24..2490a1d9f 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c | |||
@@ -14,9 +14,11 @@ | |||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | #include <math.h> | 16 | #include <math.h> |
17 | #include <avr/eeprom.h> | 17 | #ifdef __AVR__ |
18 | #include <avr/interrupt.h> | 18 | #include <avr/eeprom.h> |
19 | #include <util/delay.h> | 19 | #include <avr/interrupt.h> |
20 | #endif | ||
21 | #include "wait.h" | ||
20 | #include "progmem.h" | 22 | #include "progmem.h" |
21 | #include "timer.h" | 23 | #include "timer.h" |
22 | #include "rgblight.h" | 24 | #include "rgblight.h" |
@@ -113,10 +115,16 @@ void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1) { | |||
113 | 115 | ||
114 | 116 | ||
115 | uint32_t eeconfig_read_rgblight(void) { | 117 | uint32_t eeconfig_read_rgblight(void) { |
116 | return eeprom_read_dword(EECONFIG_RGBLIGHT); | 118 | #ifdef __AVR__ |
119 | return eeprom_read_dword(EECONFIG_RGBLIGHT); | ||
120 | #else | ||
121 | return 0; | ||
122 | #endif | ||
117 | } | 123 | } |
118 | void eeconfig_update_rgblight(uint32_t val) { | 124 | void eeconfig_update_rgblight(uint32_t val) { |
119 | eeprom_update_dword(EECONFIG_RGBLIGHT, val); | 125 | #ifdef __AVR__ |
126 | eeprom_update_dword(EECONFIG_RGBLIGHT, val); | ||
127 | #endif | ||
120 | } | 128 | } |
121 | void eeconfig_update_rgblight_default(void) { | 129 | void eeconfig_update_rgblight_default(void) { |
122 | dprintf("eeconfig_update_rgblight_default\n"); | 130 | dprintf("eeconfig_update_rgblight_default\n"); |
@@ -311,7 +319,7 @@ void rgblight_disable(void) { | |||
311 | #ifdef RGBLIGHT_ANIMATIONS | 319 | #ifdef RGBLIGHT_ANIMATIONS |
312 | rgblight_timer_disable(); | 320 | rgblight_timer_disable(); |
313 | #endif | 321 | #endif |
314 | _delay_ms(50); | 322 | wait_ms(50); |
315 | rgblight_set(); | 323 | rgblight_set(); |
316 | } | 324 | } |
317 | 325 | ||
diff --git a/quantum/rgblight_types.h b/quantum/rgblight_types.h index b1aa7026c..49ef5c8ea 100644 --- a/quantum/rgblight_types.h +++ b/quantum/rgblight_types.h | |||
@@ -23,7 +23,9 @@ | |||
23 | #ifndef RGBLIGHT_TYPES | 23 | #ifndef RGBLIGHT_TYPES |
24 | #define RGBLIGHT_TYPES | 24 | #define RGBLIGHT_TYPES |
25 | 25 | ||
26 | #include <avr/io.h> | 26 | #ifdef __AVR__ |
27 | #include <avr/io.h> | ||
28 | #endif | ||
27 | 29 | ||
28 | #ifdef RGBW | 30 | #ifdef RGBW |
29 | #define LED_TYPE struct cRGBW | 31 | #define LED_TYPE struct cRGBW |
diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index e53204905..25c49204b 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk | |||
@@ -125,7 +125,7 @@ CHIBISRC := $(patsubst $(TOP_DIR)/%,%,$(CHIBISRC)) | |||
125 | EXTRAINCDIRS += $(CHIBIOS)/os/license \ | 125 | EXTRAINCDIRS += $(CHIBIOS)/os/license \ |
126 | $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ | 126 | $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ |
127 | $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ | 127 | $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ |
128 | $(STREAMSINC) $(CHIBIOS)/os/various | 128 | $(STREAMSINC) $(CHIBIOS)/os/various $(COMMON_VPATH) |
129 | 129 | ||
130 | # | 130 | # |
131 | # Project, sources and paths | 131 | # Project, sources and paths |
@@ -145,6 +145,8 @@ HEX = $(OBJCOPY) -O $(FORMAT) | |||
145 | EEP = | 145 | EEP = |
146 | BIN = $(OBJCOPY) -O binary | 146 | BIN = $(OBJCOPY) -O binary |
147 | 147 | ||
148 | COMMON_VPATH += $(DRIVER_PATH)/arm | ||
149 | |||
148 | THUMBFLAGS = -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -mthumb -DTHUMB | 150 | THUMBFLAGS = -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -mthumb -DTHUMB |
149 | 151 | ||
150 | COMPILEFLAGS += -fomit-frame-pointer | 152 | COMPILEFLAGS += -fomit-frame-pointer |
diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index cbe257194..e79ff15e8 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c | |||
@@ -717,12 +717,14 @@ void send_mouse(report_mouse_t *report) { | |||
717 | } | 717 | } |
718 | osalSysUnlock(); | 718 | osalSysUnlock(); |
719 | 719 | ||
720 | /* TODO: LUFA manually waits for the endpoint to become ready | ||
721 | * for about 10ms for mouse, kbd, system; 1ms for nkro | ||
722 | * is this really needed? | ||
723 | */ | ||
724 | |||
725 | osalSysLock(); | 720 | osalSysLock(); |
721 | if(usbGetTransmitStatusI(&USB_DRIVER, MOUSE_IN_EPNUM)) { | ||
722 | /* Need to either suspend, or loop and call unlock/lock during | ||
723 | * every iteration - otherwise the system will remain locked, | ||
724 | * no interrupts served, so USB not going through as well. | ||
725 | * Note: for suspend, need USB_USE_WAIT == TRUE in halconf.h */ | ||
726 | osalThreadSuspendS(&(&USB_DRIVER)->epc[MOUSE_IN_EPNUM]->in_state->thread); | ||
727 | } | ||
726 | usbStartTransmitI(&USB_DRIVER, MOUSE_IN_EPNUM, (uint8_t *)report, sizeof(report_mouse_t)); | 728 | usbStartTransmitI(&USB_DRIVER, MOUSE_IN_EPNUM, (uint8_t *)report, sizeof(report_mouse_t)); |
727 | osalSysUnlock(); | 729 | osalSysUnlock(); |
728 | } | 730 | } |