config.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #ifndef CONFIG_H
  2. #define CONFIG_H
  3. #include "config_common.h"
  4. /* USB Device descriptor parameter */
  5. #define VENDOR_ID 0xFEEB
  6. #define PRODUCT_ID 0x6060
  7. #define DEVICE_VER 0x0001
  8. #define MANUFACTURER MJT
  9. #define PRODUCT Mitosis
  10. #define DESCRIPTION q.m.k. keyboard firmware for Mitosis
  11. /* key matrix size */
  12. #define MATRIX_ROWS 5
  13. #define MATRIX_COLS 10
  14. // fix iPhone power adapter issue
  15. #define USB_MAX_POWER_CONSUMPTION 50
  16. // #define CATERINA_BOOTLOADER
  17. /* define if matrix has ghost */
  18. //#define MATRIX_HAS_GHOST
  19. /* number of backlight levels */
  20. //#define BACKLIGHT_LEVELS 3
  21. #define ONESHOT_TIMEOUT 500
  22. /* key combination for command */
  23. #define IS_COMMAND() ( \
  24. keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
  25. )
  26. /*
  27. * Feature disable options
  28. * These options are also useful to firmware size reduction.
  29. */
  30. #define PREVENT_STUCK_MODIFIERS
  31. /* disable debug print */
  32. //#define NO_DEBUG
  33. /* disable print */
  34. //#define NO_PRINT
  35. /* disable action features */
  36. //#define NO_ACTION_LAYER
  37. //#define NO_ACTION_TAPPING
  38. //#define NO_ACTION_ONESHOT
  39. //#define NO_ACTION_MACRO
  40. //#define NO_ACTION_FUNCTION
  41. //UART settings for communication with the RF microcontroller
  42. #define SERIAL_UART_BAUD 1000000
  43. #define SERIAL_UART_DATA UDR1
  44. #define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1)
  45. #define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1))
  46. #define SERIAL_UART_RXD_PRESENT (UCSR1A & _BV(RXC1))
  47. #define SERIAL_UART_INIT() do { \
  48. /* baud rate */ \
  49. UBRR1L = SERIAL_UART_UBRR; \
  50. /* baud rate */ \
  51. UBRR1H = SERIAL_UART_UBRR >> 8; \
  52. /* enable TX and RX */ \
  53. UCSR1B = _BV(TXEN1) | _BV(RXEN1); \
  54. /* 8-bit data */ \
  55. UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \
  56. } while(0)
  57. #endif