Line 0
Link Here
|
|
|
1 |
/* |
2 |
* Validity VFS0050 driver for libfprint |
3 |
* Copyright (C) 2015 Konstantin Semenov <zemen17@gmail.com> |
4 |
* |
5 |
* This library is free software; you can redistribute it and/or |
6 |
* modify it under the terms of the GNU Lesser General Public |
7 |
* License as published by the Free Software Foundation; either |
8 |
* version 2.1 of the License, or (at your option) any later version. |
9 |
* |
10 |
* This library is distributed in the hope that it will be useful, |
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 |
* Lesser General Public License for more details. |
14 |
* |
15 |
* You should have received a copy of the GNU Lesser General Public |
16 |
* License along with this library; if not, write to the Free Software |
17 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
18 |
*/ |
19 |
|
20 |
/* Timeout for all send/recv operations, except interrupt waiting and abort */ |
21 |
#define VFS_USB_TIMEOUT 100 |
22 |
/* Timeout for usb abort */ |
23 |
#define VFS_USB_ABORT_TIMEOUT 20 |
24 |
/* Default timeout for SSM timers */ |
25 |
#define VFS_SSM_TIMEOUT 100 |
26 |
/* Timeout for orange light */ |
27 |
#define VFS_SSM_ORANGE_TIMEOUT 700 |
28 |
|
29 |
/* Buffer size for abort and fprint receiving */ |
30 |
#define VFS_USB_BUFFER_SIZE 65536 |
31 |
|
32 |
/* Do not touch this parameters! */ |
33 |
|
34 |
/* Width from scanner including extra data */ |
35 |
#define VFS_IMAGE_WIDTH 148 |
36 |
/* Only fprint image width from scanner */ |
37 |
#define VFS_RESULT_IMAGE_WIDTH 100 |
38 |
/* Maximum result image height */ |
39 |
#define VFS_MAX_HEIGHT 600 |
40 |
/* Size of control packets: turn_on, turn_off, next_receive_* */ |
41 |
#define VFS_CONTROL_PACKET_SIZE 125 |
42 |
/* Size of result of commit */ |
43 |
#define VFS_COMMIT_RESPONSE_SIZE 1106 |
44 |
/* Size of interrupt from EP3 */ |
45 |
#define VFS_INTERRUPT_SIZE 5 |
46 |
|
47 |
/* Fingerprint horizontal line */ |
48 |
struct vfs_line { |
49 |
/* It must be always 0x01 */ |
50 |
unsigned char _0x01; |
51 |
/* It must be always 0xfe */ |
52 |
unsigned char _0xfe; |
53 |
|
54 |
/* line number starting from some number in Little-Endian */ |
55 |
unsigned short id; |
56 |
|
57 |
/* Some hashes which are useful to detect noise */ |
58 |
unsigned char noise_hash_1; |
59 |
unsigned char noise_hash_2; |
60 |
|
61 |
/* The first byte of _somedata is always 0x00, the second is strange useless cyclic line number */ |
62 |
unsigned short _somedata; |
63 |
|
64 |
/* Fingerprint image */ |
65 |
unsigned char data[VFS_RESULT_IMAGE_WIDTH]; |
66 |
|
67 |
/* Narrow fingerprint part from the center, diagonally, currently it's skipped */ |
68 |
unsigned char extra[32]; |
69 |
|
70 |
/* scan_data is 0xfb except some rare cases, it seems that it's timeline but currently it's skipped too */ |
71 |
unsigned char scan_data[8]; |
72 |
} __attribute__ ((__packed__)); |
73 |
|
74 |
/* The main driver structure */ |
75 |
struct vfs_dev_t { |
76 |
/* One if we were asked to read fingerprint, zero otherwise */ |
77 |
char active; |
78 |
|
79 |
/* Control packet parameter for send_control_packet */ |
80 |
unsigned char *control_packet; |
81 |
|
82 |
/* Current async transfer */ |
83 |
struct libusb_transfer *transfer; |
84 |
|
85 |
/* Should we call fpi_imgdev_activate_complete or fpi_imgdev_deactivate_complete */ |
86 |
char need_report; |
87 |
|
88 |
/* Should we wait more for interrupt */ |
89 |
char wait_interrupt; |
90 |
|
91 |
/* Received fingerprint data */ |
92 |
unsigned char *data; |
93 |
|
94 |
/* Current number of received bytes and current memory used by data */ |
95 |
int bytes, memory; |
96 |
|
97 |
/* Received interrupt data */ |
98 |
unsigned char interrupt[8]; |
99 |
}; |
100 |
|
101 |
/* SSM states for clear_ep2 */ |
102 |
enum SUBSM1 { |
103 |
SUBSM1_COMMAND_04, |
104 |
SUBSM1_RETURN_CODE, |
105 |
SUBSM1_ABORT_2, |
106 |
|
107 |
SUBSM1_STATES, |
108 |
}; |
109 |
|
110 |
/* SSM states for control */ |
111 |
enum SUBSM2 { |
112 |
SUBSM2_SEND_CONTROL, |
113 |
SUBSM2_RETURN_CODE, /* If next_receive, send another control packet */ |
114 |
|
115 |
SUBSM2_SEND_COMMIT, |
116 |
SUBSM2_COMMIT_RESPONSE, |
117 |
SUBSM2_READ_EMPTY_INTERRUPT, |
118 |
SUBSM2_ABORT_3, |
119 |
SUBSM2_CLEAR_EP2, |
120 |
|
121 |
SUBSM2_STATES, |
122 |
}; |
123 |
|
124 |
/* SSM states for activate_ssm */ |
125 |
enum SSM_STATE { |
126 |
SSM_INITIAL_ABORT_1, |
127 |
SSM_INITIAL_ABORT_2, |
128 |
SSM_INITIAL_ABORT_3, |
129 |
SSM_CLEAR_EP2, |
130 |
SSM_TURN_OFF, |
131 |
|
132 |
/* Here the device is turned off; if not active, complete ssm */ |
133 |
SSM_TURN_ON, |
134 |
|
135 |
SSM_ASK_INTERRUPT, |
136 |
SSM_WAIT_INTERRUPT, |
137 |
|
138 |
SSM_RECEIVE_FINGER, |
139 |
SSM_SUBMIT_IMAGE, |
140 |
|
141 |
/* If not active, jump to CLEAR_EP2 */ |
142 |
SSM_NEXT_RECEIVE, |
143 |
SSM_WAIT_ANOTHER_SCAN, |
144 |
/* Jump to TURN_ON */ |
145 |
|
146 |
SSM_STATES |
147 |
}; |
148 |
|
149 |
/* Blocks of data from USB sniffer */ |
150 |
|
151 |
/* Turns on the light */ |
152 |
static unsigned char turn_on[] = { |
153 |
0x39, 0x20, 0xBF, 0x02, 0x00, 0xF4, 0x01, 0x00, 0x00, 0x01, 0xD1, 0x00, |
154 |
0x20, 0xD1, 0xD1, 0x00, |
155 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF4, 0x01, 0x00, |
156 |
0x00, 0x01, 0x00, 0x00, |
157 |
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
158 |
0x00, 0xF4, 0x01, 0x00, |
159 |
0x00, 0x02, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
160 |
0x00, 0x00, 0x00, 0x00, |
161 |
0x00, 0xF4, 0x01, 0x00, 0x00, 0x02, 0xD1, 0x00, 0x20, 0x00, 0x00, 0x00, |
162 |
0x00, 0x00, 0x00, 0x00, |
163 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
164 |
0x00, 0x00, 0x00, 0x00, |
165 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
166 |
0x00, 0x00, 0x00, 0x00, |
167 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
168 |
0x00, |
169 |
}; |
170 |
|
171 |
/* Power off */ |
172 |
static unsigned char turn_off[] = { |
173 |
0x39, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
174 |
0x00, 0x00, 0x00, 0x00, |
175 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
176 |
0x00, 0x00, 0x00, 0x00, |
177 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
178 |
0x00, 0x00, 0x00, 0x00, |
179 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
180 |
0x00, 0x00, 0x00, 0x00, |
181 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
182 |
0x00, 0x00, 0x00, 0x00, |
183 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
184 |
0x00, 0x00, 0x00, 0x00, |
185 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
186 |
0x00, 0x00, 0x00, 0x00, |
187 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
188 |
0x00, |
189 |
}; |
190 |
|
191 |
/* Turns on orange light */ |
192 |
static unsigned char next_receive_1[] = { |
193 |
0x39, 0xB8, 0x0B, 0x00, 0x00, 0xB8, 0x0B, 0x00, 0x00, 0x01, 0xD1, 0x00, |
194 |
0x20, 0x00, 0x00, 0x00, |
195 |
0x00, 0x00, 0x00, 0x00, 0x00, 0xD1, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, |
196 |
0x00, 0x01, 0x00, 0x00, |
197 |
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
198 |
0x00, 0x00, 0x00, 0x00, |
199 |
0x00, 0x02, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
200 |
0x00, 0x00, 0x00, 0x00, |
201 |
0x00, 0xB8, 0x0B, 0x00, 0x00, 0x02, 0xD1, 0x00, 0x20, 0x00, 0x00, 0x00, |
202 |
0x00, 0x00, 0x00, 0x00, |
203 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
204 |
0x00, 0x00, 0x00, 0x00, |
205 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
206 |
0x00, 0x00, 0x00, 0x00, |
207 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
208 |
0x00, |
209 |
}; |
210 |
|
211 |
/* Packet directly after next_receive_1 */ |
212 |
static unsigned char next_receive_2[] = { |
213 |
0x39, 0xE8, 0x03, 0x00, 0x00, 0xE8, 0x03, 0x00, 0x00, 0x01, 0xD1, 0x00, |
214 |
0x20, 0x00, 0x00, 0x00, |
215 |
0x00, 0x00, 0x00, 0x00, 0x00, 0xD1, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, |
216 |
0x00, 0x01, 0x00, 0x00, |
217 |
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
218 |
0x00, 0x00, 0x00, 0x00, |
219 |
0x00, 0x02, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
220 |
0x00, 0x00, 0x00, 0x00, |
221 |
0x00, 0xE8, 0x03, 0x00, 0x00, 0x02, 0xD1, 0x00, 0x20, 0x00, 0x00, 0x00, |
222 |
0x00, 0x00, 0x00, 0x00, |
223 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
224 |
0x00, 0x00, 0x00, 0x00, |
225 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
226 |
0x00, 0x00, 0x00, 0x00, |
227 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
228 |
0x00, |
229 |
}; |
230 |
|
231 |
/* Commit message */ |
232 |
static unsigned char commit_out[] = { |
233 |
0x02, 0x94, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08, 0x00, 0x2C, 0x03, 0x00, |
234 |
0x30, 0x1B, 0x00, 0x00, |
235 |
0x00, 0x20, 0x00, 0x08, 0x00, 0x20, 0x03, 0x00, 0x30, 0x3D, 0x10, 0x00, |
236 |
0x00, 0x20, 0x00, 0x08, |
237 |
0x00, 0x18, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08, |
238 |
0x00, 0x24, 0x03, 0x00, |
239 |
0x30, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08, 0x00, 0x28, 0x03, 0x00, |
240 |
0x30, 0x08, 0x00, 0x00, |
241 |
0x00, 0x20, 0x00, 0x08, 0x00, 0x30, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00, |
242 |
0x00, 0x20, 0x00, 0x08, |
243 |
0x00, 0x38, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08, |
244 |
0x00, 0x3C, 0x03, 0x00, |
245 |
0x30, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08, 0x00, 0x44, 0x03, 0x00, |
246 |
0x30, 0x14, 0x00, 0x00, |
247 |
0x00, 0x20, 0x00, 0x08, 0x00, 0x48, 0x03, 0x00, 0x30, 0x01, 0x04, 0x02, |
248 |
0x00, 0x20, 0x00, 0x08, |
249 |
0x00, 0x4C, 0x03, 0x00, 0x30, 0x01, 0x0C, 0x02, 0x00, 0x20, 0x00, 0x08, |
250 |
0x00, 0x54, 0x03, 0x00, |
251 |
0x30, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08, 0x00, 0x5C, 0x03, 0x00, |
252 |
0x30, 0x90, 0x01, 0x02, |
253 |
0x00, 0x20, 0x00, 0x08, 0x00, 0x60, 0x03, 0x00, 0x30, 0x2C, 0x01, 0x19, |
254 |
0x00, 0x20, 0x00, 0x08, |
255 |
0x00, 0x64, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08, |
256 |
0x00, 0x6C, 0x03, 0x00, |
257 |
0x30, 0x1E, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08, 0x00, 0x70, 0x03, 0x00, |
258 |
0x30, 0x21, 0x80, 0x00, |
259 |
0x00, 0x20, 0x00, 0x08, 0x00, 0x78, 0x03, 0x00, 0x30, 0x09, 0x00, 0x02, |
260 |
0x00, 0x20, 0x00, 0x08, |
261 |
0x00, 0x7C, 0x03, 0x00, 0x30, 0x0B, 0x00, 0x19, 0x00, 0x20, 0x00, 0x08, |
262 |
0x00, 0x80, 0x03, 0x00, |
263 |
0x30, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08, 0x00, 0x84, 0x03, 0x00, |
264 |
0x30, 0x3A, 0x00, 0x00, |
265 |
0x00, 0x20, 0x00, 0x08, 0x00, 0x88, 0x03, 0x00, 0x30, 0x14, 0x00, 0x00, |
266 |
0x00, 0x20, 0x00, 0x08, |
267 |
0x00, 0x8C, 0x03, 0x00, 0x30, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08, |
268 |
0x00, 0x90, 0x03, 0x00, |
269 |
0x30, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08, 0x00, 0x94, 0x03, 0x00, |
270 |
0x30, 0x08, 0x00, 0x00, |
271 |
0x00, 0x20, 0x00, 0x08, 0x00, 0x98, 0x03, 0x00, 0x30, 0x00, 0x00, 0xA1, |
272 |
0x01, 0x20, 0x00, 0x08, |
273 |
0x00, 0x9C, 0x03, 0x00, 0x30, 0x00, 0x00, 0xA1, 0x01, 0x20, 0x00, 0x08, |
274 |
0x00, 0xA8, 0x03, 0x00, |
275 |
0x30, 0x64, 0x01, 0x00, 0x00, 0x20, 0x00, 0x08, 0x00, 0xAC, 0x03, 0x00, |
276 |
0x30, 0x64, 0x01, 0x00, |
277 |
0x00, 0x20, 0x00, 0x08, 0x00, 0xB0, 0x03, 0x00, 0x30, 0x00, 0x01, 0x00, |
278 |
0x00, 0x20, 0x00, 0x08, |
279 |
0x00, 0xB4, 0x03, 0x00, 0x30, 0x00, 0x01, 0x00, 0x00, 0x20, 0x00, 0x08, |
280 |
0x00, 0xB8, 0x03, 0x00, |
281 |
0x30, 0x05, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08, 0x00, 0xBC, 0x03, 0x00, |
282 |
0x30, 0x05, 0x00, 0x00, |
283 |
0x00, 0x20, 0x00, 0x08, 0x00, 0xC0, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00, |
284 |
0x00, 0x20, 0x00, 0x08, |
285 |
0x00, 0x84, 0x03, 0x00, 0x30, 0x3B, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08, |
286 |
0x00, 0x08, 0x07, 0x00, |
287 |
0x30, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08, 0x00, 0x0C, 0x07, 0x00, |
288 |
0x30, 0x00, 0x00, 0x00, |
289 |
0x00, 0x20, 0x00, 0x08, 0x00, 0x14, 0x07, 0x00, 0x30, 0x20, 0x00, 0x00, |
290 |
0x00, 0x20, 0x00, 0x08, |
291 |
0x00, 0x1C, 0x07, 0x00, 0x30, 0x1A, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08, |
292 |
0x00, 0x70, 0x0D, 0x00, |
293 |
0x30, 0x01, 0x00, 0x00, 0x00, 0x25, 0x00, 0x28, 0x00, 0x10, 0x00, 0x00, |
294 |
0x00, 0x00, 0x00, 0x00, |
295 |
0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
296 |
0x00, 0x00, 0x00, 0x00, |
297 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
298 |
0x00, 0x00, 0x00, 0x00, |
299 |
0x00, 0x02, 0x00, 0x90, 0x00, 0x00, 0x00, 0x2B, 0xFF, 0x2B, 0xFF, 0x2B, |
300 |
0xED, 0x00, 0x00, 0x2B, |
301 |
0xFB, 0x00, 0x00, 0x2B, 0xC5, 0x00, 0x00, 0x2B, 0x05, 0x80, 0x70, 0x00, |
302 |
0x00, 0x00, 0x00, 0x00, |
303 |
0x00, 0x24, 0xD3, 0x2E, 0xC0, 0x2C, 0x3B, 0x08, 0xF0, 0x3B, 0x09, 0x24, |
304 |
0xBB, 0x3B, 0x0B, 0x24, |
305 |
0xAA, 0x3B, 0x1F, 0xF8, 0x00, 0x3B, 0x3F, 0xF0, 0x00, 0x3B, 0x35, 0xC0, |
306 |
0x00, 0x38, 0x80, 0x2C, |
307 |
0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x38, 0x80, 0x2C, 0x70, 0x00, |
308 |
0x00, 0x00, 0x00, 0xC0, |
309 |
0x3A, 0x80, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x3B, 0x0A, 0x80, |
310 |
0x2E, 0x83, 0x24, 0xDB, |
311 |
0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0xC3, 0x2C, 0x31, 0x83, 0x2C, 0x70, |
312 |
0x00, 0x00, 0x00, 0x00, |
313 |
0xCB, 0x33, 0x1B, 0x83, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00, 0xCB, 0x31, |
314 |
0x83, 0x2C, 0x70, 0x00, |
315 |
0x00, 0x00, 0x00, 0xCB, 0x00, 0x33, 0x1E, 0x83, 0x2E, 0x25, 0xFF, 0xC4, |
316 |
0x00, 0x2F, 0x06, 0x84, |
317 |
0x2E, 0x00, 0x00, 0x10, 0x20, 0x29, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, |
318 |
0x00, 0x23, 0x00, 0x00, |
319 |
0x00, 0x21, 0x00, 0x10, 0x00, 0x48, 0x03, 0x00, 0x30, 0xFF, 0xF0, 0xFF, |
320 |
0xFF, 0x00, 0x00, 0x00, |
321 |
0x00, 0x00, 0x04, 0x00, 0x00, 0x21, 0x00, 0x10, 0x00, 0x4C, 0x03, 0x00, |
322 |
0x30, 0xFF, 0xF0, 0xFF, |
323 |
0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x21, 0x00, 0x10, |
324 |
0x00, 0x20, 0x03, 0x00, |
325 |
0x30, 0x7F, 0x00, 0xFC, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, 0x00, |
326 |
0x00, 0x20, 0x00, 0x08, |
327 |
0x00, 0x24, 0x03, 0x00, 0x30, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08, |
328 |
0x00, 0x1C, 0x07, 0x00, |
329 |
0x30, 0x1A, 0x00, 0x00, 0x00, 0x21, 0x00, 0x10, 0x00, 0x20, 0x03, 0x00, |
330 |
0x30, 0xC3, 0xFF, 0xFF, |
331 |
0xFF, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x20, 0x00, 0x08, |
332 |
0x00, 0x80, 0x03, 0x00, |
333 |
0x30, 0x02, 0x00, 0x00, 0x00, 0x24, 0x00, 0x84, 0x00, 0x31, 0x65, 0x77, |
334 |
0x77, 0x77, 0x78, 0x88, |
335 |
0x77, 0x77, 0x76, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x78, 0x77, 0x67, |
336 |
0x66, 0x66, 0x66, 0x66, |
337 |
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x76, 0x67, 0x66, 0x66, 0x66, 0x66, |
338 |
0x66, 0x77, 0x66, 0x66, |
339 |
0x66, 0x66, 0x67, 0x66, 0x66, 0x66, 0x66, 0x66, 0x76, 0x76, 0x66, 0x56, |
340 |
0x66, 0x66, 0x56, 0x55, |
341 |
0x65, 0x66, 0x66, 0x66, 0x65, 0x66, 0x66, 0x55, 0x66, 0x66, 0x65, 0x66, |
342 |
0x76, 0x76, 0x77, 0x77, |
343 |
0x66, 0x66, 0x66, 0x76, 0x67, 0x66, 0x77, 0x67, 0x66, 0x66, 0x66, 0x56, |
344 |
0x65, 0x66, 0x65, 0x66, |
345 |
0x66, 0x55, 0x55, 0x54, 0x55, 0x65, 0x66, 0x66, 0x66, 0x76, 0x77, 0x87, |
346 |
0x88, 0x77, 0x66, 0x66, |
347 |
0x66, 0x66, 0x66, 0x66, 0x66, 0x65, 0x66, 0x55, 0x55, 0x65, 0x56, 0x55, |
348 |
0x55, 0x55, 0x54, 0x45, |
349 |
0x54, 0x55, 0x55, 0x55, 0x66, 0x66, 0x66, 0x66, 0x66, 0x77, 0x77, 0x77, |
350 |
0x66, 0x26, 0x00, 0x28, |
351 |
0x00, 0xFF, 0x00, 0x0F, 0x00, 0xF0, 0xF0, 0x0F, 0x00, 0x20, 0x00, 0x00, |
352 |
0x00, 0x30, 0x01, 0x02, |
353 |
0x00, 0x2C, 0x01, 0x28, 0x00, 0x20, 0x80, 0x00, 0x00, 0x0A, 0x00, 0x02, |
354 |
0x00, 0x0B, 0x00, 0x19, |
355 |
0x00, 0x40, 0x1F, 0x10, 0x27, 0x00, 0x0F, 0x03, 0x00, |
356 |
}; |
357 |
|
358 |
/* Known interrupts */ |
359 |
|
360 |
static unsigned char empty_interrupt[] = { |
361 |
0x00, 0x00, 0x00, 0x00, 0x00, |
362 |
}; |
363 |
|
364 |
static unsigned char interrupt1[] = { |
365 |
0x02, 0x00, 0x0E, 0x00, 0xF0, |
366 |
}; |
367 |
|
368 |
static unsigned char interrupt2[] = { |
369 |
0x02, 0x04, 0x0A, 0x00, 0xF0, |
370 |
}; |
371 |
|
372 |
static unsigned char interrupt3[] = { |
373 |
0x02, 0x00, 0x0A, 0x00, 0xF0, |
374 |
}; |