FreeCalypso > hg > fc-sim-sniff
annotate sw/sniff-dec/parity.c @ 55:5268246520de
simsniff-dec: decode command opcodes
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 04 Oct 2023 00:20:05 +0000 |
parents | 118a12e9483b |
children |
rev | line source |
---|---|
41
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 * We need to check the parity of each received ISO 7816-3 character in |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 * software; this module provides the needed table. |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 */ |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 unsigned char parity_table[256] = { |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0 |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 }; |