diff options
Diffstat (limited to 'keyboards/matrix/m20add/config.h')
| -rw-r--r-- | keyboards/matrix/m20add/config.h | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/keyboards/matrix/m20add/config.h b/keyboards/matrix/m20add/config.h new file mode 100644 index 000000000..8c3f922ab --- /dev/null +++ b/keyboards/matrix/m20add/config.h | |||
| @@ -0,0 +1,96 @@ | |||
| 1 | /** | ||
| 2 | * config.h | ||
| 3 | * | ||
| 4 | */ | ||
| 5 | |||
| 6 | #pragma once | ||
| 7 | |||
| 8 | /* USB Device descriptor parameter */ | ||
| 9 | #define VENDOR_ID 0x4D58 // MX | ||
| 10 | #define PRODUCT_ID 0x20AD // 8XV2.0 Additional | ||
| 11 | #define DEVICE_VER 0x0001 | ||
| 12 | #define MANUFACTURER MATRIX | ||
| 13 | #define PRODUCT 8XV2.0 Additional | ||
| 14 | |||
| 15 | /* key matrix size */ | ||
| 16 | #define MATRIX_ROWS 6 | ||
| 17 | #define MATRIX_COLS 16 | ||
| 18 | |||
| 19 | #define DEF_PIN(port, pin) (((port) << 8) | pin) | ||
| 20 | #define GET_PORT(pp) (((pp) >> 8) & 0xFF) | ||
| 21 | #define GET_PIN(pp) ((pp) & 0xFF) | ||
| 22 | |||
| 23 | #define ROW1_MASK 0x80 | ||
| 24 | #define ROW2_MASK 0x40 | ||
| 25 | #define ROW3_MASK 0x01 | ||
| 26 | #define ROW4_MASK 0x04 | ||
| 27 | #define ROW5_MASK 0x10 | ||
| 28 | #define ROW6_MASK 0x20 | ||
| 29 | #define ROW_PORT TCA6424_PORT2 | ||
| 30 | |||
| 31 | #define COL1_MASK 0x02 | ||
| 32 | #define COL2_MASK 0x80 | ||
| 33 | #define COL3_MASK 0x40 | ||
| 34 | #define COL4_MASK 0x20 | ||
| 35 | #define COL5_MASK 0x10 | ||
| 36 | #define COL6_MASK 0x08 | ||
| 37 | #define COL7_MASK 0x04 | ||
| 38 | #define COL8_MASK 0x02 | ||
| 39 | #define COL9_MASK 0x01 | ||
| 40 | #define COL10_MASK 0x80 | ||
| 41 | #define COL11_MASK 0x40 | ||
| 42 | #define COL12_MASK 0x20 | ||
| 43 | #define COL13_MASK 0x10 | ||
| 44 | #define COL14_MASK 0x08 | ||
| 45 | #define COL15_MASK 0x04 | ||
| 46 | #define COL16_MASK 0x02 | ||
| 47 | |||
| 48 | #define MATRIX_ROW_PINS { \ | ||
| 49 | DEF_PIN(TCA6424_PORT2, 7), \ | ||
| 50 | DEF_PIN(TCA6424_PORT2, 6), \ | ||
| 51 | DEF_PIN(TCA6424_PORT2, 0), \ | ||
| 52 | DEF_PIN(TCA6424_PORT2, 2), \ | ||
| 53 | DEF_PIN(TCA6424_PORT2, 4), \ | ||
| 54 | DEF_PIN(TCA6424_PORT2, 5) } | ||
| 55 | |||
| 56 | #define MATRIX_COL_PINS { \ | ||
| 57 | DEF_PIN(TCA6424_PORT2, 1), \ | ||
| 58 | DEF_PIN(TCA6424_PORT1, 7), \ | ||
| 59 | DEF_PIN(TCA6424_PORT1, 6), \ | ||
| 60 | DEF_PIN(TCA6424_PORT1, 5), \ | ||
| 61 | DEF_PIN(TCA6424_PORT1, 4), \ | ||
| 62 | DEF_PIN(TCA6424_PORT1, 3), \ | ||
| 63 | DEF_PIN(TCA6424_PORT1, 2), \ | ||
| 64 | DEF_PIN(TCA6424_PORT1, 1), \ | ||
| 65 | DEF_PIN(TCA6424_PORT1, 0), \ | ||
| 66 | DEF_PIN(TCA6424_PORT0, 7), \ | ||
| 67 | DEF_PIN(TCA6424_PORT0, 6), \ | ||
| 68 | DEF_PIN(TCA6424_PORT0, 5), \ | ||
| 69 | DEF_PIN(TCA6424_PORT0, 4), \ | ||
| 70 | DEF_PIN(TCA6424_PORT0, 3), \ | ||
| 71 | DEF_PIN(TCA6424_PORT0, 2), \ | ||
| 72 | DEF_PIN(TCA6424_PORT0, 1) } | ||
| 73 | |||
| 74 | #define UNUSED_PINS | ||
| 75 | |||
| 76 | |||
| 77 | #define DIODE_DIRECTION COL2ROW | ||
| 78 | #define DEBOUNCE 5 | ||
| 79 | |||
| 80 | // i2c setting | ||
| 81 | #define USE_I2CV1 | ||
| 82 | #define I2C1_SCL 8 | ||
| 83 | #define I2C1_SDA 9 | ||
| 84 | #define I2C1_CLOCK_SPEED 400000 | ||
| 85 | #define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 | ||
| 86 | |||
| 87 | // rgb light setting | ||
| 88 | #define RGB_DI_PIN B4 // reserved pin for future usage | ||
| 89 | #define RGBLED_NUM 20 | ||
| 90 | #define RGBLIGHT_ANIMATIONS | ||
| 91 | |||
| 92 | #define DRIVER_ADDR_1 0b1110100 | ||
| 93 | #define DRIVER_COUNT 1 | ||
| 94 | #define DRIVER_LED_TOTAL RGBLED_NUM | ||
| 95 | |||
| 96 | #define EARLY_INIT_PERFORM_BOOTLOADER_JUMP FALSE // disable jump to system bootloader | ||
