File tree Expand file tree Collapse file tree 6 files changed +738
-11
lines changed
Expand file tree Collapse file tree 6 files changed +738
-11
lines changed Original file line number Diff line number Diff line change 11#ifndef keyboard_h
22#define keyboard_h
33
4- #define KEYBOARD_ROWS ( 0x000001FF )
5- #define KEYBOARD_COLS ( 0x0FFFFE00 )
4+ #define KEYBOARD_COLS ( 0x03FC0000 )
5+ #define KEYBOARD_ROWS ( 0x0003FFFF )
66
77#include < Arduino.h>
88
Original file line number Diff line number Diff line change 33#include " MCP23S17.h"
44#include " PK1306R1A08.h"
55
6+ #ifndef keyboard_h
7+ #error No keyboard definition included!!!
8+ #endif
9+
610const int chipSelectPin1 = 2 ;
711const int chipSelectPin2 = 3 ;
812const int chipReset = 10 ;
913MCP23S17 IO (chipSelectPin1, chipSelectPin2);
1014// laptopKeyboard KEY();
1115
12- // 76543210765432107654321076543210
13- unsigned long ROWS = 0x0FFFFFFF ;
14- unsigned long COLS = 0x0FFFFFFF ;
15- // unsigned long ROWS = KEYBOARD_ROWS;
16- // unsigned long COLS = KEYBOARD_COLS;
1716byte pinPOS = 0 ;
1817unsigned long key=0 ;
1918
@@ -47,7 +46,7 @@ void setup() {
4746void loop () {
4847 // put your main code here, to run repeatedly:
4948 unsigned int pos = pinPOS & 0x1F ;
50- if ((pinAddress[pos] & ROWS ) > 0 ) {
49+ if ((pinAddress[pos] & KEYBOARD_COLS ) > 0 ) {
5150 unsigned long key = 0xFFFFFFFF ^ pinAddress[pos];
5251 IO.pinMode (key);
5352 IO.pinWrite (key);
Original file line number Diff line number Diff line change 1+ {
2+ "count" : {
3+ "8019" : 14 ,
4+ "8018" : 11 ,
5+ "8017" : 11 ,
6+ "8016" : 10 ,
7+ "8015" : 13 ,
8+ "8014" : 14 ,
9+ "8013" : 14 ,
10+ "8012" : 13 ,
11+ "8011" : 6 ,
12+ "8010" : 7 ,
13+ "800D" : 6 ,
14+ "800E" : 7 ,
15+ "800F" : 7 ,
16+ "800A" : 8 ,
17+ "800B" : 6 ,
18+ "800C" : 7 ,
19+ "8008" : 8 ,
20+ "8009" : 8 ,
21+ "8004" : 1 ,
22+ "8005" : 8 ,
23+ "8006" : 2 ,
24+ "8007" : 7 ,
25+ "8000" : 1 ,
26+ "8001" : 7 ,
27+ "8002" : 2 ,
28+ "8003" : 2
29+ },
30+ "wire" : {
31+ "8019" : [
32+ " 8010" ,
33+ " 800F" ,
34+ " 8003" ,
35+ " 800B" ,
36+ " 8001" ,
37+ " 8007" ,
38+ " 8005" ,
39+ " 800D" ,
40+ " 800E" ,
41+ " 8008" ,
42+ " 800C" ,
43+ " 8009" ,
44+ " 800A" ,
45+ " 8011"
46+ ],
47+ "8018" : [
48+ " 8005" ,
49+ " 8009" ,
50+ " 8008" ,
51+ " 800E" ,
52+ " 800F" ,
53+ " 8006" ,
54+ " 800A" ,
55+ " 800B" ,
56+ " 8010" ,
57+ " 800C" ,
58+ " 8011"
59+ ],
60+ "8017" : [
61+ " 8005" ,
62+ " 8009" ,
63+ " 8007" ,
64+ " 800A" ,
65+ " 8006" ,
66+ " 800C" ,
67+ " 800D" ,
68+ " 8008" ,
69+ " 8010" ,
70+ " 8001" ,
71+ " 800F"
72+ ],
73+ "8016" : [
74+ " 800A" ,
75+ " 8002" ,
76+ " 800E" ,
77+ " 8011" ,
78+ " 8008" ,
79+ " 8001" ,
80+ " 8007" ,
81+ " 8005" ,
82+ " 800F" ,
83+ " 8009"
84+ ],
85+ "8015" : [
86+ " 800E" ,
87+ " 8004" ,
88+ " 8010" ,
89+ " 800B" ,
90+ " 8005" ,
91+ " 8001" ,
92+ " 800D" ,
93+ " 8009" ,
94+ " 8007" ,
95+ " 8008" ,
96+ " 800F" ,
97+ " 800A" ,
98+ " 800C"
99+ ],
100+ "8014" : [
101+ " 8003" ,
102+ " 8011" ,
103+ " 8001" ,
104+ " 8005" ,
105+ " 8007" ,
106+ " 8008" ,
107+ " 8009" ,
108+ " 800F" ,
109+ " 800E" ,
110+ " 800D" ,
111+ " 800C" ,
112+ " 800A" ,
113+ " 800B" ,
114+ " 8010"
115+ ],
116+ "8013" : [
117+ " 8002" ,
118+ " 8011" ,
119+ " 800F" ,
120+ " 800E" ,
121+ " 800D" ,
122+ " 8008" ,
123+ " 8009" ,
124+ " 800C" ,
125+ " 800B" ,
126+ " 8010" ,
127+ " 8007" ,
128+ " 8001" ,
129+ " 8005" ,
130+ " 800A"
131+ ],
132+ "8012" : [
133+ " 8000" ,
134+ " 8011" ,
135+ " 800E" ,
136+ " 800D" ,
137+ " 800C" ,
138+ " 8010" ,
139+ " 8007" ,
140+ " 8009" ,
141+ " 8008" ,
142+ " 8001" ,
143+ " 8005" ,
144+ " 800A" ,
145+ " 800B"
146+ ],
147+ "8011" : [
148+ " 8014" ,
149+ " 8013" ,
150+ " 8012" ,
151+ " 8016" ,
152+ " 8019" ,
153+ " 8018"
154+ ],
155+ "8010" : [
156+ " 8019" ,
157+ " 8015" ,
158+ " 8018" ,
159+ " 8012" ,
160+ " 8013" ,
161+ " 8017" ,
162+ " 8014"
163+ ],
164+ "800D" : [
165+ " 8017" ,
166+ " 8012" ,
167+ " 8013" ,
168+ " 8019" ,
169+ " 8014" ,
170+ " 8015"
171+ ],
172+ "800E" : [
173+ " 8015" ,
174+ " 8016" ,
175+ " 8018" ,
176+ " 8012" ,
177+ " 8013" ,
178+ " 8014" ,
179+ " 8019"
180+ ],
181+ "800F" : [
182+ " 8019" ,
183+ " 8018" ,
184+ " 8013" ,
185+ " 8014" ,
186+ " 8015" ,
187+ " 8017" ,
188+ " 8016"
189+ ],
190+ "800A" : [
191+ " 8017" ,
192+ " 8016" ,
193+ " 8018" ,
194+ " 8014" ,
195+ " 8012" ,
196+ " 8013" ,
197+ " 8019" ,
198+ " 8015"
199+ ],
200+ "800B" : [
201+ " 8018" ,
202+ " 8019" ,
203+ " 8015" ,
204+ " 8013" ,
205+ " 8014" ,
206+ " 8012"
207+ ],
208+ "800C" : [
209+ " 8017" ,
210+ " 8012" ,
211+ " 8013" ,
212+ " 8014" ,
213+ " 8019" ,
214+ " 8018" ,
215+ " 8015"
216+ ],
217+ "8008" : [
218+ " 8018" ,
219+ " 8014" ,
220+ " 8013" ,
221+ " 8019" ,
222+ " 8015" ,
223+ " 8012" ,
224+ " 8016" ,
225+ " 8017"
226+ ],
227+ "8009" : [
228+ " 8017" ,
229+ " 8018" ,
230+ " 8014" ,
231+ " 8013" ,
232+ " 8015" ,
233+ " 8019" ,
234+ " 8012" ,
235+ " 8016"
236+ ],
237+ "8004" : [
238+ " 8015"
239+ ],
240+ "8005" : [
241+ " 8017" ,
242+ " 8018" ,
243+ " 8014" ,
244+ " 8015" ,
245+ " 8019" ,
246+ " 8012" ,
247+ " 8013" ,
248+ " 8016"
249+ ],
250+ "8006" : [
251+ " 8017" ,
252+ " 8018"
253+ ],
254+ "8007" : [
255+ " 8017" ,
256+ " 8019" ,
257+ " 8014" ,
258+ " 8015" ,
259+ " 8012" ,
260+ " 8013" ,
261+ " 8016"
262+ ],
263+ "8000" : [
264+ " 8012"
265+ ],
266+ "8001" : [
267+ " 8014" ,
268+ " 8019" ,
269+ " 8015" ,
270+ " 8013" ,
271+ " 8012" ,
272+ " 8017" ,
273+ " 8016"
274+ ],
275+ "8002" : [
276+ " 8013" ,
277+ " 8016"
278+ ],
279+ "8003" : [
280+ " 8014" ,
281+ " 8019"
282+ ]
283+ }
284+ }
You can’t perform that action at this time.
0 commit comments