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.

55 lines
1.9 KiB

  1. /*
  2. Copyright 2020 Thierry Kleist
  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. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. */
  14. #pragma once
  15. #include "config_common.h"
  16. /* USB Device descriptor parameter */
  17. #define VENDOR_ID 0xAC11
  18. #define PRODUCT_ID 0x4173
  19. #define DEVICE_VER 0x0001
  20. #define MANUFACTURER MisterKnife
  21. #define PRODUCT Knife66 ISO
  22. #define MATRIX_ROWS 5
  23. #define MATRIX_COLS 15
  24. #define MATRIX_COL_PINS { B2, B1, B0, A7, A6, A5, A4, B9, B8, B7, B6, B5, B4, B3, A15 }
  25. #define MATRIX_ROW_PINS { B15, A8, A3, A2, A1 }
  26. #define DIODE_DIRECTION COL2ROW
  27. #define RGB_DI_PIN A9
  28. #ifdef RGB_DI_PIN
  29. #define RGBLIGHT_ANIMATIONS
  30. #define RGBLIGHT_SLEEP
  31. #define RGBLED_NUM 6
  32. #define RGBLIGHT_HUE_STEP 8
  33. #define RGBLIGHT_SAT_STEP 8
  34. #define RGBLIGHT_VAL_STEP 8
  35. #define RGBLIGHT_LIMIT_VAL 160
  36. #endif
  37. /* Set 0 if debouncing isn't needed */
  38. #define DEBOUNCE 5
  39. #define WS2812_PWM_DRIVER PWMD1 // default: PWMD1
  40. #define WS2812_PWM_CHANNEL 2 // default: 2
  41. #define WS2812_PWM_PAL_MODE 2 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2
  42. #define WS2812_DMA_STREAM STM32_DMA1_STREAM5 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
  43. #define WS2812_DMA_CHANNEL 5 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.