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.

77 lines
2.4 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. /* Copyright 2021 Batuhan Başerdem
  2. * <baserdem.batuhan@gmail.com> @bbaserdem
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. #pragma once
  18. // Split definition; use the following to flash;
  19. // pro-micro: avrdude-split-left/right
  20. // elite-c: dfu-split-left/right
  21. // Code pertaining to Corne ARM; from Waffle's keymap
  22. #ifdef KEYBOARD_crkbd_rev1
  23. // Use EE_HANDS to determine handedness
  24. # define EE_HANDS
  25. // Rebrand the PCB
  26. # undef PRODUCT
  27. # define PRODUCT Protorne Keyboard
  28. # undef MANUFACTURER
  29. # define MANUFACTURER Waffles
  30. // Remove OLED definitions?
  31. # undef USE_I2C
  32. # undef SSD1306OLED
  33. // Audio output on pin A5 (actualy will be output on B1 using keymap init)
  34. # ifdef AUDIO_ENABLE
  35. # define AUDIO_PIN A5
  36. # define MUSIC_MAP
  37. # endif
  38. // Set serial pin as D3 for sure
  39. # undef SOFT_SERIAL_PIN
  40. # define SOFT_SERIAL_PIN D3
  41. # define SERIAL_USART_SPEED 921600
  42. # define SERIAL_USART_DRIVER SD1
  43. # define SERIAL_USART_TX_PAL_MODE 7
  44. // Things to make RGB matrix work on the waffle board
  45. # undef RGBLED_NUM
  46. # define RGBLED_NUM 54
  47. # undef RGB_DI_PIN
  48. # define RGB_DI_PIN B5
  49. # ifdef RGB_MATRIX_ENABLE
  50. # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 100
  51. # define RGB_MATRIX_SPLIT { 27, 27 }
  52. # endif
  53. # define WS2812_PWM_DRIVER PWMD3
  54. # define WS2812_PWM_CHANNEL 3
  55. # define WS2812_PWM_PAL_MODE 2
  56. # define WS2812_DMA_STREAM STM32_DMA1_STREAM3
  57. # define WS2812_DMA_CHANNEL 3
  58. // OLED related code
  59. # ifdef OLED_ENABLE
  60. # define OLED_UPDATE_INTERVAL 100
  61. # endif
  62. // Encoder definitons
  63. # define ENCODERS_PAD_A { B2 }
  64. # define ENCODERS_PAD_B { B6 }
  65. # define ENCODER_RESOLUTIONS { 4 }
  66. # define ENCODERS_PAD_A_RIGHT { B2 }
  67. # define ENCODERS_PAD_B_RIGHT { B6 }
  68. # define ENCODER_RESOLUTIONS_RIGHT { 2 }
  69. #endif