From 319ff649ab2972c623f31454682119851e12f4ea Mon Sep 17 00:00:00 2001 From: Drashna Jael're Date: Mon, 27 Nov 2017 20:53:40 -0800 Subject: [PATCH] 16 byte optimization of macro ;) --- docs/feature_userspace.md | 16 +++++++--------- users/drashna/template.c | 16 +++++++--------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/docs/feature_userspace.md b/docs/feature_userspace.md index 98b42b042d..f1a4efdd89 100644 --- a/docs/feature_userspace.md +++ b/docs/feature_userspace.md @@ -73,17 +73,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_MAKE: 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)) - SEND_STRING(":dfu"); -#elseif defined(BOOTLOADER_HALFKEY) - SEND_STRING(":teensy "); -#elseif defined(BOOTLOADER_CATERINA) - SEND_STRING(":avrdude "); -#else - SEND_STRING(" "); + ":dfu " +#elif defined(BOOTLOADER_HALFKEY) + ":teensy " +#elif defined(BOOTLOADER_CATERINA) + ":avrdude " #endif - SEND_STRING(SS_TAP(X_ENTER)); + SS_TAP(X_ENTER)); } return false; break; diff --git a/users/drashna/template.c b/users/drashna/template.c index 28f61c04f2..577a2ea36a 100644 --- a/users/drashna/template.c +++ b/users/drashna/template.c @@ -42,17 +42,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_MAKE: 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)) - SEND_STRING(":dfu"); -#elseif defined(BOOTLOADER_HALFKEY) - SEND_STRING(":teensy "); -#elseif defined(BOOTLOADER_CATERINA) - SEND_STRING(":avrdude "); -#else - SEND_STRING(" "); + ":dfu" +#elif defined(BOOTLOADER_HALFKEY) + ":teensy" +#elif defined(BOOTLOADER_CATERINA) + ":avrdude" #endif - SEND_STRING(SS_TAP(X_ENTER)); + SS_TAP(X_ENTER)); } return false; break;