From de57799530d3184722532f93d156364067d8fcd5 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sat, 28 May 2016 11:56:06 -0400 Subject: brings alps64 up-to-date (needs testing) --- quantum/matrix.c | 6 ++++-- quantum/quantum.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'quantum') diff --git a/quantum/matrix.c b/quantum/matrix.c index d5fd7def8..412662a79 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.h b/quantum/quantum.h index 69a0d8126..71533f48b 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -23,6 +23,7 @@ #include "eeconfig.h" #include #include +#include extern uint32_t default_layer_state; -- cgit v1.2.3-70-g09d2 From 38987d4c1589d2d457459f42e179be24b712be30 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sat, 28 May 2016 12:05:17 -0400 Subject: updates quantum template to prevent backlight conflicts --- quantum/template/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'quantum') diff --git a/quantum/template/Makefile b/quantum/template/Makefile index 1a535ef2c..f101eb7a6 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 -- cgit v1.2.3-70-g09d2 From 17977a7e24ddab6ca101341b33c8fe7ad13e68f5 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sat, 28 May 2016 15:22:30 -0400 Subject: process_record implementation (non-breaking for process_action ATM) --- quantum/quantum.c | 13 +++++++++++++ quantum/quantum.h | 3 +++ 2 files changed, 16 insertions(+) (limited to 'quantum') diff --git a/quantum/quantum.c b/quantum/quantum.c index c53fb19b4..d9aaafd61 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -12,6 +12,16 @@ bool process_action_kb(keyrecord_t *record) { return true; } +__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) {} @@ -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 71533f48b..3ce940895 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -62,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); -- cgit v1.2.3-70-g09d2 From a53bc24c4d5a6b1f31060e43789a12af6e39b572 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sat, 28 May 2016 15:33:08 -0400 Subject: makes .SILENT (less verbose) by default - override with VERBOSE=1 also took out some @echo newlines to make things a bit cleaner --- quantum/quantum.mk | 4 ++++ tmk_core/rules.mk | 14 -------------- 2 files changed, 4 insertions(+), 14 deletions(-) (limited to 'quantum') diff --git a/quantum/quantum.mk b/quantum/quantum.mk index c099d6793..00d3e8114 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/tmk_core/rules.mk b/tmk_core/rules.mk index 1d384574f..37be850f8 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk @@ -393,12 +393,10 @@ lib: $(LIBNAME) # AVR Studio 3.x does not check make's exit code but relies on # the following magic strings to be generated by the compile job. begin: - @echo @echo $(MSG_BEGIN) end: @echo $(MSG_END) - @echo # Display size of file. @@ -505,13 +503,11 @@ COFFCONVERT += --change-section-address .eeprom-0x810000 coff: $(TARGET).elf - @echo @echo $(MSG_COFF) $(TARGET).cof $(COFFCONVERT) -O coff-avr $< $(TARGET).cof extcoff: $(TARGET).elf - @echo @echo $(MSG_EXTENDED_COFF) $(TARGET).cof $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof @@ -519,25 +515,21 @@ extcoff: $(TARGET).elf # Create final output files (.hex, .eep) from ELF output file. %.hex: %.elf - @echo @echo $(MSG_FLASH) $@ $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature $< $@ %.eep: %.elf - @echo @echo $(MSG_EEPROM) $@ -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \ --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) $< $@ || exit 0 # Create extended listing file from ELF output file. %.lss: %.elf - @echo @echo $(MSG_EXTENDED_LISTING) $@ $(OBJDUMP) -h -S -z $< > $@ # Create a symbol table from ELF output file. %.sym: %.elf - @echo @echo $(MSG_SYMBOL_TABLE) $@ $(NM) -n $< > $@ @@ -547,7 +539,6 @@ extcoff: $(TARGET).elf .SECONDARY : $(TARGET).a .PRECIOUS : $(OBJ) %.a: $(OBJ) - @echo @echo $(MSG_CREATING_LIBRARY) $@ $(AR) $@ $(OBJ) @@ -556,14 +547,12 @@ extcoff: $(TARGET).elf .SECONDARY : $(TARGET).elf .PRECIOUS : $(OBJ) %.elf: $(OBJ) - @echo @echo $(MSG_LINKING) $@ $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS) # Compile: create object files from C source files. $(OBJDIR)/%.o : %.c - @echo mkdir -p $(@D) @echo $(MSG_COMPILING) $< $(CC) -c $(ALL_CFLAGS) $< -o $@ @@ -571,7 +560,6 @@ $(OBJDIR)/%.o : %.c # Compile: create object files from C++ source files. $(OBJDIR)/%.o : %.cpp - @echo mkdir -p $(@D) @echo $(MSG_COMPILING_CPP) $< $(CC) -c $(ALL_CPPFLAGS) $< -o $@ @@ -589,7 +577,6 @@ $(OBJDIR)/%.o : %.cpp # Assemble: create object files from assembler source files. $(OBJDIR)/%.o : %.S - @echo mkdir -p $(@D) @echo $(MSG_ASSEMBLING) $< $(CC) -c $(ALL_ASFLAGS) $< -o $@ @@ -604,7 +591,6 @@ $(OBJDIR)/%.o : %.S clean: begin clean_list end clean_list : - @echo $(REMOVE) $(TARGET).hex $(REMOVE) $(TARGET).eep $(REMOVE) $(TARGET).cof -- cgit v1.2.3-70-g09d2