logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

config.h (2832B)


  1. /*
  2. Copyright 2012 Jun Wako <wakojun@gmail.com>
  3. Copyright 2015 Jack Humbert
  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. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. #pragma once
  16. //#define EE_HANDS
  17. #define PHYSICAL_LEDS_ENABLE
  18. #define IOS_DEVICE_ENABLE
  19. #define RGBLIGHT_TIMER
  20. #if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
  21. #define USB_MAX_POWER_CONSUMPTION 400
  22. #else
  23. // iOS device need lessthan 100
  24. #define USB_MAX_POWER_CONSUMPTION 100
  25. #endif
  26. #define NUM_LOCK_LED_PIN D7
  27. #define CAPS_LOCK_LED_PIN B5
  28. #define SCROLL_LOCK_LED_PIN B6
  29. // #define NUM_NMOSFET //uncomment this if you using n-mosfet
  30. // #define CAPS_NMOSFET //uncomment this if you using n-mosfet
  31. // #define SCROLL_NMOSFET //uncomment this if you using n-mosfet
  32. // #define NUM_INVERT // uncomment this if you want to reverse logic of numlock
  33. // This will make it light up only when lock is off
  34. // (Doesn't work on mac. There is no num lock, so it will be always off and lit)
  35. #ifdef NUM_NMOSFET
  36. #define RESET_NUM_LOCK_LED() gpio_write_pin_low(NUM_LOCK_LED_PIN)
  37. #ifdef NUM_INVERT
  38. #define UPDATE_NUM_LOCK_LED() gpio_write_pin(NUM_LOCK_LED_PIN, !led_state.num_lock)
  39. #else
  40. #define UPDATE_NUM_LOCK_LED() gpio_write_pin(NUM_LOCK_LED_PIN, led_state.num_lock)
  41. #endif // NUM_INVERT
  42. #else
  43. #define RESET_NUM_LOCK_LED() gpio_write_pin_high(NUM_LOCK_LED_PIN)
  44. #ifdef NUM_INVERT
  45. #define UPDATE_NUM_LOCK_LED() gpio_write_pin(NUM_LOCK_LED_PIN, led_state.num_lock)
  46. #else
  47. #define UPDATE_NUM_LOCK_LED() gpio_write_pin(NUM_LOCK_LED_PIN, !led_state.num_lock)
  48. #endif // NUM_INVERT
  49. #endif // NUM_NMOSFET
  50. #ifdef CAPS_NMOSFET
  51. #define RESET_CAPS_LOCK_LED() gpio_write_pin_low(CAPS_LOCK_LED_PIN)
  52. #define UPDATE_CAPS_LOCK_LED() gpio_write_pin(CAPS_LOCK_LED_PIN, led_state.caps_lock)
  53. #else
  54. #define RESET_CAPS_LOCK_LED() gpio_write_pin_high(CAPS_LOCK_LED_PIN)
  55. #define UPDATE_CAPS_LOCK_LED() gpio_write_pin(CAPS_LOCK_LED_PIN, !led_state.caps_lock)
  56. #endif // CAPS_NMOSFET
  57. #ifdef SCROLL_NMOSFET
  58. #define RESET_SCROLL_LOCK_LED() gpio_write_pin_low(SCROLL_LOCK_LED_PIN)
  59. #define UPDATE_SCROLL_LOCK_LED() gpio_write_pin(SCROLL_LOCK_LED_PIN, led_state.scroll_lock)
  60. #else
  61. #define RESET_SCROLL_LOCK_LED() gpio_write_pin_high(SCROLL_LOCK_LED_PIN)
  62. #define UPDATE_SCROLL_LOCK_LED() gpio_write_pin(SCROLL_LOCK_LED_PIN, !led_state.scroll_lock)
  63. #endif // SCROLL_NMOSFET