logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

config.h (2636B)


  1. /* Copyright 2023 David Hoelscher (@customMK)
  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. // No VBUS sense needed
  18. #define BOARD_OTG_NOVBUSSENS 1
  19. #define STM32_LSECLK 32768
  20. #define MATRIX_ROWS 5
  21. #define MATRIX_COLS 16
  22. #define MATRIX_ROW_PINS { A8, A1, A2, B1, A7 }
  23. // FRAM configuration
  24. #define EEPROM_SPI_MB85RS64V
  25. #define EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN A0
  26. #define EXTERNAL_EEPROM_SPI_CLOCK_DIVISOR 4 // 48MHz / 4 = 12MHz; max supported by MB85R64 is 20MHz
  27. // External flash configuration
  28. #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN B12
  29. #define EXTERNAL_FLASH_SPI_CLOCK_DIVISOR 1 // 48MHz; max supported by W25Q128JV is 133MHz
  30. #define EXTERNAL_FLASH_SIZE (16 * 1024 * 1024) //128Mbit or 16MByte
  31. #define EXTERNAL_FLASH_SPI_TIMEOUT 200000 //datasheet max is 200seconds for flash chip erase
  32. // SPI Configuration
  33. #define SPI_DRIVER SPID1
  34. #define SPI_SCK_PIN B3
  35. #define SPI_SCK_PAL_MODE 5
  36. #define SPI_MOSI_PIN B5
  37. #define SPI_MOSI_PAL_MODE 5
  38. #define SPI_MISO_PIN B4
  39. #define SPI_MISO_PAL_MODE 5
  40. // SPI LCD Configuration
  41. #define LCD_RST_PIN B2
  42. #define LCD_CS_PIN A9
  43. #define LCD_DC_PIN B0
  44. #ifndef LCD_ACTIVITY_TIMEOUT
  45. #define LCD_ACTIVITY_TIMEOUT 30000
  46. #endif
  47. // I2C OLED Configuration
  48. #define I2C1_SCL_PIN B6
  49. #define I2C1_SDA_PIN B9
  50. #define I2C1_CLOCK_SPEED 400000
  51. #define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2
  52. #define OLED_DISABLE_TIMEOUT
  53. #define COL_SHIFT_IN_PIN B14
  54. #define COL_SHIFT_CLK_PIN B15
  55. #define QUANTUM_PAINTER_SUPPORTS_256_PALETTE TRUE
  56. #define QUANTUM_PAINTER_SUPPORTS_NATIVE_COLORS TRUE
  57. #define OLED_UPDATE_INTERVAL 66
  58. #define BACKLIGHT_PWM_DRIVER PWMD3
  59. #define BACKLIGHT_PWM_CHANNEL 1
  60. #define BACKLIGHT_PAL_MODE 2
  61. #define WS2812_PWM_DRIVER PWMD1
  62. #define WS2812_PWM_CHANNEL 3
  63. #define WS2812_PWM_PAL_MODE 1
  64. #define WS2812_PWM_DMA_STREAM STM32_DMA2_STREAM5
  65. #define WS2812_PWM_DMA_CHANNEL 6
  66. #define TAP_CODE_DELAY 10
  67. #define AUDIO_PIN B8
  68. #define AUDIO_PWM_DRIVER PWMD4
  69. #define AUDIO_PWM_CHANNEL 3
  70. #define AUDIO_PWM_PAL_MODE 2
  71. #define AUDIO_STATE_TIMER GPTD5
  72. #define AUDIO_INIT_DELAY