annotate frbl/reconst/inc/command.h @ 373:754be25cd6a0

new-aec-defaults: read out from the DSP
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 29 Jul 2021 09:48:50 +0000
parents 9b5079989681
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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 *
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 * COMMAND.H
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 *
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 * This module contains commands structures and functions to analyze a command
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 * received and to build a command to send (request and confirmation).
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 *
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 * (C) Texas Instruments 1998
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 *
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 #ifndef __COMMAND_H__
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 #define __COMMAND_H__
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 #include "main/sys_types.h"
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 #define COM_SERIAL_COMMAND_LENGTH (256) /* In bytes. */
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 #define COM_MAX_NUMBER_OF_16BITS_DATA ( 64)
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 /*
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 * Constants used in the confirmation of the COM_GET_MONITOR_ID command.
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 */
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 enum {
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 COM_MONITOR_STAND_ALONE,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 COM_MONITOR_LIBRARY,
313
9b5079989681 frbl/reconst/inc/command.h: tab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 312
diff changeset
27 COM_BOOTLOADER
312
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 };
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 /*
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 * Constants used in the confirmation of the COM_GET_CHIP_ID command.
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 */
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 enum {
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 COM_POLE112LA00,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 COM_GEMINI_EFH,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 COM_CHIP_NOT_SUPPORTED
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 };
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39
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 * Constants used in the confirmation of the COM_GET_BOARD_ID command.
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 enum {
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 COM_A_SAMPLE_1_0,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 COM_A_SAMPLE_1_5,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 COM_EVA4,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 COM_GAIA_BOARD21
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 };
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 /*
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 * Constants used in the confirmation of the COM_START_APPLICATION command.
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 */
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 enum {
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 COM_APPLICATION_IS_RUNNING,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 COM_MONITOR_IS_RUNNING
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 };
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 /*
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 * List of commands.
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 */
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 enum {
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 COM_GET_MONITOR_ID,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 COM_GET_FLASH_ID,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 COM_GET_CHIP_ID,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 COM_GET_BOARD_ID,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 COM_ERASE_FLASH,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 COM_WRITE_DATA,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 COM_START_APPLICATION,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 COM_READ_PARAMETERS,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 COM_WRITE_PARAMETERS,
313
9b5079989681 frbl/reconst/inc/command.h: tab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 312
diff changeset
74 COM_LOAD_APPLICATION,
9b5079989681 frbl/reconst/inc/command.h: tab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 312
diff changeset
75 COM_SEND_RUN_ADDRESS
312
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 };
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 /*
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 * Functions results.
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 */
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 enum {
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 COM_SUCCESS,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 COM_NO_EXECUTION,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 COM_ERASE_ERROR,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86 COM_WRITE_ERROR,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 COM_PARAMETER_ERROR,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 COM_ADDRESS_ERROR,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 COM_FILE_ERROR,
313
9b5079989681 frbl/reconst/inc/command.h: tab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 312
diff changeset
90 COM_NOT_SUPPORTED,
312
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 COM_COMMAND_UNKNOWN
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 };
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 /*
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 * Constants used in the bootloader.
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97 */
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 enum {
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 CMD_RAM_SUCCESS,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 CMD_RAM_NO_EXECUTION,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 CMD_RAM_WRITE_ERROR,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 CMD_RAM_ADDRESS_ERROR,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 CMD_RAM_FILE_ERROR
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 };
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 /*
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 * These macros allow to access to fields of each structure.
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 */
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 #define COM_COMMAND_WORD(COMMAND) ((COMMAND)->command_word)
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113 #define COM_RESULT(COMMAND) ((COMMAND)->result)
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 #define COM_MONITOR_ID(COMMAND) ((COMMAND)->param.monitor_id.identifier)
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 #define COM_MONITOR_VERSION_FIRST_NBR(COMMAND) ((COMMAND)->param.monitor_id.version_first_nbr)
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119 #define COM_MONITOR_VERSION_SECOND_NBR(COMMAND) ((COMMAND)->param.monitor_id.version_second_nbr)
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121 #define COM_FLASH_ID(COMMAND) ((COMMAND)->param.flash_id.identifier)
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 #define COM_BOARD_ID(COMMAND) ((COMMAND)->param.board_id.identifier)
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 #define COM_FILE_CHECKSUM(COMMAND) ((COMMAND)->param.checksum.file_checksum)
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127 #define COM_FLASH_CHECKSUM(COMMAND) ((COMMAND)->param.checksum.flash_checksum)
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129 #define COM_CHIP_ID(COMMAND) ((COMMAND)->param.chip_id.identifier)
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131 #define COM_STARTING_STATE(COMMAND) ((COMMAND)->param.starting.state)
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133 #define COM_READ_PARAMS_OFFSET(COMMAND) \
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134 ((COMMAND)->param.params_read.param_offset)
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136 #define COM_NUMBER_OF_PARAMS_READ(COMMAND) \
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137 ((COMMAND)->param.params_read.number_of_params)
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139 #define COM_READ_PARAMS_LIST_ADDRESS(COMMAND) \
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140 (&((COMMAND)->param.params_read.param[0]))
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142 #define COM_WRITTEN_PARAMS_OFFSET(COMMAND) \
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 ((COMMAND)->param.params_written.param_offset)
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 #define COM_NUMBER_OF_PARAMS_WRITTEN(COMMAND) \
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 ((COMMAND)->param.params_written.number_of_params)
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148 #define COM_WRITTEN_PARAMS_LIST_ADDRESS(COMMAND) \
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149 (&((COMMAND)->param.params_written.param[0]))
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 #define COM_FILE_RAM_CHECKSUM(COMMAND) ((COMMAND)->param.checksum_RAM.file_checksum)
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 #define COM_RAM_CHECKSUM(COMMAND) ((COMMAND)->param.checksum_RAM.RAM_checksum)
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 #define COM_ADDRESS_MSB(COMMAND) \
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156 ((COMMAND)->param.address.address_msb)
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158 #define COM_ADDRESS_LSB(COMMAND) \
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159 ((COMMAND)->param.address.address_lsb)
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163 /*
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164 * Parameters for each command.
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165 * Get software id : no parameter.
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166 * Get flash id : no parameter.
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167 * Get chip id : no parameter.
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168 * Get board id : no parameter.
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169 * Erase flash : no parameter.
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170 * Write data : no parameter.
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171 * Start application : no parameter.
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172 */
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174 /*
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 * Read parameters:
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176 * - parameter offset (even),
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177 * - number of parameters to read
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178 */
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180 typedef struct s_com_read_params_req {
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181 SYS_UWORD16 param_offset;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182 SYS_UWORD8 number_of_params;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183 } t_com_read_params_req;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185 /*
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186 * Write parameters:
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187 * - parameter offset (even),
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
188 * - number of parameters (16 bits) to write,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
189 * - list of parameters to write.
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
190 */
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
191
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
192 typedef struct s_com_write_params_req {
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
193 SYS_UWORD16 param_offset;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
194 SYS_UWORD8 number_of_params;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
195 SYS_UWORD16 param[COM_MAX_NUMBER_OF_16BITS_DATA];
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
196 } t_com_write_params_req;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
197
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
198
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
199 /*
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
200 * Start application in RAM
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
201 * - file checksum,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
202 * - flash checksum
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
203 */
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
204
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
205 typedef struct s_com_send_run_address_req {
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
206 SYS_UWORD16 address_msb;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
207 SYS_UWORD16 address_lsb;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
208 } t_com_send_run_address_req;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
209
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
210
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
211 /*
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
212 * General request structure.
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
213 */
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
214
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
215 typedef struct s_com_request {
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
216 SYS_UWORD8 command_word;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
217 union u_req_param {
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
218 t_com_read_params_req params_read;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
219 t_com_write_params_req params_written;
313
9b5079989681 frbl/reconst/inc/command.h: tab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 312
diff changeset
220 t_com_send_run_address_req address;
312
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
221 } param;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
222 } t_com_request;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
223
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
224 /*
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
225 * Parameters for each confirmation.
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
226 * Erase flash : no parameter.
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
227 * Write parameters : no parameter.
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
228 */
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
229
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
230 /*
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
231 * Get monitor id:
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
232 * - identifier,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
233 * - version.
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
234 */
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
235
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
236 typedef struct s_com_get_monitor_id_cnf {
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
237 SYS_UWORD8 identifier;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
238 SYS_UWORD8 version_first_nbr;
313
9b5079989681 frbl/reconst/inc/command.h: tab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 312
diff changeset
239 SYS_UWORD8 version_second_nbr;
312
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
240 } t_com_get_monitor_id_cnf;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
241
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
242 /*
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
243 * Get flash id:
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
244 * - identifier.
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
245 */
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
246
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
247 typedef struct s_com_get_flash_id_cnf {
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
248 SYS_UWORD8 identifier;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
249 } t_com_get_flash_id_cnf;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
250
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
251 /*
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
252 * Get chip id:
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
253 * - identifier.
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
254 */
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
255
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
256 typedef struct s_com_get_chip_id_cnf {
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
257 SYS_UWORD8 identifier;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
258 } t_com_get_chip_id_cnf;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
259
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
260 /*
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
261 * Get board id:
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
262 * - identifier.
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
263 */
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
264
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
265 typedef struct s_com_get_board_id_cnf {
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
266 SYS_UWORD8 identifier;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
267 } t_com_get_board_id_cnf;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
268
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
269 /*
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
270 * Write data:
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
271 * - file checksum,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
272 * - flash checksum
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
273 */
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
274
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
275 typedef struct s_com_write_data_cnf {
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
276 SYS_UWORD16 file_checksum;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
277 SYS_UWORD16 flash_checksum;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
278 } t_com_write_data_cnf;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
279
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
280 /*
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
281 * Start application:
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
282 * - state (application is running or not)
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
283 */
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
284
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
285 typedef struct s_com_start_application_cnf {
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
286 SYS_UWORD8 state;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
287 } t_com_start_application_cnf;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
288
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
289 /*
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
290 * Read parameters:
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
291 * - number of words (16 bits) read,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
292 * - list of words read.
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
293 */
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
294
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
295 typedef struct s_com_read_params_cnf {
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
296 SYS_UWORD8 number_of_params;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
297 SYS_UWORD16 param[COM_MAX_NUMBER_OF_16BITS_DATA];
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
298 } t_com_read_params_cnf;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
299
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
300
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
301 /*
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
302 * Load application
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
303 * - file checksum,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
304 * - flash checksum
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
305 */
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
306
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
307 typedef struct s_com_load_appli_cnf {
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
308 SYS_UWORD16 file_checksum;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
309 SYS_UWORD16 RAM_checksum;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
310 } t_com_load_appli_cnf;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
311
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
312
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
313
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
314
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
315 /*
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
316 * General confirmation structure.
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
317 */
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
318
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
319 typedef struct s_com_confirmation {
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
320 SYS_UWORD8 command_word;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
321 SYS_UWORD8 result;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
322 union u_cnf_param {
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
323 t_com_get_monitor_id_cnf monitor_id;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
324 t_com_get_flash_id_cnf flash_id;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
325 t_com_get_chip_id_cnf chip_id;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
326 t_com_get_board_id_cnf board_id;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
327 t_com_write_data_cnf checksum;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
328 t_com_start_application_cnf starting;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
329 t_com_read_params_cnf params_read;
313
9b5079989681 frbl/reconst/inc/command.h: tab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 312
diff changeset
330 t_com_load_appli_cnf checksum_RAM;
312
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
331 } param;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
332 } t_com_confirmation;
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
333
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
334 extern long com_analyze_request (SYS_UWORD8 *request_received,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
335 t_com_request *request);
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
336
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
337 extern long com_analyze_confirmation (SYS_UWORD8 *confirmation_received,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
338 t_com_confirmation *confirmation);
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
339
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
340 extern long com_build_request (t_com_request *request,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
341 SYS_UWORD8 *request_to_send);
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
342
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
343 extern long com_build_confirmation (t_com_confirmation *confirmation,
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
344 SYS_UWORD8 *confirmation_to_send);
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
345
6cba849e3332 frbl/reconst/inc: import from TCS211 surviving source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
346 #endif /* __COMMAND_H__ */