forked from kiibohd/controller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscancode_map.kll
215 lines (177 loc) · 4.95 KB
/
scancode_map.kll
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# Infinity 60% LED
Name = "Infinity 60% LED";
Version = 0.9;
Author = "HaaTa (Jacob Alexander) 2014-2018";
KLL = 0.5;
# Modified Date
Date = 2018-11-13;
# Defines available to the MD1_1 Scan Module
# ScanCode Strobe List
# This specified which the column (strobe) GPIOs for the matrix
# gpio(<label>, <index>)
# gpio(A,3) ==> PA3
# gpio(C,24) ==> PC24
ScanCodeStrobeList => ScanCodeStrobeList_define;
ScanCodeStrobeList = "
gpio(C,0),
gpio(C,1),
gpio(C,2),
gpio(C,3),
gpio(C,4),
gpio(C,5),
gpio(C,6),
gpio(C,7),
gpio(D,0)
";
# ScanCode Sense List
# This specified which the row (sense) GPIOs for the matrix
# gpio(<label>, <index>)
# gpio(A,3) ==> PA3
# gpio(C,24) ==> PC24
ScanCodeSenseList => ScanCodeSenseList_define;
ScanCodeSenseList = "
gpio(D,1),
gpio(D,2),
gpio(D,3),
gpio(D,4),
gpio(D,5),
gpio(D,6),
gpio(D,7)
";
# Debug LED
ledDebugPin = "gpio(A,19)";
# Driver Chip
ISSI_Chip_31FL3731 = 1;
# Available ISSI Chips
ISSI_Chips = 1;
# I2C Buses
ISSI_I2C_Buses = 1; # 1 by default
# I2C LED Struct Definition
LED_BufferStruct = "
typedef struct LED_Buffer {
uint16_t i2c_addr;
uint16_t reg_addr;
uint16_t ledctrl[18];
uint16_t unused[18];
uint16_t buffer[144];
} LED_Buffer;
volatile LED_Buffer LED_pageBuffer[ ISSI_Chips_define ];
typedef struct KLL_Buffer {
uint16_t buffer[144];
} KLL_Buffer;
volatile KLL_Buffer KLL_pageBuffer[ ISSI_Chips_define ];
";
# FPS Target
# Each ISSI chip setup has a different optimal framerate.
# This setting specifies a target frame rate. This is sort've like "V-Sync" on monitors.
# So the framerate will not go above this amount.
# If the framerate goes below, ledFPS cli will issue warnings when enabled.
ISSI_FrameRate_ms => ISSI_FrameRate_ms_define;
ISSI_FrameRate_ms = 11; # 1000 / <ISSI_FrameRate_ms> = 90.9 fps
# LED Default Enable Mask Override
#
# Each LED is represented by a single bit
# See (http://www.issi.com/WW/pdf/31FL3731C.pdf) for details
ISSILedMask1 = "
0xFF, 0x00, /* C1-1 -> C1-16 */
0xFF, 0x00, /* C2-1 -> C2-16 */
0xFF, 0x00, /* C3-1 -> C3-16 */
0xFF, 0x00, /* C4-1 -> C4-16 */
0xFF, 0x00, /* C5-1 -> C5-16 */
0xFF, 0x00, /* C6-1 -> C6-16 */
0xFF, 0x00, /* C7-1 -> C7-16 */
0x7F, 0x00, /* C8-1 -> C8-16 */
0x00, 0x00, /* C9-1 -> C9-16 */
";
### Pixel Buffer Setup ###
# Defines channel mappings, changing the order will affect Pixel definitions
Pixel_Buffer_Size[] = 0; # Starting channel for each buffer
Pixel_Buffer_Width[] = 16; # Width of each channel buffer (may be different than effective channel size)
Pixel_Buffer_Length[] = 144; # Length of each buffer (count, not bytes)
Pixel_Buffer_Buffer[0] = "KLL_pageBuffer[0].buffer"; # Pointer to the start of the buffer
LED_Buffer_Size[] = 0; # Starting channel for each buffer
LED_Buffer_Width[] = 16; # Width of each channel buffer (may be different than effective channel size)
LED_Buffer_Length[] = 144; # Length of each buffer (count, not bytes)
LED_Buffer_Buffer[0] = "LED_pageBuffer[0].buffer"; # Pointer to the start of the buffer
# Channel Optimizations
Pixel_HardCode_ChanWidth = 8;
Pixel_HardCode_Channels = 1;
### Pixel Mapping ###
# Organizes each of the channels into pixels (may, or may not be multi-channel)
# Number Row (1-15)
P[ 1]( 0:8) : S1;
P[ 2]( 1:8) : S2;
P[ 3]( 2:8) : S3;
P[ 4]( 3:8) : S4;
P[ 5]( 4:8) : S5;
P[ 6]( 5:8) : S6;
P[ 7]( 6:8) : S7;
P[ 8]( 7:8) : S8;
P[ 9]( 16:8) : S9;
P[ 10]( 17:8) : S10;
P[ 11]( 18:8) : S11;
P[ 12]( 19:8) : S12;
P[ 13]( 20:8) : S13;
P[ 14]( 21:8) : S14; # x
P[ 15]( 22:8) : S15;
# Top Alpha Row (16-29)
P[ 16]( 23:8) : S16;
P[ 17]( 32:8) : S17;
P[ 18]( 33:8) : S18;
P[ 19]( 34:8) : S19;
P[ 20]( 35:8) : S20;
P[ 21]( 36:8) : S21;
P[ 22]( 37:8) : S22;
P[ 23]( 38:8) : S23;
P[ 24]( 39:8) : S24;
P[ 25]( 48:8) : S25;
P[ 26]( 49:8) : S26;
P[ 27]( 50:8) : S27;
P[ 28]( 51:8) : S28;
P[ 29]( 52:8) : S29;
# Mid Alpha Row (30-42)
P[ 30]( 53:8) : S30;
P[ 31]( 54:8) : S31;
P[ 32]( 55:8) : S32;
P[ 33]( 64:8) : S33;
P[ 34]( 65:8) : S34;
P[ 35]( 66:8) : S35;
P[ 36]( 67:8) : S36;
P[ 37]( 68:8) : S37;
P[ 38]( 69:8) : S38;
P[ 39]( 70:8) : S39;
P[ 40]( 71:8) : S40;
P[ 41]( 80:8) : S41;
P[ 42]( 81:8) : S42;
# Low Alpha Row (43-55)
P[ 43]( 82:8) : S43;
P[ 44]( 83:8) : S44;
P[ 45]( 84:8) : S45;
P[ 46]( 85:8) : S46;
P[ 47]( 86:8) : S47;
P[ 48]( 87:8) : S48;
P[ 49]( 96:8) : S49;
P[ 50]( 97:8) : S50;
P[ 51]( 98:8) : S51;
P[ 52]( 99:8) : S52;
P[ 53](100:8) : S53;
P[ 54](101:8) : S54;
P[ 55](102:8) : S55;
# Mod Row (56-63)
P[ 56](103:8) : S56;
P[ 57](112:8) : S57;
P[ 58](113:8) : S58;
P[ 59](114:8) : S59;
P[ 60](115:8) : S60;
P[ 61](116:8) : S61;
P[ 62](117:8) : S62;
P[ 63](118:8) : S63;
### LED Default Fade Groups ###
#
# Group 0 -> Keys
# Group 1 -> Underlighting
# Group 2 -> Indicators
# Group 3 -> Active layer (run-time processed)
KLL_LED_FadeGroup[0] = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63";
KLL_LED_FadeGroup[1] = "";
KLL_LED_FadeGroup[2] = "";