logo

qmk_firmware

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

config.h (2708B)


  1. /*
  2. Copyright 2012 Jun Wako <wakojun@gmail.com>
  3. Copyright 2015 Jack Humbert
  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. 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. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. #pragma once
  16. #define USER_BUTTON_PIN C13
  17. #define DEBUG_LED_PIN B2
  18. #define USB_VBUS_PIN B10
  19. #ifdef USE_USB_OTG_HS_PORT
  20. # define USB_DRIVER USBD2
  21. #endif
  22. // WS2812 RGB LED strip input and number of LEDs
  23. #define WS2812_PWM_DRIVER PWMD3
  24. #define WS2812_PWM_CHANNEL 1
  25. #define WS2812_PWM_PAL_MODE 2
  26. #define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2
  27. #define WS2812_PWM_DMA_CHANNEL 5
  28. #define WS2812_EXTERNAL_PULLUP
  29. #define BACKLIGHT_PWM_DRIVER PWMD8
  30. #define BACKLIGHT_PWM_CHANNEL 2
  31. #define BACKLIGHT_PAL_MODE 3
  32. /* Audio config */
  33. #define AUDIO_PIN A4
  34. #define AUDIO_PIN_ALT A5
  35. #define AUDIO_PIN_ALT_AS_NEGATIVE
  36. /* serial.c configuration for split keyboard */
  37. #define SERIAL_USART_DRIVER SD1
  38. #define SERIAL_USART_TX_PIN A10
  39. #define SERIAL_USART_TX_PAL_MODE 7
  40. #define SERIAL_USART_RX_PIN A9
  41. #define SERIAL_USART_RX_PAL_MODE 7
  42. #define SERIAL_USART_TIMEOUT 10
  43. #define SERIAL_USART_SPEED (1 * 1024 * 1024)
  44. #define SERIAL_USART_FULL_DUPLEX
  45. /* i2c config for oleds */
  46. #define I2C_DRIVER I2CD1
  47. #define I2C1_CLOCK_SPEED 400000
  48. #define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_16_9
  49. /* spi config for eeprom and pmw3360 sensor */
  50. #define SPI_DRIVER SPID1
  51. #define SPI_SCK_PIN B3
  52. #define SPI_SCK_PAL_MODE 5
  53. #define SPI_MOSI_PIN B5
  54. #define SPI_MOSI_PAL_MODE 5
  55. #define SPI_MISO_PIN B4
  56. #define SPI_MISO_PAL_MODE 5
  57. #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN B13
  58. #define EXTERNAL_FLASH_SPI_CLOCK_DIVISOR 4
  59. #define EXTERNAL_FLASH_SIZE (8 * 1024 * 1024)
  60. /* pmw3360 config */
  61. #define POINTING_DEVICE_CS_PIN B8
  62. #define POINTING_DEVICE_ROTATION_270
  63. #undef ROTATIONAL_TRANSFORM_ANGLE
  64. #define PMW33XX_SPI_DIVISOR 16
  65. // lcd
  66. #define DISPLAY_RST_PIN NO_PIN
  67. #define DISPLAY_DC_PIN B12
  68. #define DISPLAY_CS_PIN B9
  69. #define DISPLAY_SPI_DIVIDER 1
  70. #define DRV2605L_FB_ERM_LRA 0
  71. #define DRV2605L_GREETING DRV2605L_EFFECT_750_MS_ALERT_100
  72. #define DRV2605L_DEFAULT_MODE DRV2605L_EFFECT_BUZZ_1_100