]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Merge pull request #353 from algernon/ergodox-ez/algernon
authorErez Zukerman <bulk@ezuk.org>
Sun, 29 May 2016 17:53:29 +0000 (13:53 -0400)
committerErez Zukerman <bulk@ezuk.org>
Sun, 29 May 2016 17:53:29 +0000 (13:53 -0400)
My layout for the ErgoDox EZ

29 files changed:
README.md
keyboard/alps64/Makefile
keyboard/alps64/alps64.c [new file with mode: 0644]
keyboard/alps64/alps64.h [new file with mode: 0644]
keyboard/alps64/config.h
keyboard/alps64/keymap_common.c [deleted file]
keyboard/alps64/keymap_common.h [deleted file]
keyboard/alps64/keymaps/default.c
keyboard/alps64/keymaps/hasu.c
keyboard/alps64/matrix.c
keyboard/gh60/Makefile
keyboard/gh60/keymap_common.c [deleted file]
keyboard/hhkb/Makefile
keyboard/hhkb/matrix.c
keyboard/jd45/Makefile
keyboard/kc60_v2/Makefile [new file with mode: 0644]
keyboard/kc60_v2/README.md [new file with mode: 0644]
keyboard/kc60_v2/config.h [new file with mode: 0644]
keyboard/kc60_v2/kc60.c [new file with mode: 0644]
keyboard/kc60_v2/kc60.h [new file with mode: 0644]
keyboard/kc60_v2/keymaps/default.c [new file with mode: 0644]
keyboard/planck/.gitignore [new file with mode: 0644]
quantum/keymap_common.h
quantum/matrix.c
quantum/quantum.c
quantum/quantum.h
quantum/quantum.mk
quantum/template/Makefile
tmk_core/rules.mk

index 646fa6f2b1724c428554ec11127e01071b345af6..2c825752858d9f06dfec56e8075b453c10031233 100644 (file)
--- a/README.md
+++ b/README.md
@@ -8,9 +8,17 @@ This documentation is edited and maintained by Erez Zukerman of ErgoDox EZ. If y
 
 The OLKB product firmwares are maintained by Jack, the Ergodox EZ by Erez, and the Clueboard by [Zach White](https://github.com/skullydazed).
 
-## Important background info: TMK documentation
+## Documentation roadmap
 
-The documentation below explains QMK customizations and elaborates on some of the more useful features of TMK. To understand the base firmware, and especially what *layers* are and how they work, please see [TMK_README.md](/TMK_README.md).
+This is not a tiny project. While this is the main Readme, there are many other files you might want to consult. Here are some points of interest:
+
+* The Readme for your own keyboard: This is found under `keyboards/<your keyboards's name>/`. So for the ErgoDox EZ, it's [here](keyboard/ergodox_ez/); for the Atomic, it's [here](keyboard/atomic/) and so on.
+* The [build guide](BUILD_GUIDE.md), also mentioned in the next section. This is how you put your development environment together so you can compile the firmware.
+* The list of possible keycodes you can use in your keymap is actually spread out in a few different places:
+  * [tmk_core/common/keycode.h](tmk_core/common/keycode.h) - the base TMK keycodes. This is the actual source file.
+  * [tmk_core/doc/keycode.txt](tmk_core/doc/keycode.txt) - an explanation of those same keycodes.
+  * [quantum/keymap_common.h](quantum/keymap_common.h) - this is where the QMK-specific aliases are all set up. Things like the Hyper and Meh key, the Leader key, and all of the other QMK innovations. These are also explained and documented below, but `keymap_common.h` is where they're actually defined.
+* The [TMK documentation](tmk_core/doc). QMK is based on TMK, and this explains how it works internally.
 
 ## Getting started
 
index 7634c4280ebceee82b5a2726d3b196f861312fa0..bd6ecb6b910c423573ab1158a9783fcc33d6a855 100644 (file)
 TARGET = alps64
 
 # Directory common source filess exist
+TOP_DIR = ../..
 TMK_DIR = ../../tmk_core
 
 # Directory keyboard dependent files exist
 TARGET_DIR = .
 
 # project specific files
-SRC =  keymap_common.c \
-       matrix.c \
+SRC =  alps64.c \
        led.c
 
 ifdef KEYMAP
@@ -127,8 +127,7 @@ COMMAND_ENABLE = yes    # Commands for debug and configuration
 
 # Search Path
 VPATH += $(TARGET_DIR)
+VPATH += $(TOP_DIR)
 VPATH += $(TMK_DIR)
 
-include $(TMK_DIR)/protocol/lufa.mk
-include $(TMK_DIR)/common.mk
-include $(TMK_DIR)/rules.mk
+include $(TOP_DIR)/quantum/quantum.mk
diff --git a/keyboard/alps64/alps64.c b/keyboard/alps64/alps64.c
new file mode 100644 (file)
index 0000000..dde10c1
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+Copyright 2012,2013 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+#include "quantum.h"
+
+#define LED_ON()    do { DDRC |= (1<<5); PORTC |= (1<<5); } while (0)
+#define LED_OFF()   do { DDRC &= ~(1<<5); PORTC &= ~(1<<5); } while (0)
+#define LED_TGL()   do { DDRC |= (1<<5); PINC |= (1<<5); } while (0)
+
+__attribute__ ((weak))
+void matrix_init_user(void) {
+
+}
+
+__attribute__ ((weak))
+void matrix_scan_user(void) {
+
+}
+
+void matrix_init_kb(void) {
+    LED_ON();
+    _delay_ms(500);
+    LED_OFF();
+    
+    matrix_init_user();
+}
+
+void matrix_scan_kb(void) {
+    matrix_scan_user();
+}
diff --git a/keyboard/alps64/alps64.h b/keyboard/alps64/alps64.h
new file mode 100644 (file)
index 0000000..d077720
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+Copyright 2012,2013 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+#ifndef ALPS64_H
+#define ALPS64_H
+
+#include "quantum.h"
+
+/* Alps64 keymap definition macro */
+#define KEYMAP( \
+    K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K26, K27, \
+    K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \
+    K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \
+    K31, K41, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, K22, \
+    K30, K40, K50,           K60,                     K70, K00, K10, K20  \
+) { \
+    { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, \
+    { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17 }, \
+    { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27 }, \
+    { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37 }, \
+    { KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47 }, \
+    { KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, \
+    { KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67 }, \
+    { KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77 } \
+}
+
+/* AEK US */
+#define KEYMAP_AEK( \
+    K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K27, \
+    K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \
+    K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \
+    K31, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, \
+    K30, K40, K50,           K60,                          K00, K10, K20  \
+) KEYMAP( \
+    K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, NUHS,K27, \
+    K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \
+    K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \
+    K31, NUBS,K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, ESC, \
+    K30, K40, K50,           K60,                     APP, K00, K10, K20  \
+)
+
+#endif
index 824d3e8302916ee4174abefe97eb3da5081b0f2d..858a82ecdd9fd98b3c0257dff35e257e1d0f45e3 100644 (file)
@@ -18,6 +18,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #ifndef CONFIG_H
 #define CONFIG_H
 
+#include "config_common.h"
 
 /* USB Device descriptor parameter */
 #define VENDOR_ID       0xFEED
@@ -31,6 +32,10 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define MATRIX_ROWS 8
 #define MATRIX_COLS 8
 
+#define MATRIX_COL_PINS {  B0, B1, B2, B3, B4, B5, B6, B7 }
+#define MATRIX_ROW_PINS {  D0, D1, D2, D3, D4, D5, D6, C2 }
+#define UNUSED_PINS
+
 /* define if matrix has ghost */
 //#define MATRIX_HAS_GHOST
 
diff --git a/keyboard/alps64/keymap_common.c b/keyboard/alps64/keymap_common.c
deleted file mode 100644 (file)
index fdb1769..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
-Copyright 2012,2013 Jun Wako <wakojun@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-#include "keymap_common.h"
-
-
-/* translates key to keycode */
-uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
-{
-    return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
-}
-
-/* translates Fn keycode to action */
-action_t keymap_fn_to_action(uint8_t keycode)
-{
-    return (action_t){ .code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]) };
-}
diff --git a/keyboard/alps64/keymap_common.h b/keyboard/alps64/keymap_common.h
deleted file mode 100644 (file)
index 957db57..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-Copyright 2012,2013 Jun Wako <wakojun@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-#ifndef KEYMAP_COMMON_H
-#define KEYMAP_COMMON_H
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <avr/pgmspace.h>
-#include "keycode.h"
-#include "action.h"
-#include "action_macro.h"
-#include "report.h"
-#include "host.h"
-#include "print.h"
-#include "debug.h"
-#include "keymap.h"
-
-
-extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS];
-extern const uint16_t fn_actions[];
-
-
-/* Alps64 keymap definition macro */
-#define KEYMAP( \
-    K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K26, K27, \
-    K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \
-    K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \
-    K31, K41, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, K22, \
-    K30, K40, K50,           K60,                     K70, K00, K10, K20  \
-) { \
-    { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, \
-    { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17 }, \
-    { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27 }, \
-    { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37 }, \
-    { KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47 }, \
-    { KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, \
-    { KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67 }, \
-    { KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77 } \
-}
-
-/* AEK US */
-#define KEYMAP_AEK( \
-    K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K27, \
-    K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \
-    K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \
-    K31, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, \
-    K30, K40, K50,           K60,                          K00, K10, K20  \
-) KEYMAP( \
-    K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, NUHS,K27, \
-    K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \
-    K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \
-    K31, NUBS,K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, ESC, \
-    K30, K40, K50,           K60,                     APP, K00, K10, K20  \
-)
-
-#endif
index a54899196aafbe5d83cd7937d6b491d1267bbf46..2c45dc7f342dd5698264eaf6901370af1ea8ca94 100644 (file)
@@ -1,6 +1,6 @@
-#include "keymap_common.h"
+#include "alps64.h"
 
-const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
     /* 0: qwerty */
     KEYMAP( \
         GRV, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, NUHS, BSPC, \
index d297d72fea3bc493647cf1c2d0bb21e1af151e99..e93dd0d410f5de10d8626d5c570c73261542a557 100644 (file)
@@ -1,9 +1,9 @@
-#include "keymap_common.h"
+#include "alps64.h"
 
 /*
  * Hasu
  */
-const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
     /* Default Layer
      * ,-----------------------------------------------------------.
      * |Esc|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|   \   |
index 5638d7f69d9ef63f72490cd7a5485041ce23e5ce..805999d4a1a739051fd2fe0a14ebf1cd08336a74 100644 (file)
@@ -55,10 +55,6 @@ uint8_t matrix_cols(void)
     return MATRIX_COLS;
 }
 
-#define LED_ON()    do { DDRC |= (1<<5); PORTC |= (1<<5); } while (0)
-#define LED_OFF()   do { DDRC &= ~(1<<5); PORTC &= ~(1<<5); } while (0)
-#define LED_TGL()   do { DDRC |= (1<<5); PINC |= (1<<5); } while (0)
-
 void matrix_init(void)
 {
     // initialize row and col
@@ -160,6 +156,7 @@ static void unselect_rows(void)
     PORTC &= ~0b00000100;
 }
 
+
 static void select_row(uint8_t row)
 {
     // Output low(DDR:1, PORT:0) to select
index 4c8f9dc8ab86a7653607cc32ea10eb7ea395681a..9429049fd9fdf3805e21e676ebfd63f9bc99a666 100644 (file)
 TARGET = gh60_lufa
 
 # Directory common source filess exist
+TOP_DIR = ../..
 TMK_DIR = ../../tmk_core
 
 # Directory keyboard dependent files exist
 TARGET_DIR = .
 
 # project specific files
-SRC =  keymap_common.c \
-       matrix.c \
+SRC =  matrix.c \
        led.c
 
 ifdef KEYMAP
@@ -119,6 +119,7 @@ MOUSEKEY_ENABLE = yes       # Mouse keys(+4700)
 EXTRAKEY_ENABLE = yes  # Audio control and System control(+450)
 CONSOLE_ENABLE = yes   # Console for debug(+400)
 COMMAND_ENABLE = yes    # Commands for debug and configuration
+CUSTOM_MATRIX = yes
 #SLEEP_LED_ENABLE = yes  # Breathing sleep LED during USB suspend
 NKRO_ENABLE = yes      # USB Nkey Rollover - not yet supported in LUFA
 
@@ -128,8 +129,7 @@ NKRO_ENABLE = yes   # USB Nkey Rollover - not yet supported in LUFA
 
 # Search Path
 VPATH += $(TARGET_DIR)
+VPATH += $(TOP_DIR)
 VPATH += $(TMK_DIR)
 
-include $(TMK_DIR)/protocol/lufa.mk
-include $(TMK_DIR)/common.mk
-include $(TMK_DIR)/rules.mk
\ No newline at end of file
+include $(TOP_DIR)/quantum/quantum.mk
diff --git a/keyboard/gh60/keymap_common.c b/keyboard/gh60/keymap_common.c
deleted file mode 100644 (file)
index fdb1769..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
-Copyright 2012,2013 Jun Wako <wakojun@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-#include "keymap_common.h"
-
-
-/* translates key to keycode */
-uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
-{
-    return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
-}
-
-/* translates Fn keycode to action */
-action_t keymap_fn_to_action(uint8_t keycode)
-{
-    return (action_t){ .code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]) };
-}
index 21ba261a2315b68a719f233bda576141f2ddfec5..b6c3b869e4d67f7df302be71f3ec3bdea8fe517d 100644 (file)
@@ -56,7 +56,7 @@ SRC = hhkb_qmk.c \
 ifdef KEYMAP
     SRC := keymaps/keymaps/$(KEYMAP).c $(SRC)
 else
-    SRC := keymaps/keymaps/default.c $(SRC)
+    SRC := keymaps/default.c $(SRC)
 endif
 
 CONFIG_H = config.h
index 14fae0b82cca7b77da2ee111e100c507ed36bab7..2dfb2f5e1f45ee7eb52b5444c8c1ad7997238f8a 100644 (file)
@@ -188,6 +188,14 @@ void matrix_print(void)
     }
 }
 
+uint8_t matrix_key_count(void) {
+    uint8_t count = 0;
+    for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) {
+        count += bitpop16(matrix_get_row(r));
+    }
+    return count;
+}
+
 void matrix_power_up(void) {
     KEY_POWER_ON();
 }
index f6a8d10c583bda4bef5d19bc08154eed70e233fe..d270a6f8a70964d7b63aa1638f9c211d895f68af 100644 (file)
@@ -56,7 +56,7 @@ SRC = jd45.c \
 ifdef KEYMAP
     SRC := keymaps/keymaps/(KEYMAP).c $(SRC)
 else
-    SRC := keymaps/keymaps/default.c $(SRC)
+    SRC := keymaps/default.c $(SRC)
 endif
 
 CONFIG_H = config.h
diff --git a/keyboard/kc60_v2/Makefile b/keyboard/kc60_v2/Makefile
new file mode 100644 (file)
index 0000000..33ece31
--- /dev/null
@@ -0,0 +1,158 @@
+#----------------------------------------------------------------------------
+# On command line:
+#
+# make all = Make software.
+#
+# make clean = Clean out built project files.
+#
+# make coff = Convert ELF to AVR COFF.
+#
+# make extcoff = Convert ELF to AVR Extended COFF.
+#
+# make program = Download the hex file to the device.
+#                Please customize your programmer settings(PROGRAM_CMD)
+#
+# make teensy = Download the hex file to the device, using teensy_loader_cli.
+#               (must have teensy_loader_cli installed).
+#
+# make dfu = Download the hex file to the device, using dfu-programmer (must
+#            have dfu-programmer installed).
+#
+# make flip = Download the hex file to the device, using Atmel FLIP (must
+#             have Atmel FLIP installed).
+#
+# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
+#               (must have dfu-programmer installed).
+#
+# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
+#                (must have Atmel FLIP installed).
+#
+# make debug = Start either simulavr or avarice as specified for debugging, 
+#              with avr-gdb or avr-insight as the front end for debugging.
+#
+# make filename.s = Just compile filename.c into the assembler code only.
+#
+# make filename.i = Create a preprocessed source file for use in submitting
+#                   bug reports to the GCC project.
+#
+# To rebuild project do "make clean" then "make all".
+#----------------------------------------------------------------------------
+
+# Target file name (without extension).
+TARGET = kc60
+
+
+# Directory common source filess exist
+TOP_DIR = ../..
+TMK_DIR = ../../tmk_core
+
+# Directory keyboard dependent files exist
+TARGET_DIR = .
+
+# # project specific files
+SRC = kc60.c
+
+ifdef KEYMAP
+    SRC := keymaps/$(KEYMAP).c $(SRC)
+else
+    SRC := keymaps/default.c $(SRC)
+endif
+
+CONFIG_H = config.h
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+#   change yes to no to disable
+#
+BOOTMAGIC_ENABLE = yes      # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes       # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes       # Audio control and System control(+450)
+CONSOLE_ENABLE = yes        # Console for debug(+400)
+COMMAND_ENABLE = yes        # Commands for debug and configuration
+KEYBOARD_LOCK_ENABLE = yes  # Allow locking of keyboard via magic key
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+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
+MIDI_ENABLE = no            # MIDI controls
+UNICODE_ENABLE = no         # Unicode
+BLUETOOTH_ENABLE = no       # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no           # Audio output on port C6
+
+
+ifdef KEYMAP
+
+ifeq ("$(wildcard keymaps/$(KEYMAP).c)","")
+ifneq ("$(wildcard keymaps/$(KEYMAP)/makefile.mk)","")
+    include keymaps/$(KEYMAP)/makefile.mk
+endif 
+endif
+
+else
+
+ifneq ("$(wildcard keymaps/default/makefile.mk)","")
+    include keymaps/default/makefile.mk
+endif
+
+endif
+
+# Optimize size but this may cause error "relocation truncated to fit"
+#EXTRALDFLAGS = -Wl,--relax
+
+# Search Path
+VPATH += $(TARGET_DIR)
+VPATH += $(TOP_DIR)
+VPATH += $(TMK_DIR)
+
+include $(TOP_DIR)/quantum/quantum.mk
+
diff --git a/keyboard/kc60_v2/README.md b/keyboard/kc60_v2/README.md
new file mode 100644 (file)
index 0000000..4be448d
--- /dev/null
@@ -0,0 +1,24 @@
+kc60 keyboard firmware
+======================
+
+## Quantum MK Firmware
+
+For the full Quantum feature list, see [the parent README.md](/README.md).
+
+## Building
+
+Download or clone the whole firmware and navigate to the keyboard/kc60 folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. 
+
+Depending on which keymap you would like to use, you will have to compile slightly differently.
+
+### Default
+To build with the default keymap, simply run `make`.
+
+### Other Keymaps
+Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>.c` in the keymaps folder, and see keymap document (you can find in top README.md) and existent keymap files.
+
+To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like:
+```
+$ make KEYMAP=[default|jack|<name>]
+```
+Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
diff --git a/keyboard/kc60_v2/config.h b/keyboard/kc60_v2/config.h
new file mode 100644 (file)
index 0000000..16bc1cb
--- /dev/null
@@ -0,0 +1,161 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID       0xFEED
+#define PRODUCT_ID      0x6060
+#define DEVICE_VER      0x0001
+#define MANUFACTURER    You
+#define PRODUCT         kc60v2
+#define DESCRIPTION     A custom keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 14
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ *                  ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+
+// Possible pins for columns include: F1  F0  E6  D7  D6  D4  C7  C6  B7  B5  B4  B3  B1  B0
+// Pins for rows include:  D0  D1  F6  F7  D5
+#define MATRIX_ROW_PINS { D0, D1, F6, F7, D5 }
+#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+#define BACKLIGHT_LEVELS 3
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+#define IS_COMMAND() ( \
+    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS  true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS  true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1          H
+//#define MAGIC_KEY_HELP2          SLASH
+//#define MAGIC_KEY_DEBUG          D
+//#define MAGIC_KEY_DEBUG_MATRIX   X
+//#define MAGIC_KEY_DEBUG_KBD      K
+//#define MAGIC_KEY_DEBUG_MOUSE    M
+//#define MAGIC_KEY_VERSION        V
+//#define MAGIC_KEY_STATUS         S
+//#define MAGIC_KEY_CONSOLE        C
+//#define MAGIC_KEY_LAYER0_ALT1    ESC
+//#define MAGIC_KEY_LAYER0_ALT2    GRAVE
+//#define MAGIC_KEY_LAYER0         0
+//#define MAGIC_KEY_LAYER1         1
+//#define MAGIC_KEY_LAYER2         2
+//#define MAGIC_KEY_LAYER3         3
+//#define MAGIC_KEY_LAYER4         4
+//#define MAGIC_KEY_LAYER5         5
+//#define MAGIC_KEY_LAYER6         6
+//#define MAGIC_KEY_LAYER7         7
+//#define MAGIC_KEY_LAYER8         8
+//#define MAGIC_KEY_LAYER9         9
+//#define MAGIC_KEY_BOOTLOADER     PAUSE
+//#define MAGIC_KEY_LOCK           CAPS
+//#define MAGIC_KEY_EEPROM         E
+//#define MAGIC_KEY_NKRO           N
+//#define MAGIC_KEY_SLEEP_LED      Z
+
+/*
+ * Feature disable options
+ *  These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+#endif
diff --git a/keyboard/kc60_v2/kc60.c b/keyboard/kc60_v2/kc60.c
new file mode 100644 (file)
index 0000000..0a578b2
--- /dev/null
@@ -0,0 +1,111 @@
+#include "kc60.h"
+
+__attribute__ ((weak))
+  void matrix_init_user(void) {
+    // leave this function blank - it can be defined in a keymap file
+  };
+
+__attribute__ ((weak))
+  void matrix_scan_user(void) {
+    // leave this function blank - it can be defined in a keymap file
+  }
+
+__attribute__ ((weak))
+  bool process_action_user(keyrecord_t *record) {
+    // leave this function blank - it can be defined in a keymap file
+    return true;
+  }
+
+__attribute__ ((weak))
+  void led_set_user(uint8_t usb_led) {
+    // leave this function blank - it can be defined in a keymap file
+  }
+
+void matrix_init_kb(void) {
+  // put your keyboard start-up code here
+  // runs once when the firmware starts up
+
+#ifdef BACKLIGHT_ENABLE
+  backlight_init_ports();
+#endif
+
+  matrix_init_user();
+}
+
+void matrix_scan_kb(void) {
+  // put your looping keyboard code here
+  // runs every cycle (a lot)
+
+  matrix_scan_user();
+}
+
+bool process_action_kb(keyrecord_t *record) {
+  // put your per-action keyboard code here
+  // runs for every action, just before processing by the firmware
+
+  return process_action_user(record);
+}
+
+void led_set_kb(uint8_t usb_led) {
+  // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+
+  led_set_user(usb_led);
+}
+
+#ifdef BACKLIGHT_ENABLE
+#define CHANNEL OCR1B
+
+void backlight_init_ports()
+{
+
+  // Setup PB6 as output and output low.
+  DDRB |= (1<<6);
+  PORTB &= ~(1<<6);
+
+  // Use full 16-bit resolution. 
+  ICR1 = 0xFFFF;
+
+  // I could write a wall of text here to explain... but TL;DW
+  // Go read the ATmega32u4 datasheet.
+  // And this: http://blog.saikoled.com/post/43165849837/secret-konami-cheat-code-to-high-resolution-pwm-on
+
+  // Pin PB7 = OCR1C (Timer 1, Channel C)
+  // Compare Output Mode = Clear on compare match, Channel C = COM1B1=1 COM1C0=0
+  // (i.e. start high, go low when counter matches.)
+  // WGM Mode 14 (Fast PWM) = WGM13=1 WGM12=1 WGM11=1 WGM10=0
+  // Clock Select = clk/1 (no prescaling) = CS12=0 CS11=0 CS10=1
+
+  TCCR1A = _BV(COM1B1) | _BV(WGM11); // = 0b00001010;
+  TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001;
+
+  backlight_init();
+}
+
+void backlight_set(uint8_t level)
+{
+  // Prevent backlight blink on lowest level
+  PORTB &= ~(_BV(PORTB6));
+
+  if ( level == 0 )
+  {
+    // Turn off PWM control on PB6, revert to output low.
+    TCCR1A &= ~(_BV(COM1B1));
+    CHANNEL = 0x0;
+  }
+  else if ( level == BACKLIGHT_LEVELS)
+  {
+    // Turn on PWM control of PB6
+    TCCR1A |= _BV(COM1B1);
+    // Set the brightness
+    CHANNEL = 0xFFFF;
+  }
+  else        
+  {
+    // Turn on PWM control of PB6
+    TCCR1A |= _BV(COM1B1);
+    // Set the brightness
+    CHANNEL = 0xFFFF >> ((BACKLIGHT_LEVELS - level) * ((BACKLIGHT_LEVELS + 1) / 2));
+  }
+}
+
+#endif
diff --git a/keyboard/kc60_v2/kc60.h b/keyboard/kc60_v2/kc60.h
new file mode 100644 (file)
index 0000000..d346a55
--- /dev/null
@@ -0,0 +1,36 @@
+#ifndef KC60_H
+#define KC60_H
+
+#include "matrix.h"
+#include "keymap_common.h"
+#ifdef BACKLIGHT_ENABLE
+#include "backlight.h"
+#endif
+#include <avr/io.h>
+#include <stddef.h>
+
+// This a shortcut to help you visually see your layout.
+// The first section contains all of the arguements
+// The second converts the arguments into a multi-dimensional array
+#define KEYMAP( \
+    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
+    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
+    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
+    K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
+    K40, K41, K42,           K45,                     K4A, K4B, K4C, K4D  \
+    ) { \
+  {  K00,  K01,  K02,  K03,    K04,    K05,  K06,    K07,    K08,    K09,  K0A,  K0B,  K0C,  K0D  },  \
+  {  K10,  K11,  K12,  K13,    K14,    K15,  K16,    K17,    K18,    K19,  K1A,  K1B,  K1C,  K1D  },  \
+  {  K20,  K21,  K22,  K23,    K24,    K25,  K26,    K27,    K28,    K29,  K2A,  K2B,  K2C,  K2D  },  \
+  {  K30,  K31,  K32,  K33,    K34,    K35,  K36,    K37,    K38,    K39,  K3A,  K3B,  K3C,  K3D  },  \
+  {  K40,  K41,  K42,  KC_NO,  KC_NO,  K45,  KC_NO,  KC_NO,  KC_NO,  KC_NO,K4A,  K4B,  K4C,  K4D  }   \
+}
+
+void matrix_init_user(void);
+void matrix_scan_user(void);
+bool process_action_user(keyrecord_t *record);
+
+void led_set_user(uint8_t usb_led);
+void backlight_init_ports(void);
+
+#endif
diff --git a/keyboard/kc60_v2/keymaps/default.c b/keyboard/kc60_v2/keymaps/default.c
new file mode 100644 (file)
index 0000000..6f8352c
--- /dev/null
@@ -0,0 +1,24 @@
+// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
+// this is the style you want to emulate.
+
+#include "kc60.h"
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+  [0] = KEYMAP( /* Basic QWERTY */
+      KC_ESC,   KC_1,     KC_2,     KC_3,    KC_4,     KC_5,     KC_6,     KC_7,    KC_8,  KC_9,     KC_0,     KC_MINS,  KC_EQL,   KC_BSPC,  \
+      KC_TAB,   KC_Q,     KC_W,     KC_E,    KC_R,     KC_T,     KC_Y,     KC_U,    KC_I,  KC_O,     KC_P,     KC_LBRC,  KC_RBRC,  KC_BSLS,  \
+      KC_CAPS,  KC_A,     KC_S,     KC_D,    KC_F,     KC_G,     KC_H,     KC_J,    KC_K,  KC_L,     KC_SCLN,  KC_QUOT,  KC_NO,    KC_ENT,   \
+      KC_LSFT,  KC_NO,    KC_Z,     KC_X,    KC_C,     KC_V,     KC_B,     KC_N,    KC_M,  KC_COMM,  KC_DOT,   KC_SLSH,  KC_NO,    KC_RSFT,  \
+      KC_LCTL,  KC_LALT,  KC_LGUI,                     KC_SPC,                                       KC_RGUI,  KC_RALT,  KC_RCTL,  RESET \
+      ),
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+  // MACRODOWN only works in this function
+  return MACRO_NONE;
+};
diff --git a/keyboard/planck/.gitignore b/keyboard/planck/.gitignore
new file mode 100644 (file)
index 0000000..6e92f57
--- /dev/null
@@ -0,0 +1 @@
+tags
index db14e7d8aca1e09eeabd7a9814e04d931fedea6f..c72c0bc29d77c41ff6fff454093ec51a121001d7 100644 (file)
@@ -88,10 +88,8 @@ extern const uint16_t fn_actions[];
 
 #define KC_AT   LSFT(KC_2)      // @
 
-
 #define KC_HASH LSFT(KC_3)      // #
 
-
 #define KC_DLR  LSFT(KC_4)      // $
 #define KC_DOLLAR   KC_DLR
 
@@ -113,15 +111,11 @@ extern const uint16_t fn_actions[];
 #define KC_RPRN LSFT(KC_0)      // )
 #define KC_RIGHT_PAREN  KC_RPRN
 
-
 #define KC_UNDS LSFT(KC_MINS)   // _
 #define KC_UNDERSCORE   KC_UNDS
 
 #define KC_PLUS LSFT(KC_EQL)    // +
 
-#define KC_DQUO LSFT(KC_QUOT)   // "
-#define KC_DOUBLE_QUOTE KC_DQUO
-
 #define KC_LCBR LSFT(KC_LBRC)   // {
 #define KC_LEFT_CURLY_BRACE KC_LCBR
 
@@ -141,16 +135,14 @@ extern const uint16_t fn_actions[];
 
 #define KC_LT LSFT(KC_COMM)     // <
 
-
 #define KC_GT LSFT(KC_DOT)      // >
 
-
 #define KC_QUES LSFT(KC_SLSH)   // ?
 #define KC_QUESTION KC_QUES
 
-
 #define KC_DQT LSFT(KC_QUOT)   // "
 #define KC_DOUBLE_QUOTE KC_DQT
+#define KC_DQUO KC_DQT
 
 #define KC_DELT KC_DELETE // Del key (four letter code)
 
index d5fd7def8ab30efed89bfd33d6399ce53b938562..412662a794fc187648f01bdada225e3811e8d693 100644 (file)
@@ -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) {
index c53fb19b4b4124c8a14c199dca4637792c239856..d9aaafd616ef386abd0e69be35a620fa4263ac43 100644 (file)
@@ -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;
index 69a0d8126ab85255bfce205934da89f6cf0336a6..3ce940895d348a93a87556def4c21f31b989e379 100644 (file)
@@ -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);
index c099d67939a8eed138af0d2d7e80b1f0ad3aa295..00d3e811424263ff47986acad8a35ea7a2130caa 100644 (file)
@@ -1,5 +1,9 @@
 QUANTUM_DIR = quantum
 
+ifndef VERBOSE
+.SILENT:
+endif
+
 # # project specific files
 SRC += $(QUANTUM_DIR)/quantum.c \
        $(QUANTUM_DIR)/keymap_common.c \
index 1a535ef2cbad8f5ec9acf89609ed36c2a1d5b52f..f101eb7a67623452113f2e341b013db7df53977f 100644 (file)
@@ -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
index 1d384574f613b3fbe7e90347f3e7b76911094c04..37be850f8463209964b538dae266e1a862966be7 100644 (file)
@@ -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