Commit | Line | Data |
---|---|---|
30680c6e | 1 | /* |
2 | Copyright 2015 Jun Wako <wakojun@gmail.com> | |
3 | ||
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. | |
8 | ||
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. | |
13 | ||
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/>. | |
16 | */ | |
17 | ||
18 | #pragma once | |
19 | ||
20 | #include "config_common.h" | |
21 | ||
22 | /* USB Device descriptor parameter */ | |
23 | #define VENDOR_ID 0x04D8 | |
24 | #define PRODUCT_ID 0xEED2 | |
25 | #define DEVICE_VER 0x0101 | |
26 | ||
27 | #define MANUFACTURER "Massdrop Inc." | |
28 | #define PRODUCT "CTRL Keyboard" | |
29 | #define SERIAL_NUM "Unavailable" | |
30 | ||
31 | /* key matrix size */ | |
32 | #define MATRIX_ROWS 11 | |
33 | #define MATRIX_COLS 8 | |
34 | ||
4a5e68f4 | 35 | /* MCU Port name definitions */ |
30680c6e | 36 | #define PA 0 |
37 | #define PB 1 | |
38 | ||
4a5e68f4 | 39 | /* Port and Pin definition of key row hardware configuration */ |
30680c6e | 40 | #define MATRIX_ROW_PORTS PB, PB, PB, PB, PB, PB, PA, PA, PB, PB, PB |
41 | #define MATRIX_ROW_PINS 4, 5, 6, 7, 8, 9, 10, 11, 10, 11, 12 | |
42 | ||
4a5e68f4 | 43 | /* Port and Pin definition of key column hardware configuration */ |
30680c6e | 44 | #define MATRIX_COL_PORTS PA, PA, PA, PA, PA, PA, PA, PA |
45 | #define MATRIX_COL_PINS 0, 1, 2, 3, 4, 5, 6, 7 | |
46 | ||
4a5e68f4 | 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 | |
66 | ||
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 | |
71 | ||
72 | /* Additional debugging ports */ | |
73 | /* PCB M21 */ | |
74 | #define DEBUG_PORT1_ENABLE 1 | |
75 | #define DEBUG_PORT1_PORT PB | |
76 | #define DEBUG_PORT1_PIN 3 | |
77 | /* PCB M23 */ | |
78 | #define DEBUG_PORT2_ENABLE 1 | |
79 | #define DEBUG_PORT2_PORT PB | |
80 | #define DEBUG_PORT2_PIN 17 | |
81 | /* PCB M25 */ | |
82 | #define DEBUG_PORT3_ENABLE 1 | |
83 | #define DEBUG_PORT3_PORT PA | |
84 | #define DEBUG_PORT3_PIN 20 | |
85 | ||
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 */ | |
89 | /* PCB M27 */ | |
90 | #define DEBUG_BOOT_TRACING_ENABLE 1 | |
91 | #define DEBUG_BOOT_TRACING_PORT PB | |
92 | #define DEBUG_BOOT_TRACING_PIN 23 | |
30680c6e | 93 | |
94 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | |
95 | #define DEBOUNCING_DELAY 5 | |
96 | ||
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 | |
101 | ||
30680c6e | 102 | /* Force boot in NKRO mode */ |
103 | //#define FORCE_NKRO | |
104 | ||
105 | /* | |
106 | * Feature disable options | |
107 | * These options are also useful to firmware size reduction. | |
108 | */ | |
109 | ||
110 | /* disable debug print */ | |
111 | //#define NO_DEBUG | |
112 | ||
113 | /* disable print */ | |
114 | //#define NO_PRINT | |
115 | ||
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 | |
763b26cd DP |
122 | |
123 | #define RGB_MATRIX_KEYPRESSES | |
124 | #define RGB_MATRIX_LED_PROCESS_LIMIT 15 | |
125 | #define RGB_MATRIX_LED_FLUSH_LIMIT 10 | |
763b26cd DP |
126 | |
127 | #include "config_led.h" |