Optimize size of Vitamins_Included keyboard

pull/3828/head
Drashna Jaelre 6 years ago committed by Jack Humbert
parent a4bdab6837
commit 8847b2abbf

@ -16,20 +16,12 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CONFIG_H #pragma once
#define CONFIG_H
#include "config_common.h" #include "config_common.h"
#if !defined(NO_DEBUG) && !defined(CONSOLE_ENABLE)
#define NO_DEBUG
#endif // !NO_DEBUG
#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE)
#define NO_PRINT
#endif // !NO_PRINT
#define NO_ACTION_MACRO #define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION #define NO_ACTION_FUNCTION
#define DISABLE_LEADER #define DISABLE_LEADER
#endif

@ -18,10 +18,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CONFIG_USER_H #pragma once
#define CONFIG_USER_H
#include "../../config.h"
/* Use I2C or Serial, not both */ /* Use I2C or Serial, not both */
@ -40,5 +37,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
SONG(COLEMAK_SOUND) \ SONG(COLEMAK_SOUND) \
} }
#endif #endif
#endif

@ -1,6 +1,4 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
#include "action_layer.h"
#include "eeconfig.h"
extern keymap_config_t keymap_config; extern keymap_config_t keymap_config;
@ -141,28 +139,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}; };
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case QWERTY: case QWERTY:
if (record->event.pressed) { if (record->event.pressed) {
persistent_default_layer_set(1UL<<_QWERTY); set_single_persistent_default_layer(_QWERTY);
} }
return false; return false;
break; break;
case COLEMAK: case COLEMAK:
if (record->event.pressed) { if (record->event.pressed) {
persistent_default_layer_set(1UL<<_COLEMAK); set_single_persistent_default_layer(_COLEMAK);
} }
return false; return false;
break; break;
case DVORAK: case DVORAK:
if (record->event.pressed) { if (record->event.pressed) {
persistent_default_layer_set(1UL<<_DVORAK); set_single_persistent_default_layer(_DVORAK);
} }
return false; return false;
break; break;

@ -1,3 +1 @@
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

@ -56,7 +56,7 @@ BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700) MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400) CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls MIDI_ENABLE = no # MIDI controls
@ -64,7 +64,6 @@ AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
USE_I2C = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
@ -74,4 +73,4 @@ LAYOUTS = ortho_4x12
DEFAULT_FOLDER = vitamins_included/rev1 DEFAULT_FOLDER = vitamins_included/rev1
EXTRAFLAGS += -flto EXTRAFLAGS += -flto

Loading…
Cancel
Save