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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

config.h 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /*
  2. Copyright 2014 Kai Ryu <[email protected]>
  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 0x16c0
  18. #define PRODUCT_ID 0x27db
  19. #define DEVICE_VER 0x1115
  20. #define MANUFACTURER 3beeline
  21. #define PRODUCT TentaPad FX
  22. #define DESCRIPTION t.m.k. keyboard firmware for TentaPad FX
  23. /* key matrix size */
  24. #define MATRIX_ROWS 1
  25. #define MATRIX_COLS 5
  26. /* keymap in eeprom */
  27. #define FN_ACTIONS_COUNT 32
  28. #define KEYMAPS_COUNT 32
  29. /* define if matrix has ghost */
  30. //#define MATRIX_HAS_GHOST
  31. /* Set 0 if debouncing isn't needed */
  32. #define DEBOUNCE 5
  33. /* number of backlight levels */
  34. #define BACKLIGHT_LEVELS 8
  35. /* number of LEDs */
  36. #define LED_COUNT 4
  37. /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
  38. #define LOCKING_SUPPORT_ENABLE
  39. /* Locking resynchronize hack */
  40. #define LOCKING_RESYNC_ENABLE
  41. /* key combination for command */
  42. #define IS_COMMAND() ( \
  43. keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
  44. )
  45. /* PS2 mouse support */
  46. #ifdef PS2_MOUSE_ENABLE
  47. #define PS2_CLOCK_PORT PORTD
  48. #define PS2_CLOCK_PIN PIND
  49. #define PS2_CLOCK_DDR DDRD
  50. #define PS2_CLOCK_BIT PD5
  51. #define PS2_DATA_PORT PORTD
  52. #define PS2_DATA_PIN PIND
  53. #define PS2_DATA_DDR DDRD
  54. #define PS2_DATA_BIT PD2
  55. #ifdef PS2_USE_USART
  56. #define PS2_USART_INIT() do { \
  57. PS2_CLOCK_DDR &= ~(1<<PS2_CLOCK_BIT); \
  58. PS2_DATA_DDR &= ~(1<<PS2_DATA_BIT); \
  59. UCSR1C = ((1 << UMSEL10) | \
  60. (3 << UPM10) | \
  61. (0 << USBS1) | \
  62. (3 << UCSZ10) | \
  63. (0 << UCPOL1)); \
  64. UCSR1A = 0; \
  65. UBRR1H = 0; \
  66. UBRR1L = 0; \
  67. } while (0)
  68. #define PS2_USART_RX_INT_ON() do { \
  69. UCSR1B = ((1 << RXCIE1) | \
  70. (1 << RXEN1)); \
  71. } while (0)
  72. #define PS2_USART_RX_POLL_ON() do { \
  73. UCSR1B = (1 << RXEN1); \
  74. } while (0)
  75. #define PS2_USART_OFF() do { \
  76. UCSR1C = 0; \
  77. UCSR1B &= ~((1 << RXEN1) | \
  78. (1 << TXEN1)); \
  79. } while (0)
  80. #define PS2_USART_RX_READY (UCSR1A & (1<<RXC1))
  81. #define PS2_USART_RX_DATA UDR1
  82. #define PS2_USART_ERROR (UCSR1A & ((1<<FE1) | (1<<DOR1) | (1<<UPE1)))
  83. #define PS2_USART_RX_VECT USART1_RX_vect
  84. #endif
  85. #endif
  86. /*
  87. * Feature disable options
  88. * These options are also useful to firmware size reduction.
  89. */
  90. /* disable debug print */
  91. //#define NO_DEBUG
  92. /* disable print */
  93. //#define NO_PRINT
  94. /* disable action features */
  95. //#define NO_ACTION_LAYER
  96. //#define NO_ACTION_TAPPING
  97. //#define NO_ACTION_ONESHOT
  98. //#define NO_ACTION_MACRO
  99. //#define NO_ACTION_FUNCTION
  100. #endif