2 Copyright 2015 Jun Wako <wakojun@gmail.com>
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #include "config_common.h"
22 /* USB Device descriptor parameter */
23 #define VENDOR_ID 0x04D8
24 #define PRODUCT_ID 0xEED3
25 #define DEVICE_VER 0x0101
27 #define MANUFACTURER "Massdrop Inc."
28 #define PRODUCT "ALT Keyboard"
29 #define SERIAL_NUM "Unavailable"
33 #define MATRIX_COLS 15
35 /* MCU Port name definitions */
39 /* Port and Pin definition of key row hardware configuration */
40 #define MATRIX_ROW_PORTS PA, PA, PA, PA, PA
41 #define MATRIX_ROW_PINS 0, 1, 2, 3, 4
43 /* Port and Pin definition of key column hardware configuration */
44 #define MATRIX_COL_PORTS PB, PB, PB, PB, PB, PB, PB, PB, PB, PB, PA, PA, PA, PA, PA
45 #define MATRIX_COL_PINS 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 5, 6, 7, 10, 11
47 /* This Shift Register expands available hardware output lines to control additional peripherals */
48 /* It uses four lines from the MCU to provide 16 output lines */
49 /* Shift Register Clock configuration (MCU to ShiftRegister.RCLK) */
50 #define SR_EXP_RCLK_PORT PB
51 #define SR_EXP_RCLK_PIN 14
52 /* Shift Register Output Enable configuration (MCU to ShiftRegister.OE_N) */
53 #define SR_EXP_OE_N_PORT PB
54 #define SR_EXP_OE_N_PIN 15
55 /* SERCOM port to use for Shift Register SPI */
56 /* DATAOUT and SCLK must be configured to use hardware pins of this port */
57 #define SR_EXP_SERCOM SERCOM2
58 /* Shift Register SPI Data Out configuration (MCU.SERCOMx.PAD[0] to ShiftRegister.SER) */
59 #define SR_EXP_DATAOUT_PORT PA
60 #define SR_EXP_DATAOUT_PIN 12
61 #define SR_EXP_DATAOUT_MUX 2
62 /* Shift Register SPI Serial Clock configuration (MCU.SERCOMx.PAD[1] to ShiftRegister.SRCLK) */
63 #define SR_EXP_SCLK_PORT PA
64 #define SR_EXP_SCLK_PIN 13
65 #define SR_EXP_SCLK_MUX 2
67 /* Debug LED (Small LED Located near MCU) */
68 #define DEBUG_LED_ENABLE 1
69 #define DEBUG_LED_PORT PA
70 #define DEBUG_LED_PIN 27
72 /* Additional debugging ports */
74 #define DEBUG_PORT1_ENABLE 1
75 #define DEBUG_PORT1_PORT PB
76 #define DEBUG_PORT1_PIN 3
78 #define DEBUG_PORT2_ENABLE 1
79 #define DEBUG_PORT2_PORT PB
80 #define DEBUG_PORT2_PIN 17
82 #define DEBUG_PORT3_ENABLE 1
83 #define DEBUG_PORT3_PORT PA
84 #define DEBUG_PORT3_PIN 20
86 /* Debug Boot Tracing - During boot sequence, ground this pin to halt and display debug code using Debug LED */
87 /* This is useful in determining which hardware device may have malfunctioned or is improperly configured */
88 /* Feature is automatically disabled after successful boot */
90 #define DEBUG_BOOT_TRACING_ENABLE 1
91 #define DEBUG_BOOT_TRACING_PORT PB
92 #define DEBUG_BOOT_TRACING_PIN 23
94 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
95 #define DEBOUNCING_DELAY 5
97 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
98 //#define LOCKING_SUPPORT_ENABLE
99 /* Locking resynchronize hack */
100 //#define LOCKING_RESYNC_ENABLE
102 /* Force boot in NKRO mode */
106 * Feature disable options
107 * These options are also useful to firmware size reduction.
110 /* disable debug print */
116 /* disable action features */
117 //#define NO_ACTION_LAYER
118 //#define NO_ACTION_TAPPING
119 //#define NO_ACTION_ONESHOT
120 //#define NO_ACTION_MACRO
121 //#define NO_ACTION_FUNCTION
123 #define RGB_MATRIX_KEYPRESSES
124 #define RGB_MATRIX_LED_PROCESS_LIMIT 15
125 #define RGB_MATRIX_LED_FLUSH_LIMIT 10
127 #include "config_led.h"