qmk_firmware

QMK firmware for my keyboards (Corne, Sweep Ferris) and trackball (Ploopy Adept)
Log | Files | Refs | Submodules | LICENSE

config.h (2878B)


      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 #define USE_I2C
     21 
     22 /* Select hand configuration */
     23 #define EE_HANDS
     24 
     25 // different Jian configs
     26 #define PHYSICAL_LEDS_ENABLE
     27 #define NUM_LOCK_LED_PIN C6
     28 #define CAPS_LOCK_LED_PIN D7
     29 #define SCROLL_LOCK_LED_PIN B5
     30 
     31 // #define NUM_NMOSFET  //uncomment this if you using n-mosfet
     32 // #define CAPS_NMOSFET  //uncomment this if you using n-mosfet
     33 // #define SCROLL_NMOSFET  //uncomment this if you using n-mosfet
     34 
     35 // #define NUM_INVERT // uncomment this if you want to reverse logic of numlock
     36 // This will make it light up only when lock is off
     37 // (Doesn't work on mac. There is no num lock, so it will be always off and lit)
     38 
     39 #ifdef NUM_NMOSFET
     40 #define RESET_NUM_LOCK_LED() gpio_write_pin_low(NUM_LOCK_LED_PIN)
     41 #ifdef NUM_INVERT
     42 #define UPDATE_NUM_LOCK_LED() gpio_write_pin(NUM_LOCK_LED_PIN, !led_state.num_lock)
     43 #else
     44 #define UPDATE_NUM_LOCK_LED() gpio_write_pin(NUM_LOCK_LED_PIN, led_state.num_lock)
     45 #endif // NUM_INVERT
     46 #else
     47 #define RESET_NUM_LOCK_LED() gpio_write_pin_high(NUM_LOCK_LED_PIN)
     48 #ifdef NUM_INVERT
     49 #define UPDATE_NUM_LOCK_LED() gpio_write_pin(NUM_LOCK_LED_PIN, led_state.num_lock)
     50 #else
     51 #define UPDATE_NUM_LOCK_LED() gpio_write_pin(NUM_LOCK_LED_PIN, !led_state.num_lock)
     52 #endif // NUM_INVERT
     53 #endif // NUM_NMOSFET
     54 
     55 #ifdef CAPS_NMOSFET
     56 #define RESET_CAPS_LOCK_LED() gpio_write_pin_low(CAPS_LOCK_LED_PIN)
     57 #define UPDATE_CAPS_LOCK_LED() gpio_write_pin(CAPS_LOCK_LED_PIN, led_state.caps_lock)
     58 #else
     59 #define RESET_CAPS_LOCK_LED() gpio_write_pin_high(CAPS_LOCK_LED_PIN)
     60 #define UPDATE_CAPS_LOCK_LED() gpio_write_pin(CAPS_LOCK_LED_PIN, !led_state.caps_lock)
     61 #endif // CAPS_NMOSFET
     62 
     63 #ifdef SCROLL_NMOSFET
     64 #define RESET_SCROLL_LOCK_LED() gpio_write_pin_low(SCROLL_LOCK_LED_PIN)
     65 #define UPDATE_SCROLL_LOCK_LED() gpio_write_pin(SCROLL_LOCK_LED_PIN, led_state.scroll_lock)
     66 #else
     67 #define RESET_SCROLL_LOCK_LED() gpio_write_pin_high(SCROLL_LOCK_LED_PIN)
     68 #define UPDATE_SCROLL_LOCK_LED() gpio_write_pin(SCROLL_LOCK_LED_PIN, !led_state.scroll_lock)
     69 #endif // SCROLL_NMOSFET
     70 
     71 #define RGBLIGHT_TIMER
     72 
     73 #if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
     74 #define USB_MAX_POWER_CONSUMPTION 400
     75 #else
     76 // iOS device need lessthan 100
     77 #define USB_MAX_POWER_CONSUMPTION 100
     78 #endif