FreeCalypso > hg > freecalypso-reveng
annotate frbl/reconst/inc/protocol.h @ 319:f9482000b838
frbl/reconst/convert.c: almost perfect reconstruction
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 05 Mar 2020 04:48:55 +0000 |
parents | 6cba849e3332 |
children |
rev | line source |
---|---|
312
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /****************************************************************************** |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 * FLUID (Flash Loader Utility Independent of Device) |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 * |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 * (C) Delta Technologies 2001. |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 * Cleanup, modifications and extensions by Mads Meisner-Jensen, mmj@ti.com. |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 * |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 * Target/PC protocol definition |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 * |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 * $Id: protocol.h 1.9 Wed, 31 Oct 2001 11:47:00 +0100 mmj $ |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 * |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 ******************************************************************************/ |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 enum ProtocolChars { |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 PROTO_HELLO = 'H', |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 PROTO_BAUDRATE = 'B', |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 PROTO_HARDWARE = 'H', |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 PROTO_QUERY = 'Q', |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 PROTO_QUERY_CHIP = 'C', |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 PROTO_READY = 'R', |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 PROTO_ISEMPTY = 'I', |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 PROTO_DOWNLOAD = 'L', |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 PROTO_DETECT = 'D', |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 PROTO_ERASE = 'E', |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 PROTO_COMPRESS = 'Z', |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 PROTO_PROGRAM = 'P', |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 PROTO_CKSUM = 'C', |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 PROTO_READ = 'R', |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 PROTO_RESET = '0', |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 PROTO_ERROR_CKSUM = 'X', |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 PROTO_ERROR_MEMORY = 'M', |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 PROTO_ERROR_FLASH_TIMEOUT = 'T', |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 PROTO_ERROR_FLASH_COMMAND = 'C', |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 PROTO_ERROR_FLASH_VPP = 'P', |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 PROTO_ERROR_FLASH_LOCKED = 'L', |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 PROTO_ERROR_VERIFY = 'V', |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 PROTO_CHECKSUM = 'C', |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 PROTO_VERSION = 'V', |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 PROTO_ERROR = '?', |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 PROTO_TRACE = '$' |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 }; |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 // Not really part of the protocol but as this header file is included by |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 // both PC side and target side source code, this is an easy place to put |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 // these difinitions. |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 enum ChipIdCodes { |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 // Ulysses and Hercules |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 CHIP_ID_ULYSSES_0 = 0xB2B5, |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 CHIP_ID_ULYSSES_A = 0xB335, |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 CHIP_ID_HERCULES_A = 0xB334, // Correct revision designation? |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 CHIP_ID_HERCULES_B = 0xB32C, // Correct revision designation? |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 // Samson and Calypso |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 CHIP_ID_CALYPSO_A = 0xB2AC, |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 CHIP_ID_CALYPSO_B = 0xB396 |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 }; |
6cba849e3332
frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 |