Keyboard firmwares for Atmel AVR and Cortex-M
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

config.h 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. /*
  2. Copyright 2012 Jun Wako <wakojun@gmail.com>
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation, either version 2 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. */
  14. #ifndef CONFIG_H
  15. #define CONFIG_H
  16. /* USB Device descriptor parameter */
  17. #define VENDOR_ID 0xFEED
  18. #define PRODUCT_ID 0x0A0C
  19. #define DEVICE_VER 0x0F00
  20. #define MANUFACTURER di0ib
  21. #define PRODUCT The foobar Keyboard
  22. #define DESCRIPTION A split 30 key keyboard
  23. /* key matrix size */
  24. #define ROWS_PER_HAND 3
  25. #define MATRIX_COLS 5
  26. #define MATRIX_ROWS ROWS_PER_HAND*2
  27. #define MATRIX_COL_PINS { F6, F7, B1, B3, B2 }
  28. #define MATRIX_ROW_PINS { D7, E6, B4 }
  29. /* use i2c instead of serial */
  30. //#define USE_I2C
  31. //#define I2C_WRITE_TEST_CODE
  32. /* define if matrix has ghost */
  33. //#define MATRIX_HAS_GHOST
  34. /* Set 0 if debouncing isn't needed */
  35. #define DEBOUNCE 5
  36. /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
  37. #define LOCKING_SUPPORT_ENABLE
  38. /* Locking resynchronize hack */
  39. #define LOCKING_RESYNC_ENABLE
  40. /*
  41. * Feature disable options
  42. * These options are also useful to firmware size reduction.
  43. */
  44. /* disable debug print */
  45. //#define NO_DEBUG
  46. /* disable print */
  47. //#define NO_PRINT
  48. /* disable action features */
  49. //#define NO_ACTION_LAYER
  50. //#define NO_ACTION_TAPPING
  51. //#define NO_ACTION_ONESHOT
  52. //#define NO_ACTION_MACRO
  53. //#define NO_ACTION_FUNCTION
  54. /* key combination for command */
  55. #define IS_COMMAND() ( \
  56. keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT) | MOD_BIT(KC_LGUI)) \
  57. )
  58. /* ws2812 RGB LED */
  59. #define ws2812_PORTREG PORTB
  60. #define ws2812_DDRREG DDRB
  61. #define ws2812_pin PB6
  62. #define RGBLED_NUM 4 // Number of LEDs
  63. #ifndef RGBLIGHT_HUE_STEP
  64. #define RGBLIGHT_HUE_STEP 10
  65. #endif
  66. #ifndef RGBLIGHT_SAT_STEP
  67. #define RGBLIGHT_SAT_STEP 17
  68. #endif
  69. #ifndef RGBLIGHT_VAL_STEP
  70. #define RGBLIGHT_VAL_STEP 17
  71. #endif
  72. /* boot magic key */
  73. #define BOOTMAGIC_KEY_SALT KC_Q
  74. #ifdef SPACE_ON_LEFT_HALF
  75. #define BOOTMAGIC_KEY_DEFAULT_LAYER_0 KC_Z
  76. #define BOOTMAGIC_KEY_DEFAULT_LAYER_1 KC_X
  77. #define BOOTMAGIC_KEY_DEFAULT_LAYER_2 KC_C
  78. #define BOOTMAGIC_HOST_NKRO KC_V
  79. #else
  80. #define BOOTMAGIC_KEY_DEFAULT_LAYER_0 KC_M
  81. #define BOOTMAGIC_KEY_DEFAULT_LAYER_1 KC_COMM
  82. #define BOOTMAGIC_KEY_DEFAULT_LAYER_2 KC_DOT
  83. #define BOOTMAGIC_HOST_NKRO KC_N
  84. #endif
  85. /* Mousekey settings */
  86. #define MOUSEKEY_MOVE_MAX 127 // default 127
  87. #define MOUSEKEY_WHEEL_MAX 127 // default 127
  88. #define MOUSEKEY_MOVE_DELTA 5 // default 5
  89. #define MOUSEKEY_WHEEL_DELTA 1 // default 1
  90. #define MOUSEKEY_DELAY 300 // default 300
  91. #define MOUSEKEY_INTERVAL 50 // default 50
  92. #define MOUSEKEY_MAX_SPEED 5 // default 10
  93. #define MOUSEKEY_TIME_TO_MAX 10 // default 20
  94. #define MOUSEKEY_WHEEL_MAX_SPEED 8 // default 8
  95. #define MOUSEKEY_WHEEL_TIME_TO_MAX 40 // default 40
  96. /* Action tapping settings */
  97. #define TAPPING_TERM 200 // default 200
  98. /* #define TAPPING_TOGGLE 2 // default 5 */
  99. /* #define ONESHOT_TIMEOUT 5000 // default undefined */
  100. #define ONESHOT_TAP_TOGGLE 2
  101. #endif