diff options
| author | Jack Humbert <jack.humb@gmail.com> | 2017-11-14 16:11:29 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-14 16:11:29 -0500 |
| commit | ec3e065f0d2c65175384699cb11fa388250fa914 (patch) | |
| tree | e66837d6af1a30b739303bfa06043edf12f9fcc1 | |
| parent | 3c15c48e6a5c584d225d369ea458f9a3f9cd3d57 (diff) | |
| download | qmk_firmware-ec3e065f0d2c65175384699cb11fa388250fa914.tar.gz qmk_firmware-ec3e065f0d2c65175384699cb11fa388250fa914.zip | |
QMK DFU bootloader generation (#2009)
* adds :bootloader target
* update planck and preonic revisions
* remove references to .h files for planck
* update preonic keymap
* only add keyboard.h files that exist
* add production target
* hook things up with the new lufa variables
* update rules for planck/preonic
* back backlight key turn of status led when pressed
* add manufacturer/product strings to bootloader
27 files changed, 171 insertions, 45 deletions
diff --git a/build_keyboard.mk b/build_keyboard.mk index 2c86fe55e..df025714d 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk | |||
| @@ -94,6 +94,23 @@ endif | |||
| 94 | 94 | ||
| 95 | OPT_DEFS += -DKEYBOARD_$(KEYBOARD_FILESAFE) | 95 | OPT_DEFS += -DKEYBOARD_$(KEYBOARD_FILESAFE) |
| 96 | 96 | ||
| 97 | |||
| 98 | ifneq ("$(wildcard $(KEYBOARD_PATH_1)/$(KEYBOARD_FOLDER_1).h)","") | ||
| 99 | QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_1).h | ||
| 100 | endif | ||
| 101 | ifneq ("$(wildcard $(KEYBOARD_PATH_2)/$(KEYBOARD_FOLDER_2).h)","") | ||
| 102 | QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_2).h | ||
| 103 | endif | ||
| 104 | ifneq ("$(wildcard $(KEYBOARD_PATH_3)/$(KEYBOARD_FOLDER_3).h)","") | ||
| 105 | QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_3).h | ||
| 106 | endif | ||
| 107 | ifneq ("$(wildcard $(KEYBOARD_PATH_4)/$(KEYBOARD_FOLDER_4).h)","") | ||
| 108 | QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_4).h | ||
| 109 | endif | ||
| 110 | ifneq ("$(wildcard $(KEYBOARD_PATH_5)/$(KEYBOARD_FOLDER_5).h)","") | ||
| 111 | QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_5).h | ||
| 112 | endif | ||
| 113 | |||
| 97 | # We can assume a ChibiOS target When MCU_FAMILY is defined , since it's not used for LUFA | 114 | # We can assume a ChibiOS target When MCU_FAMILY is defined , since it's not used for LUFA |
| 98 | ifdef MCU_FAMILY | 115 | ifdef MCU_FAMILY |
| 99 | PLATFORM=CHIBIOS | 116 | PLATFORM=CHIBIOS |
| @@ -233,10 +250,12 @@ ifeq ($(strip $(VISUALIZER_ENABLE)), yes) | |||
| 233 | include $(VISUALIZER_PATH)/visualizer.mk | 250 | include $(VISUALIZER_PATH)/visualizer.mk |
| 234 | endif | 251 | endif |
| 235 | 252 | ||
| 253 | ALL_CONFIGS := $(PROJECT_CONFIG) $(CONFIG_H) | ||
| 254 | |||
| 236 | OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT) | 255 | OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT) |
| 237 | $(KEYMAP_OUTPUT)_SRC := $(SRC) | 256 | $(KEYMAP_OUTPUT)_SRC := $(SRC) |
| 238 | $(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) $(GFXDEFS) \ | 257 | $(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) $(GFXDEFS) \ |
| 239 | -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYBOARD_H=\"$(KEYBOARD_FOLDER_1).h\" -DQMK_KEYBOARD_CONFIG_H=\"$(KEYBOARD_PATH_1)/config.h\" \ | 258 | -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYBOARD_H=\"$(QMK_KEYBOARD_H)\" -DQMK_KEYBOARD_CONFIG_H=\"$(KEYBOARD_PATH_1)/config.h\" \ |
| 240 | -DQMK_KEYMAP=\"$(KEYMAP)\" -DQMK_KEYMAP_H=\"$(KEYMAP).h\" -DQMK_KEYMAP_CONFIG_H=\"$(KEYMAP_PATH)/config.h\" \ | 259 | -DQMK_KEYMAP=\"$(KEYMAP)\" -DQMK_KEYMAP_H=\"$(KEYMAP).h\" -DQMK_KEYMAP_CONFIG_H=\"$(KEYMAP_PATH)/config.h\" \ |
| 241 | -DQMK_SUBPROJECT -DQMK_SUBPROJECT_H -DQMK_SUBPROJECT_CONFIG_H | 260 | -DQMK_SUBPROJECT -DQMK_SUBPROJECT_H -DQMK_SUBPROJECT_CONFIG_H |
| 242 | $(KEYMAP_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS) | 261 | $(KEYMAP_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS) |
diff --git a/keyboards/planck/config.h b/keyboards/planck/config.h index bc7ec031e..452a99d74 100644 --- a/keyboards/planck/config.h +++ b/keyboards/planck/config.h | |||
| @@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 24 | #define VENDOR_ID 0xFEED | 24 | #define VENDOR_ID 0xFEED |
| 25 | #define PRODUCT_ID 0x6060 | 25 | #define PRODUCT_ID 0x6060 |
| 26 | #define MANUFACTURER OLKB | 26 | #define MANUFACTURER OLKB |
| 27 | #define PRODUCT The Planck Keyboard | 27 | #define PRODUCT Planck |
| 28 | #define DESCRIPTION A compact ortholinear keyboard | 28 | #define DESCRIPTION A compact ortholinear keyboard |
| 29 | 29 | ||
| 30 | /* key matrix size */ | 30 | /* key matrix size */ |
| @@ -36,6 +36,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 36 | #define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } | 36 | #define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } |
| 37 | #define UNUSED_PINS | 37 | #define UNUSED_PINS |
| 38 | 38 | ||
| 39 | #define QMK_ESC_OUTPUT F1 | ||
| 40 | #define QMK_ESC_INPUT D5 | ||
| 41 | #define QMK_LED E6 | ||
| 42 | #define QMK_SPEAKER C6 | ||
| 43 | |||
| 39 | #define AUDIO_VOICES | 44 | #define AUDIO_VOICES |
| 40 | #define C6_AUDIO | 45 | #define C6_AUDIO |
| 41 | 46 | ||
diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c index 48b02de38..87789e1d9 100644 --- a/keyboards/planck/keymaps/default/keymap.c +++ b/keyboards/planck/keymaps/default/keymap.c | |||
| @@ -224,8 +224,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 224 | #ifdef BACKLIGHT_ENABLE | 224 | #ifdef BACKLIGHT_ENABLE |
| 225 | backlight_step(); | 225 | backlight_step(); |
| 226 | #endif | 226 | #endif |
| 227 | PORTE &= ~(1<<6); | ||
| 227 | } else { | 228 | } else { |
| 228 | unregister_code(KC_RSFT); | 229 | unregister_code(KC_RSFT); |
| 230 | PORTE |= (1<<6); | ||
| 229 | } | 231 | } |
| 230 | return false; | 232 | return false; |
| 231 | break; | 233 | break; |
diff --git a/keyboards/planck/planck.h b/keyboards/planck/planck.h index 7638b8cc9..6bc6a0320 100644 --- a/keyboards/planck/planck.h +++ b/keyboards/planck/planck.h | |||
| @@ -32,11 +32,4 @@ | |||
| 32 | #define KEYMAP LAYOUT_planck_grid | 32 | #define KEYMAP LAYOUT_planck_grid |
| 33 | #define LAYOUT_ortho_4x12 LAYOUT_planck_grid | 33 | #define LAYOUT_ortho_4x12 LAYOUT_planck_grid |
| 34 | 34 | ||
| 35 | #ifdef KEYBOARD_planck_rev3 | ||
| 36 | #include "rev3.h" | ||
| 37 | #endif | ||
| 38 | #ifdef KEYBOARD_planck_rev4 | ||
| 39 | #include "rev4.h" | ||
| 40 | #endif | ||
| 41 | |||
| 42 | #endif | 35 | #endif |
diff --git a/keyboards/planck/rev3/rev3.c b/keyboards/planck/rev3/rev3.c deleted file mode 100644 index 9ccd1d880..000000000 --- a/keyboards/planck/rev3/rev3.c +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | #include "rev3.h" \ No newline at end of file | ||
diff --git a/keyboards/planck/rev3/rev3.h b/keyboards/planck/rev3/rev3.h deleted file mode 100644 index 50a09741d..000000000 --- a/keyboards/planck/rev3/rev3.h +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | #ifndef REV3_H | ||
| 2 | #define REV3_H | ||
| 3 | |||
| 4 | #include "planck.h" | ||
| 5 | |||
| 6 | #endif \ No newline at end of file | ||
diff --git a/keyboards/planck/rev4/rev4.c b/keyboards/planck/rev4/rev4.c deleted file mode 100644 index 98a75d2ed..000000000 --- a/keyboards/planck/rev4/rev4.c +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | #include "rev4.h" \ No newline at end of file | ||
diff --git a/keyboards/planck/rev4/rev4.h b/keyboards/planck/rev4/rev4.h deleted file mode 100644 index 74ec05460..000000000 --- a/keyboards/planck/rev4/rev4.h +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | #ifndef REV4_H | ||
| 2 | #define REV4_H | ||
| 3 | |||
| 4 | #include "planck.h" | ||
| 5 | |||
| 6 | #endif \ No newline at end of file | ||
diff --git a/keyboards/planck/rev5/config.h b/keyboards/planck/rev5/config.h new file mode 100644 index 000000000..696eda73b --- /dev/null +++ b/keyboards/planck/rev5/config.h | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | #ifndef REV5_CONFIG_H | ||
| 2 | #define REV5_CONFIG_H | ||
| 3 | |||
| 4 | #include "config_common.h" | ||
| 5 | |||
| 6 | #define DEVICE_VER 0x0005 | ||
| 7 | |||
| 8 | #endif \ No newline at end of file | ||
diff --git a/keyboards/planck/rev5/info.json b/keyboards/planck/rev5/info.json new file mode 100644 index 000000000..3d984961a --- /dev/null +++ b/keyboards/planck/rev5/info.json | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | { | ||
| 2 | "identifier": "FEED:6060:0005" | ||
| 3 | } \ No newline at end of file | ||
diff --git a/keyboards/planck/rev5/rules.mk b/keyboards/planck/rev5/rules.mk new file mode 100644 index 000000000..3b22e0a01 --- /dev/null +++ b/keyboards/planck/rev5/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| AUDIO_ENABLE = yes # Audio output on port C6 \ No newline at end of file | |||
diff --git a/keyboards/planck/rules.mk b/keyboards/planck/rules.mk index 27753cfda..df575cd6b 100644 --- a/keyboards/planck/rules.mk +++ b/keyboards/planck/rules.mk | |||
| @@ -69,4 +69,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | |||
| 69 | 69 | ||
| 70 | LAYOUTS = ortho_4x12 planck_mit planck_grid | 70 | LAYOUTS = ortho_4x12 planck_mit planck_grid |
| 71 | 71 | ||
| 72 | DEFAULT_FOLDER = planck/rev4 | 72 | DEFAULT_FOLDER = planck/rev5 |
diff --git a/keyboards/preonic/config.h b/keyboards/preonic/config.h index 74db9202d..172fd645c 100644 --- a/keyboards/preonic/config.h +++ b/keyboards/preonic/config.h | |||
| @@ -23,9 +23,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 23 | /* USB Device descriptor parameter */ | 23 | /* USB Device descriptor parameter */ |
| 24 | #define VENDOR_ID 0xFEED | 24 | #define VENDOR_ID 0xFEED |
| 25 | #define PRODUCT_ID 0x6061 | 25 | #define PRODUCT_ID 0x6061 |
| 26 | #define DEVICE_VER 0x0001 | ||
| 27 | #define MANUFACTURER OLKB | 26 | #define MANUFACTURER OLKB |
| 28 | #define PRODUCT The Preonic Keyboard | 27 | #define PRODUCT Preonic |
| 29 | #define DESCRIPTION A compact ortholinear keyboard | 28 | #define DESCRIPTION A compact ortholinear keyboard |
| 30 | 29 | ||
| 31 | /* key matrix size */ | 30 | /* key matrix size */ |
| @@ -37,6 +36,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 37 | #define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } | 36 | #define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } |
| 38 | #define UNUSED_PINS | 37 | #define UNUSED_PINS |
| 39 | 38 | ||
| 39 | #define QMK_ESC_OUTPUT F1 | ||
| 40 | #define QMK_ESC_INPUT B5 | ||
| 41 | #define QMK_LED E6 | ||
| 42 | #define QMK_SPEAKER C6 | ||
| 43 | |||
| 40 | #define AUDIO_VOICES | 44 | #define AUDIO_VOICES |
| 41 | #define C6_AUDIO | 45 | #define C6_AUDIO |
| 42 | 46 | ||
diff --git a/keyboards/preonic/keymaps/default/keymap.c b/keyboards/preonic/keymaps/default/keymap.c index 01f40542c..c9d04958a 100644 --- a/keyboards/preonic/keymaps/default/keymap.c +++ b/keyboards/preonic/keymaps/default/keymap.c | |||
| @@ -117,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 117 | {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, | 117 | {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, |
| 118 | {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, | 118 | {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, |
| 119 | {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, | 119 | {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, |
| 120 | {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______}, | 120 | {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______}, |
| 121 | {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} | 121 | {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} |
| 122 | }, | 122 | }, |
| 123 | 123 | ||
| @@ -138,7 +138,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 138 | {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, | 138 | {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, |
| 139 | {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, | 139 | {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, |
| 140 | {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, | 140 | {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, |
| 141 | {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______}, | 141 | {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______}, |
| 142 | {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} | 142 | {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} |
| 143 | }, | 143 | }, |
| 144 | 144 | ||
| @@ -157,7 +157,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 157 | */ | 157 | */ |
| 158 | [_ADJUST] = { | 158 | [_ADJUST] = { |
| 159 | {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, | 159 | {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, |
| 160 | {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, | 160 | {_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL}, |
| 161 | {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, | 161 | {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, |
| 162 | {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, | 162 | {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, |
| 163 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} | 163 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} |
| @@ -212,8 +212,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 212 | #ifdef BACKLIGHT_ENABLE | 212 | #ifdef BACKLIGHT_ENABLE |
| 213 | backlight_step(); | 213 | backlight_step(); |
| 214 | #endif | 214 | #endif |
| 215 | PORTE &= ~(1<<6); | ||
| 215 | } else { | 216 | } else { |
| 216 | unregister_code(KC_RSFT); | 217 | unregister_code(KC_RSFT); |
| 218 | PORTE |= (1<<6); | ||
| 217 | } | 219 | } |
| 218 | return false; | 220 | return false; |
| 219 | break; | 221 | break; |
diff --git a/keyboards/preonic/rev1/config.h b/keyboards/preonic/rev1/config.h new file mode 100644 index 000000000..56dfedd45 --- /dev/null +++ b/keyboards/preonic/rev1/config.h | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2017 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 REV1_CONFIG_H | ||
| 19 | #define REV1_CONFIG_H | ||
| 20 | |||
| 21 | #include "config_common.h" | ||
| 22 | |||
| 23 | #define DEVICE_VER 0x0001 | ||
| 24 | |||
| 25 | #endif \ No newline at end of file | ||
diff --git a/keyboards/preonic/rev1/info.json b/keyboards/preonic/rev1/info.json new file mode 100644 index 000000000..43a7b495c --- /dev/null +++ b/keyboards/preonic/rev1/info.json | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | { | ||
| 2 | "identifier": "FEED:6061:0001" | ||
| 3 | } \ No newline at end of file | ||
diff --git a/keyboards/preonic/rev1/rules.mk b/keyboards/preonic/rev1/rules.mk new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/keyboards/preonic/rev1/rules.mk | |||
diff --git a/keyboards/preonic/rev2/config.h b/keyboards/preonic/rev2/config.h new file mode 100644 index 000000000..20f11066b --- /dev/null +++ b/keyboards/preonic/rev2/config.h | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2017 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 REV2_CONFIG_H | ||
| 19 | #define REV2_CONFIG_H | ||
| 20 | |||
| 21 | #include "config_common.h" | ||
| 22 | |||
| 23 | #define DEVICE_VER 0x0002 | ||
| 24 | |||
| 25 | #endif \ No newline at end of file | ||
diff --git a/keyboards/preonic/rev2/info.json b/keyboards/preonic/rev2/info.json new file mode 100644 index 000000000..c8b9b16a7 --- /dev/null +++ b/keyboards/preonic/rev2/info.json | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | { | ||
| 2 | "identifier": "FEED:6061:0002" | ||
| 3 | } \ No newline at end of file | ||
diff --git a/keyboards/preonic/rev2/rules.mk b/keyboards/preonic/rev2/rules.mk new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/keyboards/preonic/rev2/rules.mk | |||
diff --git a/keyboards/preonic/rules.mk b/keyboards/preonic/rules.mk index 51104e68b..acef4d971 100644 --- a/keyboards/preonic/rules.mk +++ b/keyboards/preonic/rules.mk | |||
| @@ -55,7 +55,7 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 | |||
| 55 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | 55 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) |
| 56 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | 56 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) |
| 57 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 57 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
| 58 | CONSOLE_ENABLE = no # Console for debug(+400) | 58 | CONSOLE_ENABLE = yes # Console for debug(+400) |
| 59 | COMMAND_ENABLE = no # Commands for debug and configuration | 59 | COMMAND_ENABLE = no # Commands for debug and configuration |
| 60 | NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | 60 | NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work |
| 61 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | 61 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality |
| @@ -69,4 +69,6 @@ API_SYSEX_ENABLE = no | |||
| 69 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 69 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
| 70 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 70 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
| 71 | 71 | ||
| 72 | LAYOUTS = ortho_5x12 \ No newline at end of file | 72 | LAYOUTS = ortho_5x12 |
| 73 | |||
| 74 | DEFAULT_FOLDER = preonic/rev2 \ No newline at end of file | ||
diff --git a/lib/lufa/.gitignore b/lib/lufa/.gitignore index 9f9d39491..1cd1dccf8 100644 --- a/lib/lufa/.gitignore +++ b/lib/lufa/.gitignore | |||
| @@ -13,3 +13,4 @@ Documentation/ | |||
| 13 | LUFA/StudioIntegration/ProjectGenerator/* | 13 | LUFA/StudioIntegration/ProjectGenerator/* |
| 14 | LUFA/StudioIntegration/DocBook/* | 14 | LUFA/StudioIntegration/DocBook/* |
| 15 | !LUFA/StudioIntegration/Docbook/mshelp/* | 15 | !LUFA/StudioIntegration/Docbook/mshelp/* |
| 16 | Keyboard.h \ No newline at end of file | ||
diff --git a/lib/lufa/Bootloaders/DFU/BootloaderDFU.c b/lib/lufa/Bootloaders/DFU/BootloaderDFU.c index 928cf6fe3..a2307219e 100644 --- a/lib/lufa/Bootloaders/DFU/BootloaderDFU.c +++ b/lib/lufa/Bootloaders/DFU/BootloaderDFU.c | |||
| @@ -196,7 +196,7 @@ int main(void) | |||
| 196 | while (RunBootloader || WaitForExit) { | 196 | while (RunBootloader || WaitForExit) { |
| 197 | USB_USBTask(); | 197 | USB_USBTask(); |
| 198 | #if (BOARD == BOARD_QMK) | 198 | #if (BOARD == BOARD_QMK) |
| 199 | bool pressed = (PIN(QMK_ESC_ROW) & NUM(QMK_ESC_ROW)); | 199 | bool pressed = (PIN(QMK_ESC_INPUT) & NUM(QMK_ESC_INPUT)); |
| 200 | if ((DFU_State == dfuIDLE) && (keypress > 5000) && pressed) { | 200 | if ((DFU_State == dfuIDLE) && (keypress > 5000) && pressed) { |
| 201 | break; | 201 | break; |
| 202 | } | 202 | } |
| @@ -231,12 +231,12 @@ static void SetupHardware(void) | |||
| 231 | MCUCR = (1 << IVSEL); | 231 | MCUCR = (1 << IVSEL); |
| 232 | 232 | ||
| 233 | #if (BOARD == BOARD_QMK) | 233 | #if (BOARD == BOARD_QMK) |
| 234 | // column setup | 234 | // output setup |
| 235 | DDR(QMK_ESC_COL) |= NUM(QMK_ESC_COL); | 235 | DDR(QMK_ESC_OUTPUT) |= NUM(QMK_ESC_OUTPUT); |
| 236 | PORT(QMK_ESC_COL) |= NUM(QMK_ESC_COL); | 236 | PORT(QMK_ESC_OUTPUT) |= NUM(QMK_ESC_OUTPUT); |
| 237 | 237 | ||
| 238 | // row setup | 238 | // input setup |
| 239 | DDR(QMK_ESC_ROW) |= NUM(QMK_ESC_ROW); | 239 | DDR(QMK_ESC_INPUT) |= NUM(QMK_ESC_INPUT); |
| 240 | #endif | 240 | #endif |
| 241 | 241 | ||
| 242 | /* Initialize the USB and other board hardware drivers */ | 242 | /* Initialize the USB and other board hardware drivers */ |
| @@ -265,7 +265,7 @@ static void ResetHardware(void) | |||
| 265 | MCUCR = 0; | 265 | MCUCR = 0; |
| 266 | 266 | ||
| 267 | #if (BOARD == BOARD_QMK) | 267 | #if (BOARD == BOARD_QMK) |
| 268 | DDR(QMK_ESC_COL) = PORT(QMK_ESC_COL) = DDR(QMK_ESC_ROW) = PORT(QMK_ESC_ROW) = 0; | 268 | DDR(QMK_ESC_OUTPUT) = PORT(QMK_ESC_OUTPUT) = DDR(QMK_ESC_INPUT) = PORT(QMK_ESC_INPUT) = 0; |
| 269 | #endif | 269 | #endif |
| 270 | } | 270 | } |
| 271 | 271 | ||
diff --git a/lib/lufa/Bootloaders/DFU/Descriptors.c b/lib/lufa/Bootloaders/DFU/Descriptors.c index 6b7b6d490..46120781b 100644 --- a/lib/lufa/Bootloaders/DFU/Descriptors.c +++ b/lib/lufa/Bootloaders/DFU/Descriptors.c | |||
| @@ -36,6 +36,14 @@ | |||
| 36 | */ | 36 | */ |
| 37 | 37 | ||
| 38 | #include "Descriptors.h" | 38 | #include "Descriptors.h" |
| 39 | #include "Keyboard.h" | ||
| 40 | |||
| 41 | #ifndef MANUFACTURER | ||
| 42 | #define MANUFACTURER QMK | ||
| 43 | #endif | ||
| 44 | #ifndef PRODUCT | ||
| 45 | #define PRODUCT Keyboard | ||
| 46 | #endif | ||
| 39 | 47 | ||
| 40 | /** Device descriptor structure. This descriptor, located in SRAM memory, describes the overall | 48 | /** Device descriptor structure. This descriptor, located in SRAM memory, describes the overall |
| 41 | * device characteristics, including the supported USB version, control endpoint size and the | 49 | * device characteristics, including the supported USB version, control endpoint size and the |
| @@ -125,13 +133,13 @@ const USB_Descriptor_String_t LanguageString = USB_STRING_DESCRIPTOR_ARRAY(LANGU | |||
| 125 | * form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device | 133 | * form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device |
| 126 | * Descriptor. | 134 | * Descriptor. |
| 127 | */ | 135 | */ |
| 128 | const USB_Descriptor_String_t ManufacturerString = USB_STRING_DESCRIPTOR(L"QMK"); | 136 | const USB_Descriptor_String_t ManufacturerString = USB_STRING_DESCRIPTOR(LSTR(MANUFACTURER)); |
| 129 | 137 | ||
| 130 | /** Product descriptor string. This is a Unicode string containing the product's details in human readable form, | 138 | /** Product descriptor string. This is a Unicode string containing the product's details in human readable form, |
| 131 | * and is read out upon request by the host when the appropriate string ID is requested, listed in the Device | 139 | * and is read out upon request by the host when the appropriate string ID is requested, listed in the Device |
| 132 | * Descriptor. | 140 | * Descriptor. |
| 133 | */ | 141 | */ |
| 134 | const USB_Descriptor_String_t ProductString = USB_STRING_DESCRIPTOR(L"KB"); | 142 | const USB_Descriptor_String_t ProductString = USB_STRING_DESCRIPTOR(LSTR(PRODUCT)); |
| 135 | 143 | ||
| 136 | /** This function is called by the library when in device mode, and must be overridden (see library "USB Descriptors" | 144 | /** This function is called by the library when in device mode, and must be overridden (see library "USB Descriptors" |
| 137 | * documentation) by the application code so that the address and size of a requested descriptor can be given | 145 | * documentation) by the application code so that the address and size of a requested descriptor can be given |
diff --git a/lib/lufa/Bootloaders/DFU/Descriptors.h b/lib/lufa/Bootloaders/DFU/Descriptors.h index 5487f88f3..7137d0f11 100644 --- a/lib/lufa/Bootloaders/DFU/Descriptors.h +++ b/lib/lufa/Bootloaders/DFU/Descriptors.h | |||
| @@ -189,6 +189,12 @@ | |||
| 189 | const uint16_t wIndex, | 189 | const uint16_t wIndex, |
| 190 | const void** const DescriptorAddress) | 190 | const void** const DescriptorAddress) |
| 191 | ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3); | 191 | ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3); |
| 192 | 192 | // convert to L string | |
| 193 | #define LSTR(s) XLSTR(s) | ||
| 194 | #define XLSTR(s) L ## #s | ||
| 195 | // convert to string | ||
| 196 | #define STR(s) XSTR(s) | ||
| 197 | #define XSTR(s) #s | ||
| 198 | |||
| 193 | #endif | 199 | #endif |
| 194 | 200 | ||
diff --git a/lib/lufa/LUFA/Drivers/Board/AVR8/QMK/LEDs.h b/lib/lufa/LUFA/Drivers/Board/AVR8/QMK/LEDs.h index 9fc696be9..be66b9ed2 100644 --- a/lib/lufa/LUFA/Drivers/Board/AVR8/QMK/LEDs.h +++ b/lib/lufa/LUFA/Drivers/Board/AVR8/QMK/LEDs.h | |||
| @@ -103,10 +103,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 103 | #define A6 0x06 | 103 | #define A6 0x06 |
| 104 | #define A7 0x07 | 104 | #define A7 0x07 |
| 105 | 105 | ||
| 106 | #define QMK_ESC_COL F1 | 106 | #include "Keyboard.h" |
| 107 | #define QMK_ESC_ROW D5 | 107 | |
| 108 | #define QMK_LED E6 | 108 | #ifndef QMK_ESC_INPUT |
| 109 | #define QMK_SPEAKER C6 | 109 | #define QMK_ESC_INPUT F1 |
| 110 | #endif | ||
| 111 | #ifndef QMK_ESC_OUTPUT | ||
| 112 | #define QMK_ESC_OUTPUT D5 | ||
| 113 | #endif | ||
| 114 | #ifndef QMK_LED | ||
| 115 | #define QMK_LED E6 | ||
| 116 | #endif | ||
| 117 | #ifndef QMK_SPEAKER | ||
| 118 | #define QMK_SPEAKER C6 | ||
| 119 | #endif | ||
| 110 | 120 | ||
| 111 | #define DDR(pin) _SFR_IO8(((pin) >> 4) + 1) | 121 | #define DDR(pin) _SFR_IO8(((pin) >> 4) + 1) |
| 112 | #define PORT(pin) _SFR_IO8(((pin) >> 4) + 2) | 122 | #define PORT(pin) _SFR_IO8(((pin) >> 4) + 2) |
diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index 80e8b2be6..94e9a7bdb 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk | |||
| @@ -244,3 +244,23 @@ extcoff: $(BUILD_DIR)/$(TARGET).elf | |||
| 244 | @$(SECHO) $(MSG_EXTENDED_COFF) $(BUILD_DIR)/$(TARGET).cof | 244 | @$(SECHO) $(MSG_EXTENDED_COFF) $(BUILD_DIR)/$(TARGET).cof |
| 245 | $(COFFCONVERT) -O coff-ext-avr $< $(BUILD_DIR)/$(TARGET).cof | 245 | $(COFFCONVERT) -O coff-ext-avr $< $(BUILD_DIR)/$(TARGET).cof |
| 246 | 246 | ||
| 247 | bootloader: | ||
| 248 | make -C lib/lufa/Bootloaders/DFU/ clean | ||
| 249 | echo "#ifndef QMK_KEYBOARD\n#define QMK_KEYBOARD\n" > lib/lufa/Bootloaders/DFU/Keyboard.h | ||
| 250 | echo `grep "MANUFACTURER" $(ALL_CONFIGS) -h | tail -1` >> lib/lufa/Bootloaders/DFU/Keyboard.h | ||
| 251 | echo `grep "PRODUCT" $(ALL_CONFIGS) -h | tail -1` Bootloader >> lib/lufa/Bootloaders/DFU/Keyboard.h | ||
| 252 | echo `grep "QMK_ESC_OUTPUT" $(ALL_CONFIGS) -h | tail -1` >> lib/lufa/Bootloaders/DFU/Keyboard.h | ||
| 253 | echo `grep "QMK_ESC_INPUT" $(ALL_CONFIGS) -h | tail -1` >> lib/lufa/Bootloaders/DFU/Keyboard.h | ||
| 254 | echo `grep "QMK_LED" $(ALL_CONFIGS) -h | tail -1` >> lib/lufa/Bootloaders/DFU/Keyboard.h | ||
| 255 | echo `grep "QMK_SPEAKER" $(ALL_CONFIGS) -h | tail -1` >> lib/lufa/Bootloaders/DFU/Keyboard.h | ||
| 256 | echo "\n#endif" >> lib/lufa/Bootloaders/DFU/Keyboard.h | ||
| 257 | make -C lib/lufa/Bootloaders/DFU/ | ||
| 258 | echo "BootloaderDFU.hex copied to $(TARGET)_bootloader.hex" | ||
| 259 | cp lib/lufa/Bootloaders/DFU/BootloaderDFU.hex $(TARGET)_bootloader.hex | ||
| 260 | |||
| 261 | production: $(BUILD_DIR)/$(TARGET).hex bootloader | ||
| 262 | @cat $(BUILD_DIR)/$(TARGET).hex | awk '/^:00000001FF/ == 0' > $(TARGET)_production.hex | ||
| 263 | @cat $(TARGET)_bootloader.hex >> $(TARGET)_production.hex | ||
| 264 | echo "File sizes:" | ||
| 265 | $(SIZE) $(TARGET).hex $(TARGET)_bootloader.hex $(TARGET)_production.hex | ||
| 266 | |||
