config.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /*
  2. * Copyright 2020 Michael Schwingen
  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. *
  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. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #pragma once
  17. #include "config_common.h"
  18. /* USB Device descriptor parameter */
  19. #define VENDOR_ID 0xFEED
  20. #define PRODUCT_ID 0x558E
  21. #define DEVICE_VER 0x0001
  22. #define MANUFACTURER mschwingen
  23. #define PRODUCT IBM Model M 101/102
  24. /* key matrix size */
  25. #define MATRIX_ROWS 16
  26. #define MATRIX_COLS 8
  27. /* pins for external shift registers */
  28. #define SR_LOAD_PIN B0
  29. #define SR_CLK_PIN B1
  30. #define SR_DIN_PIN B3
  31. #define SR_DOUT_PIN B2
  32. /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed (5 is default) */
  33. #define DEBOUNCE 5
  34. /*
  35. * Feature disable options
  36. * These options are also useful to firmware size reduction.
  37. */
  38. /* disable debug print */
  39. //#define NO_DEBUG
  40. /* disable print */
  41. //#define NO_PRINT
  42. #define NORMAL_PRINT
  43. //#define USER_PRINT
  44. /* disable action features */
  45. //#define NO_ACTION_LAYER
  46. //#define NO_ACTION_TAPPING
  47. //#define NO_ACTION_ONESHOT
  48. //#define NO_ACTION_MACRO
  49. //#define NO_ACTION_FUNCTION
  50. //#define DEBUG_MATRIX_SCAN_RATE
  51. #define DYNAMIC_MACRO_NO_NESTING
  52. #define QMK_LED E6
  53. #define MODELM_LED1 B5
  54. #define MODELM_LED2 B6
  55. #define MODELM_LED3 D0
  56. #if defined(KEYBOARD_mschwingen_modelm_led_wired)
  57. # define MODELM_LED_CAPSLOCK MODELM_LED1
  58. # define MODELM_LED_SCROLLOCK MODELM_LED2
  59. # define MODELM_LED_NUMLOCK MODELM_LED3
  60. #elif defined(KEYBOARD_mschwingen_modelm_led_ffc)
  61. # define MODELM_LED_CAPSLOCK MODELM_LED2
  62. # define MODELM_LED_SCROLLOCK MODELM_LED3
  63. # define MODELM_LED_NUMLOCK MODELM_LED1
  64. #elif defined(KEYBOARD_mschwingen_modelm_led_ws2812)
  65. #else
  66. # error one of MODELM_LEDS_FFC, MODELM_LEDS_WIRED or MODELM_LEDS_WS2812 must be set!
  67. #endif
  68. // 3* WS2812 LEDs instead of singlecolor GPIO LEDs
  69. #define RGB_DI_PIN B6
  70. #define RGBLED_NUM 3
  71. // disabled, needs PCB patch.
  72. //#define AUDIO_PIN C6
  73. //#define NO_MUSIC_MODE