diff options
Diffstat (limited to 'keyboards/jian/rev1/config.h')
-rw-r--r-- | keyboards/jian/rev1/config.h | 138 |
1 files changed, 138 insertions, 0 deletions
diff --git a/keyboards/jian/rev1/config.h b/keyboards/jian/rev1/config.h new file mode 100644 index 000000000..799a71fc0 --- /dev/null +++ b/keyboards/jian/rev1/config.h | |||
@@ -0,0 +1,138 @@ | |||
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 | #pragma once | ||
19 | |||
20 | #include "config_common.h" | ||
21 | |||
22 | /* USB Device descriptor parameter */ | ||
23 | #define VENDOR_ID 0xC0DE | ||
24 | #define PRODUCT_ID 0x1337 | ||
25 | #define DEVICE_VER 0x0100 | ||
26 | #define MANUFACTURER KgOfHedgehogs | ||
27 | #define PRODUCT Jian | ||
28 | #define DESCRIPTION An ergo split keyboard | ||
29 | |||
30 | /* key matrix size */ | ||
31 | // Rows are doubled-up | ||
32 | #define MATRIX_ROWS 8 | ||
33 | #define MATRIX_COLS 7 | ||
34 | #define DIODE_DIRECTION COL2ROW | ||
35 | |||
36 | // wiring of each half | ||
37 | #define MATRIX_ROW_PINS { D3, D2, E6, B4 } | ||
38 | #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } | ||
39 | |||
40 | /* Use I2C or Serial, not both */ | ||
41 | // #define USE_SERIAL | ||
42 | #define USE_I2C | ||
43 | |||
44 | /* Select hand configuration */ | ||
45 | // #define MASTER_LEFT | ||
46 | // #define MASTER_RIGHT | ||
47 | #define EE_HANDS | ||
48 | |||
49 | // different Jian configs | ||
50 | #define DIPS_ENABLE | ||
51 | #define PHYSICAL_LEDS_ENABLE | ||
52 | #define NUM_LOCK_LED_PIN C6 | ||
53 | #define CAPS_LOCK_LED_PIN D7 | ||
54 | #define SCROLL_LOCK_LED_PIN B5 | ||
55 | |||
56 | // #define NUM_NMOSFET //uncomment this if you using n-mosfet | ||
57 | // #define CAPS_NMOSFET //uncomment this if you using n-mosfet | ||
58 | // #define SCROLL_NMOSFET //uncomment this if you using n-mosfet | ||
59 | |||
60 | // #define NUM_INVERT // uncomment this if you want to reverse logic of numlock | ||
61 | // This will make it light up only when lock is off | ||
62 | // (Doesn't work on mac. There is no num lock, so it will be always off and lit) | ||
63 | |||
64 | #ifdef NUM_NMOSFET | ||
65 | #define RESET_NUM_LOCK_LED() writePinLow(NUM_LOCK_LED_PIN) | ||
66 | #ifdef NUM_INVERT | ||
67 | #define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, !led_state.num_lock) | ||
68 | #else | ||
69 | #define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, led_state.num_lock) | ||
70 | #endif // NUM_INVERT | ||
71 | #else | ||
72 | #define RESET_NUM_LOCK_LED() writePinHigh(NUM_LOCK_LED_PIN) | ||
73 | #ifdef NUM_INVERT | ||
74 | #define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, led_state.num_lock) | ||
75 | #else | ||
76 | #define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, !led_state.num_lock) | ||
77 | #endif // NUM_INVERT | ||
78 | #endif // NUM_NMOSFET | ||
79 | |||
80 | #ifdef CAPS_NMOSFET | ||
81 | #define RESET_CAPS_LOCK_LED() writePinLow(CAPS_LOCK_LED_PIN) | ||
82 | #define UPDATE_CAPS_LOCK_LED() writePin(CAPS_LOCK_LED_PIN, led_state.caps_lock) | ||
83 | #else | ||
84 | #define RESET_CAPS_LOCK_LED() writePinHigh(CAPS_LOCK_LED_PIN) | ||
85 | #define UPDATE_CAPS_LOCK_LED() writePin(CAPS_LOCK_LED_PIN, !led_state.caps_lock) | ||
86 | #endif // CAPS_NMOSFET | ||
87 | |||
88 | #ifdef SCROLL_NMOSFET | ||
89 | #define RESET_SCROLL_LOCK_LED() writePinLow(SCROLL_LOCK_LED_PIN) | ||
90 | #define UPDATE_SCROLL_LOCK_LED() writePin(SCROLL_LOCK_LED_PIN, led_state.scroll_lock) | ||
91 | #else | ||
92 | #define RESET_SCROLL_LOCK_LED() writePinHigh(SCROLL_LOCK_LED_PIN) | ||
93 | #define UPDATE_SCROLL_LOCK_LED() writePin(SCROLL_LOCK_LED_PIN, !led_state.scroll_lock) | ||
94 | #endif // SCROLL_NMOSFET | ||
95 | |||
96 | /* Set 0 if debouncing isn't needed */ | ||
97 | #define DEBOUNCE 5 | ||
98 | |||
99 | #ifdef BACKLIGHT_ENABLE | ||
100 | #define BACKLIGHT_PIN B6 | ||
101 | #define BACKLIGHT_LEVELS 5 | ||
102 | //#define BACKLIGHT_BREATHING //not working with splits right now | ||
103 | #define BREATHING_PERIOD 6 | ||
104 | #endif | ||
105 | |||
106 | /* ws2812 RGB LED */ | ||
107 | #define RGB_DI_PIN D4 | ||
108 | #define RGBLIGHT_TIMER | ||
109 | #define RGBLED_NUM 7 // Number of LEDs | ||
110 | #define RGBLIGHT_ANIMATIONS //not working with splits right now | ||
111 | |||
112 | #define RGBLIGHT_SLEEP | ||
113 | #define RGBLIGHT_SPLIT | ||
114 | |||
115 | #ifndef IOS_DEVICE_ENABLE | ||
116 | #if RGBLED_NUM <= 6 | ||
117 | #define RGBLIGHT_LIMIT_VAL 255 | ||
118 | #else | ||
119 | #define RGBLIGHT_LIMIT_VAL 130 | ||
120 | #endif | ||
121 | #define RGBLIGHT_VAL_STEP 8 | ||
122 | #else | ||
123 | #if RGBLED_NUM <= 6 | ||
124 | #define RGBLIGHT_LIMIT_VAL 90 | ||
125 | #else | ||
126 | #define RGBLIGHT_LIMIT_VAL 45 | ||
127 | #endif | ||
128 | #define RGBLIGHT_VAL_STEP 4 | ||
129 | #endif | ||
130 | #define RGBLIGHT_HUE_STEP 10 | ||
131 | #define RGBLIGHT_SAT_STEP 17 | ||
132 | |||
133 | #if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) | ||
134 | #define USB_MAX_POWER_CONSUMPTION 400 | ||
135 | #else | ||
136 | // iOS device need lessthan 100 | ||
137 | #define USB_MAX_POWER_CONSUMPTION 100 | ||
138 | #endif | ||