diff options
Diffstat (limited to 'quantum')
-rw-r--r-- | quantum/matrix.c | 6 | ||||
-rw-r--r-- | quantum/quantum.c | 13 | ||||
-rw-r--r-- | quantum/quantum.h | 4 | ||||
-rw-r--r-- | quantum/quantum.mk | 4 | ||||
-rw-r--r-- | quantum/template/Makefile | 2 |
5 files changed, 26 insertions, 3 deletions
diff --git a/quantum/matrix.c b/quantum/matrix.c index d5fd7def8a..412662a794 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c @@ -68,8 +68,10 @@ uint8_t matrix_cols(void) { void matrix_init(void) { /* frees PORTF by setting the JTD bit twice within four cycles */ - MCUCR |= _BV(JTD); - MCUCR |= _BV(JTD); + #ifdef __AVR_ATmega32U4__ + MCUCR |= _BV(JTD); + MCUCR |= _BV(JTD); + #endif /* initializes the I/O pins */ #if DIODE_DIRECTION == COL2ROW for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) { diff --git a/quantum/quantum.c b/quantum/quantum.c index c53fb19b4b..d9aaafd616 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -13,6 +13,16 @@ bool process_action_kb(keyrecord_t *record) { } __attribute__ ((weak)) +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + return process_record_user(keycode, record); +} + +__attribute__ ((weak)) +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +__attribute__ ((weak)) void leader_start(void) {} __attribute__ ((weak)) @@ -124,6 +134,9 @@ bool process_record_quantum(keyrecord_t *record) { keycode = keymap_key_to_keycode(layer_switch_get_layer(key), key); #endif + if (!process_record_kb(keycode, record)) + return false; + // This is how you use actions here // if (keycode == KC_LEAD) { // action_t action; diff --git a/quantum/quantum.h b/quantum/quantum.h index 69a0d8126a..3ce940895d 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -23,6 +23,7 @@ #include "eeconfig.h" #include <stddef.h> #include <avr/io.h> +#include <util/delay.h> extern uint32_t default_layer_state; @@ -61,6 +62,9 @@ extern uint32_t default_layer_state; void matrix_init_kb(void); void matrix_scan_kb(void); bool process_action_kb(keyrecord_t *record); +bool process_record_kb(uint16_t keycode, keyrecord_t *record); +bool process_record_user(uint16_t keycode, keyrecord_t *record); + bool is_music_on(void); void music_toggle(void); diff --git a/quantum/quantum.mk b/quantum/quantum.mk index c099d67939..00d3e81142 100644 --- a/quantum/quantum.mk +++ b/quantum/quantum.mk @@ -1,5 +1,9 @@ QUANTUM_DIR = quantum +ifndef VERBOSE +.SILENT: +endif + # # project specific files SRC += $(QUANTUM_DIR)/quantum.c \ $(QUANTUM_DIR)/keymap_common.c \ diff --git a/quantum/template/Makefile b/quantum/template/Makefile index 1a535ef2cb..f101eb7a67 100644 --- a/quantum/template/Makefile +++ b/quantum/template/Makefile @@ -123,7 +123,7 @@ KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |