logo

qmk_firmware

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

config.h (1590B)


  1. /*
  2. Copyright 2020 Pierre Chevalier <pierrechevalier83@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. /* key matrix size */
  16. #define MATRIX_ROWS 8
  17. #define MATRIX_COLS 10
  18. #define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2)
  19. #define MATRIX_COLS_PER_SIDE (MATRIX_COLS / 2)
  20. // wiring
  21. #define MATRIX_ROW_PINS_MCU \
  22. { B7, B6, B5, A2 }
  23. #define MATRIX_COL_PINS_MCU \
  24. { B8, B4, B3, A15, A14 }
  25. #define MATRIX_ROW_PINS_MCP \
  26. { B0, B1, B2, B3 }
  27. #define MATRIX_COL_PINS_MCP \
  28. { A0, A1, A2, A3, A4 }
  29. #define MATRIX_ROW_PINS \
  30. { B7, B6, B5, A2, A0, A0, A0, A0 }
  31. #define MATRIX_COL_PINS \
  32. { B8, B4, B3, A15, A14, A1, A1, A1, A1, A1 }
  33. /* COL2ROW, ROW2COL*/
  34. #define DIODE_DIRECTION COL2ROW
  35. /* i2c settings */
  36. #define I2C_DRIVER I2CD2
  37. #define I2C1_SCL_PIN B10
  38. #define I2C1_SDA_PIN B11
  39. #define I2C1_TIMINGR_PRESC 2U
  40. #define I2C1_TIMINGR_SCLDEL 1U
  41. #define I2C1_TIMINGR_SDADEL 0U
  42. #define I2C1_TIMINGR_SCLH 9U
  43. #define I2C1_TIMINGR_SCLL 26U
  44. #define I2C1_SCL_PAL_MODE 1
  45. #define I2C1_SDA_PAL_MODE 1