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.

65 lines
1.8 KiB

  1. /*
  2. Copyright 2019 @filoxo
  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. #pragma once
  15. #include "config_common.h"
  16. /* USB Device descriptor parameter */
  17. #define VENDOR_ID 0xFEED
  18. #define PRODUCT_ID 0xACC8
  19. #define DEVICE_VER 0x0001
  20. #define MANUFACTURER Keyhive
  21. #define PRODUCT Honeycomb Macropad
  22. #define DESCRIPTION QMK firmware for Honeycomb Macropad
  23. /* key matrix size */
  24. #define MATRIX_ROWS 1
  25. #define MATRIX_COLS 16
  26. #define ONESHOT_TIMEOUT 500
  27. /* disable debug print */
  28. //#define NO_DEBUG
  29. /* disable print */
  30. //#define NO_PRINT
  31. /* disable action features */
  32. //#define NO_ACTION_LAYER
  33. //#define NO_ACTION_TAPPING
  34. //#define NO_ACTION_ONESHOT
  35. //#define NO_ACTION_MACRO
  36. //#define NO_ACTION_FUNCTION
  37. //UART settings for communication with the RF microcontroller
  38. #define SERIAL_UART_BAUD 1000000
  39. #define SERIAL_UART_DATA UDR1
  40. #define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1)
  41. #define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1))
  42. #define SERIAL_UART_RXD_PRESENT (UCSR1A & _BV(RXC1))
  43. #define SERIAL_UART_INIT() do { \
  44. /* baud rate */ \
  45. UBRR1L = SERIAL_UART_UBRR; \
  46. /* baud rate */ \
  47. UBRR1H = SERIAL_UART_UBRR >> 8; \
  48. /* enable TX and RX */ \
  49. UCSR1B = _BV(TXEN1) | _BV(RXEN1); \
  50. /* 8-bit data */ \
  51. UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \
  52. } while(0)