logo

qmk_firmware

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

config.h (909B)


  1. // Copyright 2023 Vinh Le (@vinhcatba)
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #pragma once
  4. /* WS2812 driver config specifically for STM32F401 */
  5. // DI pin = PB1, which is AF02, TIM3_CH4 (table 9 in datasheet)
  6. #define RGBLIGHT_LED_MAP { 2, 3, 4, 5, 6, 0, 1, 7, 8, 9, 10, 11, 12, 13} // index 5 = CAPS; index 6 = NUM
  7. #define WS2812_PWM_DRIVER PWMD3 // TIM3
  8. #define WS2812_PWM_CHANNEL 4 // CH4
  9. #define WS2812_PWM_PAL_MODE 2 // AF2
  10. #define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 2 for TIM3_UP (table 28 in reference manual)
  11. #define WS2812_PWM_DMA_CHANNEL 5 // DMA Channel 5 for TIM3_UP (table 28 in reference manual)
  12. #define I2C1_CLOCK_SPEED 400000
  13. #define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_16_9
  14. /* eeprom i2c driver config */
  15. #define EEPROM_I2C_24LC32A
  16. /* OLED config */
  17. #define OLED_UPDATE_INTERVAL 100
  18. #define OLED_BRIGHTNESS 200