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