Compare commits

...
2 Commits
Author SHA1 Message Date
Drashna Jael're 28874a9f33 Fixed minor typo in bootloader code 2017-11-29 13:01:06 -05:00
Drashna Jael're 319ff649ab 16 byte optimization of macro ;) 2017-11-28 22:59:41 -05:00
2 changed files with 15 additions and 19 deletions

No files matched your search

+8 -10
View File
@@ -73,17 +73,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case KC_MAKE: case KC_MAKE:
if (!record->event.pressed) { if (!record->event.pressed) {
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP); SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP
#if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU)) #if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU))
SEND_STRING(":dfu"); ":dfu "
#elseif defined(BOOTLOADER_HALFKEY) #elif defined(BOOTLOADER_HALFKAY)
SEND_STRING(":teensy "); ":teensy "
#elseif defined(BOOTLOADER_CATERINA) #elif defined(BOOTLOADER_CATERINA)
SEND_STRING(":avrdude "); ":avrdude "
#else
SEND_STRING(" ");
#endif #endif
SEND_STRING(SS_TAP(X_ENTER)); SS_TAP(X_ENTER));
} }
return false; return false;
break; break;
@@ -94,5 +92,5 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
This will add a new `KC_MAKE` keycode that can be used in any of your keymaps. And this keycode will output `make <keyboard>:<keymap">`, making frequent compiling easier. And this will work with any keyboard and any keymap as it will output the current boards info, so that you don't have to type this out every time. This will add a new `KC_MAKE` keycode that can be used in any of your keymaps. And this keycode will output `make <keyboard>:<keymap">`, making frequent compiling easier. And this will work with any keyboard and any keymap as it will output the current boards info, so that you don't have to type this out every time.
Additionally, this should flash the newly compiled firmware automatically, using the correct utility, based on the bootloader settings (or default to just generating the HEX file). However, it should be noted that this may not work on all systems (AVRDUDE doesn't work on WSL, namely). Additionally, this should flash the newly compiled firmware automatically, using the correct utility, based on the bootloader settings (or default to just generating the HEX file). However, it should be noted that this may not work on all systems. AVRDUDE doesn't work on WSL, namely (and will dump the HEX in the ".build" folder instead).
+7 -9
View File
@@ -42,17 +42,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case KC_MAKE: case KC_MAKE:
if (!record->event.pressed) { if (!record->event.pressed) {
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP); SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP
#if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU)) #if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU))
SEND_STRING(":dfu"); ":dfu"
#elseif defined(BOOTLOADER_HALFKEY) #elif defined(BOOTLOADER_HALFKAY)
SEND_STRING(":teensy "); ":teensy"
#elseif defined(BOOTLOADER_CATERINA) #elif defined(BOOTLOADER_CATERINA)
SEND_STRING(":avrdude "); ":avrdude"
#else
SEND_STRING(" ");
#endif #endif
SEND_STRING(SS_TAP(X_ENTER)); SS_TAP(X_ENTER));
} }
return false; return false;
break; break;