1
0

config.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /*
  2. Copyright 2015 Jun Wako <wakojun@gmail.com>
  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. /* Ensure we jump to bootloader if the RESET keycode was pressed */
  16. #define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE
  17. /* LSE clock */
  18. #define STM32_LSECLK 32768
  19. /* USB Device descriptor parameter */
  20. #define VENDOR_ID 0xCA04
  21. #define PRODUCT_ID 0x57F5
  22. #define DEVICE_VER 0x0001
  23. #define MANUFACTURER CannonKeys
  24. #define PRODUCT Satisfaction75
  25. /* key matrix size */
  26. #define MATRIX_ROWS 6
  27. #define MATRIX_COLS 16
  28. #define MATRIX_COL_PINS { B1, B2, B10, B11, B12, B13, B14, A8, A9, A10, B0, A7, A5, B5, A15, A1 }
  29. #define MATRIX_ROW_PINS { B3, B4, A0, A2, A4, A3 }
  30. #define DIODE_DIRECTION COL2ROW
  31. #define ENCODERS_PAD_A { B9 }
  32. #define ENCODERS_PAD_B { B8 }
  33. #define ENCODER_RESOLUTION 2
  34. //LEDS A6, RGB B15
  35. #define BACKLIGHT_LEVELS 24
  36. #define BACKLIGHT_BREATHING
  37. #define BREATHING_PERIOD 6
  38. /* define if matrix has ghost */
  39. //#define MATRIX_HAS_GHOST
  40. // I2C config
  41. #define I2C_DRIVER I2CD1
  42. #define I2C1_SCL_BANK GPIOB
  43. #define I2C1_SCL 6
  44. #define I2C1_SDA 7
  45. #define I2C1_SCL_PAL_MODE 1
  46. #define I2C1_SDA_PAL_MODE 1
  47. #define I2C1_TIMINGR_PRESC 0x00U
  48. #define I2C1_TIMINGR_SCLDEL 0x03U
  49. #define I2C1_TIMINGR_SDADEL 0x01U
  50. #define I2C1_TIMINGR_SCLH 0x03U
  51. #define I2C1_TIMINGR_SCLL 0x09U
  52. /* Set 0 if debouncing isn't needed */
  53. #define DEBOUNCE 5
  54. /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
  55. #define LOCKING_SUPPORT_ENABLE
  56. /* Locking resynchronize hack */
  57. #define LOCKING_RESYNC_ENABLE
  58. #ifdef QWIIC_MICRO_OLED_ENABLE
  59. #undef I2C_ADDRESS_SA0_1
  60. #define I2C_ADDRESS_SA0_1 0b0111100
  61. #define LCDWIDTH 128
  62. #define LCDHEIGHT 32
  63. #endif
  64. // Custom config starts after VIA's EEPROM usage,
  65. // dynamic keymaps start after this.
  66. // Custom config Usage:
  67. // 1 for enabled encoder modes (1 byte)
  68. // 1 for custom backlighting controls (1 byte)
  69. // 1 for OLED default mode (1 byte)
  70. // 6 for 3x custom encoder settings, left, right, and press (18 bytes)
  71. #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 21
  72. // VIA lighting is handled by the keyboard-level code
  73. #define VIA_CUSTOM_LIGHTING_ENABLE
  74. /*
  75. * Feature disable options
  76. * These options are also useful to firmware size reduction.
  77. */
  78. /* disable debug print */
  79. //#define NO_DEBUG
  80. /* disable print */
  81. //#define NO_PRINT
  82. /* disable action features */
  83. //#define NO_ACTION_LAYER
  84. //#define NO_ACTION_TAPPING
  85. //#define NO_ACTION_ONESHOT
  86. //#define NO_ACTION_MACRO
  87. //#define NO_ACTION_FUNCTION