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.

54 lines
1.6 KiB

  1. /* Copyright 2023 ArthurCyy <https://github.com/ArthurCyy>
  2. *
  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. #define POWER_SWITCH_PIN B0
  18. /* 16 with dummy columns for shift registers */
  19. #define SHR_SERIES_NUM 2
  20. #define SHR_CLOCK_PIN A0
  21. #define SHR_DATA_PIN A1
  22. #define SHR_LATCH_PIN C15
  23. /* MIIIW Protocol Driver */
  24. #define MWPROTO_BITRATE 256000
  25. #define MWPROTO_DRIVER SD1
  26. #define MWPROTO_TX_PIN A9
  27. #define MWPROTO_TX_PAL_MODE 1
  28. #define MWPROTO_RX_PIN A10
  29. #define MWPROTO_RX_PAL_MODE 1
  30. #define MWPROTO_WAKEUP_PIN A15
  31. #define MWPROTO_STATUS_PIN C13
  32. /* RGB Matrix config */
  33. #define RGB_EN_PIN A8
  34. // PWM RGB Underglow Defines
  35. #define WS2812_BYTE_ORDER WS2812_BYTE_ORDER_GRB
  36. #define WS2812_TRST_US 200
  37. // I2C config
  38. #define I2C_DRIVER I2CD1
  39. #define I2C1_SCL_PIN B6
  40. #define I2C1_SDA_PIN B7
  41. #define I2C1_SCL_PAL_MODE 1
  42. #define I2C1_SDA_PAL_MODE 1
  43. #define I2C1_TIMINGR_PRESC 0x00U
  44. #define I2C1_TIMINGR_SCLDEL 0x03U
  45. #define I2C1_TIMINGR_SDADEL 0x01U
  46. #define I2C1_TIMINGR_SCLH 0x03U
  47. #define I2C1_TIMINGR_SCLL 0x09U