annotate sw/sniff-dec/parity.c @ 41:118a12e9483b

simtrace3-sniff-dec started
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 31 Aug 2023 08:46:23 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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 };