aboutsummaryrefslogtreecommitdiff
path: root/keyboards/matrix/abelx/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/matrix/abelx/config.h')
-rw-r--r--keyboards/matrix/abelx/config.h108
1 files changed, 108 insertions, 0 deletions
diff --git a/keyboards/matrix/abelx/config.h b/keyboards/matrix/abelx/config.h
new file mode 100644
index 000000000..145bb3099
--- /dev/null
+++ b/keyboards/matrix/abelx/config.h
@@ -0,0 +1,108 @@
1/**
2 * config.h
3 *
4 * Copyright 2020 astro <yuleiz@gmail.com>
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#pragma once
21
22/* USB Device descriptor parameter */
23#define VENDOR_ID 0x4D58 // MX
24#define PRODUCT_ID 0xAB87 // abelx keyboard
25#define DEVICE_VER 0x0001
26#define MANUFACTURER MATRIX
27#define PRODUCT ABELX
28
29/* key matrix size */
30#define MATRIX_ROWS 6
31#define MATRIX_COLS 16
32
33#define DEF_PIN(port, pin) (((port) << 8) | pin)
34#define GET_PORT(pp) (((pp) >> 8) & 0xFF)
35#define GET_PIN(pp) ((pp) & 0xFF)
36
37#define MATRIX_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
45#define MATRIX_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
63#define ROW1_MASK 0x80
64#define ROW2_MASK 0x40
65#define ROW3_MASK 0x01
66#define ROW4_MASK 0x04
67#define ROW5_MASK 0x10
68#define ROW6_MASK 0x20
69#define ROW_PORT TCA6424_PORT2
70
71#define COL1_MASK 0x02
72#define COL2_MASK 0x80
73#define COL3_MASK 0x40
74#define COL4_MASK 0x20
75#define COL5_MASK 0x10
76#define COL6_MASK 0x08
77#define COL7_MASK 0x04
78#define COL8_MASK 0x02
79#define COL9_MASK 0x01
80#define COL10_MASK 0x80
81#define COL11_MASK 0x40
82#define COL12_MASK 0x20
83#define COL13_MASK 0x10
84#define COL14_MASK 0x08
85#define COL15_MASK 0x04
86#define COL16_MASK 0x02
87
88#define UNUSED_PINS
89
90#define DIODE_DIRECTION COL2ROW
91#define DEBOUNCE 5
92
93// i2c setting
94#define USE_I2CV1
95#define I2C1_SCL 8
96#define I2C1_SDA 9
97#define I2C1_CLOCK_SPEED 400000
98#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2
99
100
101// rgb light setting
102#define RGBLED_NUM 9
103#define RGB_DI_PIN B4
104#define RGBLIGHT_ANIMATIONS
105
106#define AW9523B_RGB_NUM 4
107
108#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP FALSE