]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/treadstone48/rev1/config.h
[Keyboard] add treeadstone48 (#5405)
[qmk_firmware.git] / keyboards / treadstone48 / rev1 / config.h
1 /*
2 Copyright 2012 Jun Wako <wakojun@gmail.com>
3 Copyright 2015 Jack Humbert
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 #ifndef REV1_CONFIG_H
20 #define REV1_CONFIG_H
21
22 /* USB Device descriptor parameter */
23 #define VENDOR_ID       0xFEED
24 #define PRODUCT_ID      0xDFA3
25 #define DEVICE_VER      0x0010
26 #define MANUFACTURER    marksard
27 #define PRODUCT         treadstone48
28 #define DESCRIPTION     Symmetrical staggered 47+1 Keys Keyboard
29
30 #define PREVENT_STUCK_MODIFIERS
31 #define TAPPING_FORCE_HOLD
32 #define TAPPING_TERM 150
33
34 /* Use I2C or Serial */
35 #define USE_I2C
36 #define USE_SERIAL
37 //#define USE_MATRIX_I2C
38
39 /* Select hand configuration */
40 #define MASTER_LEFT
41 // #define MASTER_RIGHT
42 // #define EE_HANDS
43
44 // OLED support
45 //      see ./rules.mk: OLED_ENABLE=yes or no
46 #ifdef OLED_ENABLE
47   #define SSD1306OLED
48 #endif
49
50 /* key matrix size */
51 // Rows are doubled-up
52 #define MATRIX_ROWS 16
53 #define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3, B2, B6 }
54
55 // wiring of each half
56 #define MATRIX_COLS 6
57 #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 }
58
59 /* define if matrix has ghost */
60 //#define MATRIX_HAS_GHOST
61
62 /* number of backlight levels */
63 // #define BACKLIGHT_LEVELS 3
64
65 /* Set 0 if debouncing isn't needed */
66 #define DEBOUNCING_DELAY 5
67
68 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
69 //#define LOCKING_SUPPORT_ENABLE
70 /* Locking resynchronize hack */
71 //#define LOCKING_RESYNC_ENABLE
72
73 /* key combination for command */
74 #define IS_COMMAND() ( \
75     keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
76 )
77
78 /* ws2812 RGB LED */
79 #define RGB_DI_PIN D3
80 #define RGBLIGHT_TIMER
81 //#define RGBLED_NUM 12    // Number of LEDs. see ./keymaps/default/config.h
82 #define ws2812_PORTREG  PORTD
83 #define ws2812_DDRREG   DDRD
84
85 // treadstone48 keyboard RGB LED support
86 //#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no
87 //    see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes
88 #define RGBLED_NUM 12
89
90 #ifndef IOS_DEVICE_ENABLE
91   #define RGBLIGHT_LIMIT_VAL 180
92   #define RGBLIGHT_VAL_STEP 17
93 #else
94   #define RGBLIGHT_LIMIT_VAL 50
95   #define RGBLIGHT_VAL_STEP 4
96 #endif
97 #define RGBLIGHT_HUE_STEP 10
98 #define RGBLIGHT_SAT_STEP 17
99
100 #if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
101 // USB_MAX_POWER_CONSUMPTION value for treadstone48 keyboard
102 //  120  RGBoff, OLEDoff
103 //  120  OLED
104 //  330  RGB 6
105 //  300  RGB 32
106 //  310  OLED & RGB 32
107   #define USB_MAX_POWER_CONSUMPTION 400
108 #else
109   // fix iPhone and iPad power adapter issue
110   // iOS device need lessthan 100
111   #define USB_MAX_POWER_CONSUMPTION 100
112 #endif
113
114 /*
115  * Feature disable options
116  *  These options are also useful to firmware size reduction.
117  */
118
119 /* disable debug print */
120 // #define NO_DEBUG
121
122 /* disable print */
123 // #define NO_PRINT
124
125 /* disable action features */
126 //#define NO_ACTION_LAYER
127 //#define NO_ACTION_TAPPING
128 //#define NO_ACTION_ONESHOT
129 //#define NO_ACTION_MACRO
130 //#define NO_ACTION_FUNCTION
131
132
133 #endif