logo

qmk_firmware

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

config.h (2004B)


  1. /**
  2. * config.h
  3. *
  4. */
  5. #pragma once
  6. #define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE
  7. /* key matrix size */
  8. #define MATRIX_ROWS 6
  9. #define MATRIX_COLS 16
  10. #define DEF_PIN(port, pin) (((port) << 8) | pin)
  11. #define GET_PORT(pp) (((pp) >> 8) & 0xFF)
  12. #define GET_PIN(pp) ((pp) & 0xFF)
  13. #define ROW1_MASK 0x80
  14. #define ROW2_MASK 0x40
  15. #define ROW3_MASK 0x01
  16. #define ROW4_MASK 0x04
  17. #define ROW5_MASK 0x10
  18. #define ROW6_MASK 0x20
  19. #define ROW_PORT TCA6424_PORT2
  20. #define COL1_MASK 0x02
  21. #define COL2_MASK 0x80
  22. #define COL3_MASK 0x40
  23. #define COL4_MASK 0x20
  24. #define COL5_MASK 0x10
  25. #define COL6_MASK 0x08
  26. #define COL7_MASK 0x04
  27. #define COL8_MASK 0x02
  28. #define COL9_MASK 0x01
  29. #define COL10_MASK 0x80
  30. #define COL11_MASK 0x40
  31. #define COL12_MASK 0x20
  32. #define COL13_MASK 0x10
  33. #define COL14_MASK 0x08
  34. #define COL15_MASK 0x04
  35. #define COL16_MASK 0x02
  36. // Note: MATRIX_ROW_PINS only works with standard pin names.
  37. #define MATRIX_M20_ROW_PINS { \
  38. DEF_PIN(TCA6424_PORT2, 7), \
  39. DEF_PIN(TCA6424_PORT2, 6), \
  40. DEF_PIN(TCA6424_PORT2, 0), \
  41. DEF_PIN(TCA6424_PORT2, 2), \
  42. DEF_PIN(TCA6424_PORT2, 4), \
  43. DEF_PIN(TCA6424_PORT2, 5) }
  44. // Note: MATRIX_COL_PINS only works with standard pin names.
  45. #define MATRIX_M20_COL_PINS { \
  46. DEF_PIN(TCA6424_PORT2, 1), \
  47. DEF_PIN(TCA6424_PORT1, 7), \
  48. DEF_PIN(TCA6424_PORT1, 6), \
  49. DEF_PIN(TCA6424_PORT1, 5), \
  50. DEF_PIN(TCA6424_PORT1, 4), \
  51. DEF_PIN(TCA6424_PORT1, 3), \
  52. DEF_PIN(TCA6424_PORT1, 2), \
  53. DEF_PIN(TCA6424_PORT1, 1), \
  54. DEF_PIN(TCA6424_PORT1, 0), \
  55. DEF_PIN(TCA6424_PORT0, 7), \
  56. DEF_PIN(TCA6424_PORT0, 6), \
  57. DEF_PIN(TCA6424_PORT0, 5), \
  58. DEF_PIN(TCA6424_PORT0, 4), \
  59. DEF_PIN(TCA6424_PORT0, 3), \
  60. DEF_PIN(TCA6424_PORT0, 2), \
  61. DEF_PIN(TCA6424_PORT0, 1) }
  62. #define DIODE_DIRECTION COL2ROW
  63. // i2c setting
  64. #define I2C1_SCL_PIN B8
  65. #define I2C1_SDA_PIN B9
  66. #define I2C1_CLOCK_SPEED 400000
  67. #define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2
  68. #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
  69. #define IS31FL3731_LED_COUNT 20