1 | /*
|
---|
2 | ** Copyright 2012 by Kvaser AB, Mölndal, Sweden
|
---|
3 | ** http://www.kvaser.com
|
---|
4 | **
|
---|
5 | ** This software is dual licensed under the following two licenses:
|
---|
6 | ** BSD-new and GPLv2. You may use either one. See the included
|
---|
7 | ** COPYING file for details.
|
---|
8 | **
|
---|
9 | ** License: BSD-new
|
---|
10 | ** ===============================================================================
|
---|
11 | ** Redistribution and use in source and binary forms, with or without
|
---|
12 | ** modification, are permitted provided that the following conditions are met:
|
---|
13 | ** * Redistributions of source code must retain the above copyright
|
---|
14 | ** notice, this list of conditions and the following disclaimer.
|
---|
15 | ** * Redistributions in binary form must reproduce the above copyright
|
---|
16 | ** notice, this list of conditions and the following disclaimer in the
|
---|
17 | ** documentation and/or other materials provided with the distribution.
|
---|
18 | ** * Neither the name of the <organization> nor the
|
---|
19 | ** names of its contributors may be used to endorse or promote products
|
---|
20 | ** derived from this software without specific prior written permission.
|
---|
21 | **
|
---|
22 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
---|
23 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
---|
24 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
---|
25 | ** DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
---|
26 | ** DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
---|
27 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
---|
28 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
---|
29 | ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
---|
30 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
---|
31 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
---|
32 | **
|
---|
33 | **
|
---|
34 | ** License: GPLv2
|
---|
35 | ** ===============================================================================
|
---|
36 | ** This program is free software; you can redistribute it and/or
|
---|
37 | ** modify it under the terms of the GNU General Public License
|
---|
38 | ** as published by the Free Software Foundation; either version 2
|
---|
39 | ** of the License, or (at your option) any later version.
|
---|
40 | **
|
---|
41 | ** This program is distributed in the hope that it will be useful,
|
---|
42 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
43 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
44 | ** GNU General Public License for more details.
|
---|
45 | **
|
---|
46 | ** You should have received a copy of the GNU General Public License
|
---|
47 | ** along with this program; if not, write to the Free Software
|
---|
48 | ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
---|
49 | **
|
---|
50 | ** ---------------------------------------------------------------------------
|
---|
51 | **/
|
---|
52 |
|
---|
53 | #ifndef _HELIOS_CMDS_H_
|
---|
54 | #define _HELIOS_CMDS_H_
|
---|
55 |
|
---|
56 | #include "debug.h"
|
---|
57 | #ifdef HELIOS_PRIVATE
|
---|
58 | # include "helios_private.h"
|
---|
59 | #endif
|
---|
60 |
|
---|
61 | # include <linux/types.h>
|
---|
62 |
|
---|
63 | #define CMD_RX_STD_MESSAGE 12
|
---|
64 | #define CMD_TX_STD_MESSAGE 13
|
---|
65 | #define CMD_RX_EXT_MESSAGE 14
|
---|
66 | #define CMD_TX_EXT_MESSAGE 15
|
---|
67 | #define CMD_SET_BUSPARAMS_REQ 16
|
---|
68 | #define CMD_GET_BUSPARAMS_REQ 17
|
---|
69 | #define CMD_GET_BUSPARAMS_RESP 18
|
---|
70 | #define CMD_GET_CHIP_STATE_REQ 19
|
---|
71 | #define CMD_CHIP_STATE_EVENT 20
|
---|
72 | #define CMD_SET_DRIVERMODE_REQ 21
|
---|
73 | #define CMD_GET_DRIVERMODE_REQ 22
|
---|
74 | #define CMD_GET_DRIVERMODE_RESP 23
|
---|
75 | #define CMD_RESET_CHIP_REQ 24
|
---|
76 | #define CMD_RESET_CARD_REQ 25
|
---|
77 | #define CMD_START_CHIP_REQ 26
|
---|
78 | #define CMD_START_CHIP_RESP 27
|
---|
79 | #define CMD_STOP_CHIP_REQ 28
|
---|
80 | #define CMD_STOP_CHIP_RESP 29
|
---|
81 | #define CMD_READ_CLOCK_REQ 30
|
---|
82 | #define CMD_READ_CLOCK_RESP 31
|
---|
83 | #define CMD_RESET_CLOCK 32
|
---|
84 | #define CMD_CLOCK_OVERFLOW_EVENT 33
|
---|
85 | #define CMD_GET_CARD_INFO_REQ 34
|
---|
86 | #define CMD_GET_CARD_INFO_RESP 35
|
---|
87 | #define CMD_GET_INTERFACE_INFO_REQ 36
|
---|
88 | #define CMD_GET_INTERFACE_INFO_RESP 37
|
---|
89 | #define CMD_GET_SOFTWARE_INFO_REQ 38
|
---|
90 | #define CMD_GET_SOFTWARE_INFO_RESP 39
|
---|
91 | #define CMD_GET_BUSLOAD_REQ 40
|
---|
92 | #define CMD_GET_BUSLOAD_RESP 41
|
---|
93 | #define CMD_RESET_STATISTICS 42
|
---|
94 | #define CMD_CHECK_LICENSE_REQ 43
|
---|
95 | #define CMD_CHECK_LICENSE_RESP 44
|
---|
96 | #define CMD_ERROR_EVENT 45
|
---|
97 | // 46, 47 reserved
|
---|
98 | #define CMD_FLUSH_QUEUE 48
|
---|
99 | #define CMD_RESET_ERROR_COUNTER 49
|
---|
100 | #define CMD_TX_ACKNOWLEDGE 50
|
---|
101 | #define CMD_CAN_ERROR_EVENT 51
|
---|
102 | #define CMD_MEMO_WRITE_SECTOR_REQ 52
|
---|
103 | #define CMD_MEMO_WRITE_SECTOR_RESP 53
|
---|
104 | #define CMD_MEMO_ERASE_SECTOR_REQ 54
|
---|
105 | #define CMD_MEMO_WRITE_CONFIG_REQ 55
|
---|
106 | #define CMD_MEMO_WRITE_CONFIG_RESP 56
|
---|
107 | #define CMD_MEMO_READ_CONFIG_REQ 57
|
---|
108 | #define CMD_MEMO_READ_CONFIG_RESP 58
|
---|
109 | #define CMD_MEMO_ERASE_SECTOR_RESP 59
|
---|
110 | #define CMD_TX_REQUEST 60
|
---|
111 | #define CMD_SET_HEARTBEAT_RATE_REQ 61
|
---|
112 | #define CMD_HEARTBEAT_RESP 62
|
---|
113 | #define CMD_SET_AUTO_TX_BUFFER 63
|
---|
114 | #define CMD_MEMO_GET_FILESYSTEM_INFO_STRUCT_REQ 64
|
---|
115 | #define CMD_MEMO_GET_FILESYSTEM_INFO_STRUCT_RESP 65
|
---|
116 | #define CMD_MEMO_GET_DISK_INFO_STRUCT_REQ 66
|
---|
117 | #define CMD_MEMO_GET_DISK_INFO_STRUCT_RESP 67
|
---|
118 | #define CMD_MEMO_GET_DISK_HW_INFO_STRUCT_REQ 68
|
---|
119 | #define CMD_MEMO_GET_DISK_HW_INFO_STRUCT_RESP 69
|
---|
120 | #define CMD_MEMO_FORMAT_DISK_REQ 70
|
---|
121 | #define CMD_MEMO_FORMAT_DISK_RESP 71
|
---|
122 | #define CMD_AUTO_TX_BUFFER_REQ 72
|
---|
123 | #define CMD_AUTO_TX_BUFFER_RESP 73
|
---|
124 | #define CMD_SET_TRANSCEIVER_MODE_REQ 74
|
---|
125 |
|
---|
126 | // 75,76,77,78,79,80,81 may be used
|
---|
127 |
|
---|
128 | #define CMD_MEMO_GET_RTC_REQ 82
|
---|
129 | #define CMD_MEMO_GET_RTC_RESP 83
|
---|
130 | #define CMD_MEMO_SET_RTC_REQ 84
|
---|
131 | #define CMD_MEMO_SET_RTC_RESP 85
|
---|
132 |
|
---|
133 | #define CMD_SET_IO_PORTS_REQ 86
|
---|
134 | #define CMD_GET_IO_PORTS_REQ 87
|
---|
135 | #define CMD_GET_IO_PORTS_RESP 88
|
---|
136 |
|
---|
137 | #define CMD_MEMO_READ_SECTOR_REQ 89
|
---|
138 | #define CMD_MEMO_READ_SECTOR_RESP 90
|
---|
139 |
|
---|
140 | // Micro file access on Aurora
|
---|
141 | #define CMD_READ_UFILE_REQ 91
|
---|
142 | #define CMD_READ_UFILE_RESP 92
|
---|
143 | #define CMD_WRITE_UFILE_REQ 93
|
---|
144 | #define CMD_WRITE_UFILE_RESP 94
|
---|
145 | #define CMD_FORMAT_UFILES_REQ 95
|
---|
146 | #define CMD_FORMAT_UFILES_RESP 96
|
---|
147 |
|
---|
148 | #define CMD_GET_TRANSCEIVER_INFO_REQ 97
|
---|
149 | #define CMD_GET_TRANSCEIVER_INFO_RESP 98
|
---|
150 |
|
---|
151 | #define CMD_MEMO_CONFIG_MODE_REQ 99
|
---|
152 | #define CMD_MEMO_CONFIG_MODE_RESP 100
|
---|
153 |
|
---|
154 | #define CMD_LED_ACTION_REQ 101
|
---|
155 | #define CMD_LED_ACTION_RESP 102
|
---|
156 |
|
---|
157 | // Sub commands for the above commands
|
---|
158 | #define SUBCOMMAND_UFILE_START 1
|
---|
159 | #define SUBCOMMAND_UFILE_BULK 2
|
---|
160 | #define SUBCOMMAND_UFILE_STOP 3
|
---|
161 | // Nmbr of bytes per chunk
|
---|
162 | #define UFILE_DATA_CHUNK_SIZE 24
|
---|
163 | // Target CPU for u-file
|
---|
164 | #define UFILE_TARGET_MAIN_BOARD 0
|
---|
165 | #define UFILE_TARGET_PIGGY_BACK 1
|
---|
166 |
|
---|
167 | #define LED_SUBCOMMAND_ALL_LEDS_ON 0
|
---|
168 | #define LED_SUBCOMMAND_ALL_LEDS_OFF 1
|
---|
169 | #define LED_SUBCOMMAND_LED_0_ON 2
|
---|
170 | #define LED_SUBCOMMAND_LED_0_OFF 3
|
---|
171 | #define LED_SUBCOMMAND_LED_1_ON 4
|
---|
172 | #define LED_SUBCOMMAND_LED_1_OFF 5
|
---|
173 | #define LED_SUBCOMMAND_LED_2_ON 6
|
---|
174 | #define LED_SUBCOMMAND_LED_2_OFF 7
|
---|
175 | #define LED_SUBCOMMAND_LED_3_ON 8
|
---|
176 | #define LED_SUBCOMMAND_LED_3_OFF 9
|
---|
177 |
|
---|
178 | //////////////////////////////////////////////////////////
|
---|
179 | // subcommands & other Memorator stuff
|
---|
180 | #define MEMO_SUBCOMMAND_START_CONFIG 6
|
---|
181 | #define MEMO_SUBCOMMAND_BULK_CONFIG 7
|
---|
182 | #define MEMO_SUBCOMMAND_STOP_CONFIG 8
|
---|
183 |
|
---|
184 | #define MEMO_SUBCOMMAND_GET_FILESYSTEM_INFO_STRUCT 9
|
---|
185 | #define MEMO_SUBCOMMAND_GET_DISK_INFO_STRUCT 10
|
---|
186 | #define MEMO_SUBCOMMAND_FORMAT_DISK 12
|
---|
187 | #define MEMO_SUBCOMMAND_GET_RTC 13
|
---|
188 | #define MEMO_SUBCOMMAND_SET_RTC 14
|
---|
189 |
|
---|
190 | #define MEMO_SUBCOMMAND_BULK_SECTOR 16
|
---|
191 | #define MEMO_SUBCOMMAND_STOP_SECTOR 17
|
---|
192 |
|
---|
193 | #define MEMO_SUBCOMMAND_START_PHYSICAL_SECTOR 19
|
---|
194 | #define MEMO_SUBCOMMAND_STREAM_SECTOR 20
|
---|
195 | #define MEMO_SUBCOMMAND_START_LOGICAL_SECTOR 21
|
---|
196 |
|
---|
197 |
|
---|
198 | #define CONFIG_DATA_CHUNK 24
|
---|
199 |
|
---|
200 | #define MEMO_CONFIG_SUBCMD_SET_INTERVAL 0
|
---|
201 | #define MEMO_CONFIG_SUBCMD_GET_INTERVAL 1
|
---|
202 | #define MEMO_CONFIG_SUBCMD_UPDATE_TIMEOUT 2
|
---|
203 |
|
---|
204 | ///////////////////////////////////////////////////////////
|
---|
205 |
|
---|
206 |
|
---|
207 |
|
---|
208 | /////////////////////////////////////////////////////////////////////////////////////////////
|
---|
209 | //FLAGS
|
---|
210 | /////////////////////////////////////////////////////////////////////////////////////////////
|
---|
211 |
|
---|
212 | //////////////////////////
|
---|
213 | // CAN message flags
|
---|
214 | #define MSGFLAG_ERROR_FRAME 0x01 // Msg is a bus error
|
---|
215 | #define MSGFLAG_OVERRUN 0x02 // Msgs following this has been lost
|
---|
216 | #define MSGFLAG_NERR 0x04 // NERR active during this msg
|
---|
217 | #define MSGFLAG_WAKEUP 0x08 // Msg rcv'd in wakeup mode
|
---|
218 | #define MSGFLAG_REMOTE_FRAME 0x10 // Msg is a remote frame
|
---|
219 | #define MSGFLAG_RESERVED_1 0x20 // Reserved for future usage
|
---|
220 | #define MSGFLAG_TX 0x40 // TX acknowledge
|
---|
221 | #define MSGFLAG_TXRQ 0x80 // TX request
|
---|
222 |
|
---|
223 |
|
---|
224 | // This one is added to the identifier to mean an extended CAN identifier
|
---|
225 | // #define DRIVER_EXT_FLAG 0x80000000
|
---|
226 |
|
---|
227 |
|
---|
228 | /////////////////////////
|
---|
229 | // Chip status flags
|
---|
230 | #define BUSSTAT_BUSOFF 0x01
|
---|
231 | #define BUSSTAT_ERROR_PASSIVE 0x02
|
---|
232 | #define BUSSTAT_ERROR_WARNING 0x04
|
---|
233 | #define BUSSTAT_ERROR_ACTIVE 0x08
|
---|
234 | #define BUSSTAT_BUSOFF_RECOVERY 0x10
|
---|
235 | #define BUSSTAT_IGNORING_ERRORS 0x20
|
---|
236 |
|
---|
237 |
|
---|
238 | ////////////////////////
|
---|
239 | // Driver modes
|
---|
240 | #define DRIVERMODE_NORMAL 0x01
|
---|
241 | #define DRIVERMODE_SILENT 0x02
|
---|
242 | #define DRIVERMODE_SELFRECEPTION 0x03
|
---|
243 | #define DRIVERMODE_OFF 0x04
|
---|
244 |
|
---|
245 | ////////////////////////
|
---|
246 | // Transceiver (logical) types. Must be the same as TRANSCEIVER_xxx in e.g. canlib.h.
|
---|
247 | #define HELIOS_TRANSCEIVER_TYPE_UNKNOWN 0
|
---|
248 | #define HELIOS_TRANSCEIVER_TYPE_251 1
|
---|
249 | #define HELIOS_TRANSCEIVER_TYPE_252 2 // 252/1053/1054 w/o opto
|
---|
250 | #define HELIOS_TRANSCEIVER_TYPE_SWC 6 // J2411 type
|
---|
251 | #define HELIOS_TRANSCEIVER_TYPE_1054_OPTO 11 // 1054 with optical isolation
|
---|
252 | #define HELIOS_TRANSCEIVER_TYPE_SWC_OPTO 12 // J2411 type with optical isolation
|
---|
253 | #define HELIOS_TRANSCEIVER_TYPE_1050 14 // TJA1050
|
---|
254 | #define HELIOS_TRANSCEIVER_TYPE_1050_OPTO 15 // TJA1050 with optical isolation
|
---|
255 |
|
---|
256 | // Transceiver line modes. Must be the same as in canlib.h
|
---|
257 | #define HELIOS_TRANSCEIVER_LINEMODE_NA 0 // Not Affected/Not available.
|
---|
258 | #define HELIOS_TRANSCEIVER_LINEMODE_SWC_SLEEP 4 // SWC Sleep Mode.
|
---|
259 | #define HELIOS_TRANSCEIVER_LINEMODE_SWC_NORMAL 5 // SWC Normal Mode.
|
---|
260 | #define HELIOS_TRANSCEIVER_LINEMODE_SWC_FAST 6 // SWC High-Speed Mode.
|
---|
261 | #define HELIOS_TRANSCEIVER_LINEMODE_SWC_WAKEUP 7 // SWC Wakeup Mode.
|
---|
262 | #define HELIOS_TRANSCEIVER_LINEMODE_SLEEP 8 // Sleep mode for those supporting it.
|
---|
263 | #define HELIOS_TRANSCEIVER_LINEMODE_NORMAL 9 // Normal mode (the inverse of sleep mode) for those supporting it.
|
---|
264 | #define HELIOS_TRANSCEIVER_LINEMODE_STDBY 10 // Standby for those who support it
|
---|
265 | // Transceiver resnet modes. Not supported.
|
---|
266 | #define HELIOS_TRANSCEIVER_RESNET_NA 0
|
---|
267 |
|
---|
268 |
|
---|
269 | ////////////////////////////
|
---|
270 | // Error codes.
|
---|
271 | // Used in CMD_ERROR_EVENT.
|
---|
272 | #define FIRMWARE_ERR_OK 0 // No error.
|
---|
273 | #define FIRMWARE_ERR_CAN 1 // CAN error, addInfo1 contains error code.
|
---|
274 | #define FIRMWARE_ERR_NVRAM_ERROR 2 // Flash error
|
---|
275 | #define FIRMWARE_ERR_NOPRIV 3 // No privilege for attempted operation
|
---|
276 | #define FIRMWARE_ERR_ILLEGAL_ADDRESS 4 // Illegal RAM/ROM address specified
|
---|
277 | #define FIRMWARE_ERR_UNKNOWN_CMD 5 // Unknown command or subcommand
|
---|
278 | #define FIRMWARE_ERR_FATAL 6 // A severe error. addInfo1 contains error code.
|
---|
279 | #define FIRMWARE_ERR_CHECKSUM_ERROR 7 // Downloaded code checksum mismatch
|
---|
280 | #define FIRMWARE_ERR_QUEUE_LEVEL 8 // Tx queue levels (probably driver error)
|
---|
281 | #define FIRMWARE_ERR_PARAMETER 9 // Parameter error, addInfo1 contains offending command
|
---|
282 |
|
---|
283 | // Maximum length of a command. A change here will make the firmware incompatible
|
---|
284 | // with the driver, unless both are recompiled and replaced.
|
---|
285 | #define MAX_CMD_LEN 32
|
---|
286 |
|
---|
287 |
|
---|
288 | // For CMD_READ_CLOCK_REQ
|
---|
289 | #define READ_CLOCK_NOW 0x01 // Provide a fast, unsynchronized response.
|
---|
290 |
|
---|
291 | // For CMD_GET_SOFTWARE_OPTIONS (max 16 flags here)
|
---|
292 | #define SWOPTION_CONFIG_MODE 0x01 // Memorator in config mode.
|
---|
293 | #define SWOPTION_AUTO_TX_BUFFER 0x02 // Firmware has auto tx buffers
|
---|
294 | #define SWOPTION_BETA 0x04 // Firmware is a beta version
|
---|
295 | #define SWOPTION_RC 0x08 // Firmware is a release candidate
|
---|
296 |
|
---|
297 |
|
---|
298 | // CMD_SET_AUTO_TX_REQ and _RESP enum values
|
---|
299 | #define AUTOTXBUFFER_CMD_GET_INFO 1 // Get implementation information
|
---|
300 | #define AUTOTXBUFFER_CMD_CLEAR_ALL 2 // Clear all buffers on a channel
|
---|
301 | #define AUTOTXBUFFER_CMD_ACTIVATE 3 // Activate a specific buffer
|
---|
302 | #define AUTOTXBUFFER_CMD_DEACTIVATE 4 // Dectivate a specific buffer
|
---|
303 | #define AUTOTXBUFFER_CMD_SET_INTERVAL 5 // Set tx buffer transmission interval
|
---|
304 |
|
---|
305 | // CMD_SET_AUTO_TX_RESP bit values for automatic tx buffer capabilities
|
---|
306 | #define AUTOTXBUFFER_CAP_TIMED_TX 0x01 // Periodic transmission
|
---|
307 | #define AUTOTXBUFFER_CAP_AUTO_RESP_DATA 0x02 // Auto response to data frames
|
---|
308 | #define AUTOTXBUFFER_CAP_AUTO_RESP_RTR 0x04 // Auto response to RTR
|
---|
309 |
|
---|
310 | // Use these message flags with cmdSetAutoTxBuffer.flags
|
---|
311 | #define AUTOTXBUFFER_MSG_REMOTE_FRAME 0x10 // Msg is a remote frame
|
---|
312 | #define AUTOTXBUFFER_MSG_EXT 0x80 // Extended identifier
|
---|
313 |
|
---|
314 |
|
---|
315 | /////////////////////////////////////////////////////////////////////////////////////
|
---|
316 | //COMMAND STRUCTS
|
---|
317 | /////////////////////////////////////////////////////////////////////////////////////
|
---|
318 | #include <pshpack1.h>
|
---|
319 |
|
---|
320 | ////////////////////////
|
---|
321 | //Header for every cmd
|
---|
322 | typedef struct {
|
---|
323 | unsigned char cmdLen; // The length of the whole packet (i.e. including this byte)
|
---|
324 | unsigned char cmdNo;
|
---|
325 | } cmdHead;
|
---|
326 |
|
---|
327 |
|
---|
328 | /*
|
---|
329 | ** The following structs must be longword aligned, because the
|
---|
330 | ** PC can read longwords only (using Helios hardware.) Their lengths must be an even
|
---|
331 | ** multiple of 4.
|
---|
332 | */
|
---|
333 |
|
---|
334 | typedef struct {
|
---|
335 | unsigned char cmdLen;
|
---|
336 | unsigned char cmdNo;
|
---|
337 | unsigned char channel;
|
---|
338 | unsigned char flags;
|
---|
339 | unsigned char rawMessage[14];
|
---|
340 | unsigned short time;
|
---|
341 | } cmdRxCanMessage;
|
---|
342 |
|
---|
343 | typedef struct {
|
---|
344 | unsigned char cmdLen;
|
---|
345 | unsigned char cmdNo;
|
---|
346 | unsigned char channel;
|
---|
347 | unsigned char transId;
|
---|
348 | unsigned char rawMessage[14];
|
---|
349 | unsigned char flags;
|
---|
350 | unsigned char _padding0;
|
---|
351 | } cmdTxCanMessage;
|
---|
352 |
|
---|
353 | typedef struct {
|
---|
354 | unsigned char cmdLen;
|
---|
355 | unsigned char cmdNo;
|
---|
356 | unsigned char channel;
|
---|
357 | unsigned char transId;
|
---|
358 | unsigned short time;
|
---|
359 | unsigned short _padding0;
|
---|
360 | } cmdTxAck;
|
---|
361 |
|
---|
362 | typedef struct {
|
---|
363 | unsigned char cmdLen;
|
---|
364 | unsigned char cmdNo;
|
---|
365 | unsigned char channel;
|
---|
366 | unsigned char transId;
|
---|
367 | unsigned short time;
|
---|
368 | unsigned short _padding0;
|
---|
369 | } cmdTxRequest;
|
---|
370 |
|
---|
371 | typedef struct {
|
---|
372 | unsigned char cmdLen;
|
---|
373 | unsigned char cmdNo;
|
---|
374 | unsigned char transId;
|
---|
375 | unsigned char channel;
|
---|
376 | uint32_t bitRate;
|
---|
377 | unsigned char tseg1;
|
---|
378 | unsigned char tseg2;
|
---|
379 | unsigned char sjw;
|
---|
380 | unsigned char noSamp;
|
---|
381 | } cmdSetBusparamsReq;
|
---|
382 |
|
---|
383 | typedef struct {
|
---|
384 | unsigned char cmdLen;
|
---|
385 | unsigned char cmdNo;
|
---|
386 | unsigned char transId;
|
---|
387 | unsigned char channel;
|
---|
388 | } cmdGetBusparamsReq;
|
---|
389 |
|
---|
390 | typedef struct {
|
---|
391 | unsigned char cmdLen;
|
---|
392 | unsigned char cmdNo;
|
---|
393 | unsigned char transId;
|
---|
394 | unsigned char channel;
|
---|
395 | uint32_t bitRate;
|
---|
396 | unsigned char tseg1;
|
---|
397 | unsigned char tseg2;
|
---|
398 | unsigned char sjw;
|
---|
399 | unsigned char noSamp;
|
---|
400 | } cmdGetBusparamsResp;
|
---|
401 |
|
---|
402 | typedef struct {
|
---|
403 | unsigned char cmdLen;
|
---|
404 | unsigned char cmdNo;
|
---|
405 | unsigned char transId;
|
---|
406 | unsigned char channel;
|
---|
407 | } cmdGetChipStateReq;
|
---|
408 |
|
---|
409 | typedef struct {
|
---|
410 | unsigned char cmdLen;
|
---|
411 | unsigned char cmdNo;
|
---|
412 | unsigned char transId;
|
---|
413 | unsigned char channel;
|
---|
414 | unsigned char txErrorCounter;
|
---|
415 | unsigned char rxErrorCounter;
|
---|
416 | unsigned short time;
|
---|
417 | unsigned char busStatus;
|
---|
418 | unsigned char padding;
|
---|
419 | unsigned short padding2;
|
---|
420 | } cmdChipStateEvent;
|
---|
421 |
|
---|
422 | typedef struct {
|
---|
423 | unsigned char cmdLen;
|
---|
424 | unsigned char cmdNo;
|
---|
425 | unsigned char transId;
|
---|
426 | unsigned char channel;
|
---|
427 | unsigned char driverMode;
|
---|
428 | unsigned char padding;
|
---|
429 | unsigned short padding2;
|
---|
430 | } cmdSetDrivermodeReq;
|
---|
431 |
|
---|
432 | typedef struct {
|
---|
433 | unsigned char cmdLen;
|
---|
434 | unsigned char cmdNo;
|
---|
435 | unsigned char transId;
|
---|
436 | unsigned char channel;
|
---|
437 | } cmdGetDrivermodeReq;
|
---|
438 |
|
---|
439 | typedef struct {
|
---|
440 | unsigned char cmdLen;
|
---|
441 | unsigned char cmdNo;
|
---|
442 | unsigned char transId;
|
---|
443 | unsigned char channel;
|
---|
444 | unsigned char driverMode;
|
---|
445 | unsigned char padding;
|
---|
446 | unsigned short padding2;
|
---|
447 | } cmdGetDrivermodeResp;
|
---|
448 |
|
---|
449 | typedef struct {
|
---|
450 | unsigned char cmdLen;
|
---|
451 | unsigned char cmdNo;
|
---|
452 | unsigned char transId;
|
---|
453 | unsigned char channel;
|
---|
454 | } cmdResetChipReq;
|
---|
455 |
|
---|
456 | typedef struct {
|
---|
457 | unsigned char cmdLen;
|
---|
458 | unsigned char cmdNo;
|
---|
459 | unsigned char transId;
|
---|
460 | unsigned char padding;
|
---|
461 | } cmdResetCardReq;
|
---|
462 |
|
---|
463 | typedef struct {
|
---|
464 | unsigned char cmdLen;
|
---|
465 | unsigned char cmdNo;
|
---|
466 | unsigned char transId;
|
---|
467 | unsigned char channel;
|
---|
468 | } cmdStartChipReq;
|
---|
469 |
|
---|
470 | typedef struct {
|
---|
471 | unsigned char cmdLen;
|
---|
472 | unsigned char cmdNo;
|
---|
473 | unsigned char transId;
|
---|
474 | unsigned char channel;
|
---|
475 | } cmdStartChipResp;
|
---|
476 |
|
---|
477 | typedef struct {
|
---|
478 | unsigned char cmdLen;
|
---|
479 | unsigned char cmdNo;
|
---|
480 | unsigned char transId;
|
---|
481 | unsigned char channel;
|
---|
482 | } cmdStopChipReq;
|
---|
483 |
|
---|
484 | typedef struct {
|
---|
485 | unsigned char cmdLen;
|
---|
486 | unsigned char cmdNo;
|
---|
487 | unsigned char transId;
|
---|
488 | unsigned char channel;
|
---|
489 | } cmdStopChipResp;
|
---|
490 |
|
---|
491 | typedef struct {
|
---|
492 | unsigned char cmdLen;
|
---|
493 | unsigned char cmdNo;
|
---|
494 | unsigned char transId;
|
---|
495 | unsigned char flags;
|
---|
496 | } cmdReadClockReq;
|
---|
497 |
|
---|
498 | typedef struct {
|
---|
499 | unsigned char cmdLen;
|
---|
500 | unsigned char cmdNo;
|
---|
501 | unsigned char transId;
|
---|
502 | unsigned char padding;
|
---|
503 | unsigned short time[2];
|
---|
504 | } cmdReadClockResp;
|
---|
505 |
|
---|
506 | typedef struct {
|
---|
507 | unsigned char cmdLen;
|
---|
508 | unsigned char cmdNo;
|
---|
509 | unsigned char transId;
|
---|
510 | unsigned char padding;
|
---|
511 | } cmdResetClock;
|
---|
512 |
|
---|
513 | typedef struct {
|
---|
514 | unsigned char cmdLen;
|
---|
515 | unsigned char cmdNo;
|
---|
516 | unsigned char transId;
|
---|
517 | unsigned char padding;
|
---|
518 | uint32_t currentTime;
|
---|
519 | } cmdClockOverflowEvent;
|
---|
520 |
|
---|
521 | typedef struct {
|
---|
522 | unsigned char cmdLen;
|
---|
523 | unsigned char cmdNo;
|
---|
524 | unsigned char transId;
|
---|
525 | signed char dataLevel;
|
---|
526 | } cmdGetCardInfoReq;
|
---|
527 |
|
---|
528 | typedef struct {
|
---|
529 | unsigned char cmdLen;
|
---|
530 | unsigned char cmdNo;
|
---|
531 | unsigned char transId;
|
---|
532 | unsigned char channelCount;
|
---|
533 | uint32_t serialNumberLow;
|
---|
534 | uint32_t serialNumberHigh;
|
---|
535 | uint32_t clockResolution;
|
---|
536 | uint32_t mfgDate;
|
---|
537 | unsigned char EAN[8]; // LSB..MSB, then the check digit.
|
---|
538 | unsigned char hwRevision;
|
---|
539 | unsigned char padding;
|
---|
540 | unsigned short padding2;
|
---|
541 | } cmdGetCardInfoResp;
|
---|
542 |
|
---|
543 | typedef struct {
|
---|
544 | unsigned char cmdLen;
|
---|
545 | unsigned char cmdNo;
|
---|
546 | unsigned char transId;
|
---|
547 | unsigned char channel;
|
---|
548 | } cmdGetInterfaceInfoReq;
|
---|
549 |
|
---|
550 | typedef struct {
|
---|
551 | unsigned char cmdLen;
|
---|
552 | unsigned char cmdNo;
|
---|
553 | unsigned char transId;
|
---|
554 | unsigned char channel;
|
---|
555 | uint32_t channelCapabilities;
|
---|
556 | unsigned char canChipType;
|
---|
557 | unsigned char canChipSubType;
|
---|
558 | unsigned short padding;
|
---|
559 | } cmdGetInterfaceInfoResp;
|
---|
560 |
|
---|
561 | typedef struct {
|
---|
562 | unsigned char cmdLen;
|
---|
563 | unsigned char cmdNo;
|
---|
564 | unsigned char transId;
|
---|
565 | unsigned char padding;
|
---|
566 | } cmdGetSoftwareInfoReq;
|
---|
567 |
|
---|
568 | typedef struct {
|
---|
569 | unsigned char cmdLen;
|
---|
570 | unsigned char cmdNo;
|
---|
571 | unsigned char transId;
|
---|
572 | // Firmwares up to 1.3 used this one:
|
---|
573 | // unsigned char applicationName[13];
|
---|
574 | // or rather, they didn't use it. So from 1.4 and on we use this instead:
|
---|
575 | unsigned char applicationName[5];
|
---|
576 | unsigned short maxOutstandingTx;
|
---|
577 | unsigned char padding[6];
|
---|
578 | // End modifications for 1.4. Driver must test for firmware version being
|
---|
579 | // at least 1.4 if it wants to use the maxOutstandingTx value.
|
---|
580 | uint32_t applicationVersion;
|
---|
581 | unsigned short checkSum;
|
---|
582 | unsigned short swOptions;
|
---|
583 | } cmdGetSoftwareInfoResp;
|
---|
584 |
|
---|
585 | typedef struct {
|
---|
586 | unsigned char cmdLen;
|
---|
587 | unsigned char cmdNo;
|
---|
588 | unsigned char transId;
|
---|
589 | unsigned char channel;
|
---|
590 | } cmdGetBusLoadReq;
|
---|
591 |
|
---|
592 | typedef struct {
|
---|
593 | unsigned char cmdLen;
|
---|
594 | unsigned char cmdNo;
|
---|
595 | unsigned char transId;
|
---|
596 | unsigned char channel;
|
---|
597 | unsigned short sample_interval; // Sampling interval in microseconds
|
---|
598 | unsigned short active_samples; // Number of samples where tx or rx was active
|
---|
599 | unsigned short delta_t; // Milliseconds since last response
|
---|
600 | unsigned short time; // "Absolute" timestamp
|
---|
601 | } cmdGetBusLoadResp;
|
---|
602 |
|
---|
603 | typedef struct {
|
---|
604 | unsigned char cmdLen;
|
---|
605 | unsigned char cmdNo;
|
---|
606 | unsigned char transId;
|
---|
607 | unsigned char channel;
|
---|
608 | } cmdResetStatisticsReq;
|
---|
609 |
|
---|
610 | typedef struct {
|
---|
611 | unsigned char cmdLen;
|
---|
612 | unsigned char cmdNo;
|
---|
613 | unsigned char transId;
|
---|
614 | unsigned char padding;
|
---|
615 | } cmdCheckLicenseReq;
|
---|
616 |
|
---|
617 | typedef struct {
|
---|
618 | unsigned char cmdLen;
|
---|
619 | unsigned char cmdNo;
|
---|
620 | unsigned char transId;
|
---|
621 | unsigned char padding;
|
---|
622 | uint32_t licenseMask;
|
---|
623 | uint32_t kvaserLicenseMask;
|
---|
624 | } cmdCheckLicenseResp;
|
---|
625 |
|
---|
626 | typedef struct {
|
---|
627 | unsigned char cmdLen;
|
---|
628 | unsigned char cmdNo;
|
---|
629 | unsigned char transId;
|
---|
630 | unsigned char errorCode;
|
---|
631 | unsigned short addInfo1;
|
---|
632 | unsigned short addInfo2;
|
---|
633 | unsigned short time;
|
---|
634 | unsigned short padding;
|
---|
635 | } cmdErrorEvent;
|
---|
636 |
|
---|
637 |
|
---|
638 | typedef struct {
|
---|
639 | unsigned char cmdLen;
|
---|
640 | unsigned char cmdNo;
|
---|
641 | unsigned char transId;
|
---|
642 | unsigned char channel;
|
---|
643 | unsigned char flags;
|
---|
644 | unsigned char padding;
|
---|
645 | unsigned short padding2;
|
---|
646 | } cmdFlushQueue;
|
---|
647 |
|
---|
648 |
|
---|
649 | typedef struct {
|
---|
650 | unsigned char cmdLen;
|
---|
651 | unsigned char cmdNo;
|
---|
652 | unsigned char transId;
|
---|
653 | unsigned char padding;
|
---|
654 | } cmdNoCommand;
|
---|
655 |
|
---|
656 |
|
---|
657 | typedef struct {
|
---|
658 | unsigned char cmdLen;
|
---|
659 | unsigned char cmdNo;
|
---|
660 | unsigned char transId;
|
---|
661 | unsigned char channel;
|
---|
662 | } cmdResetErrorCounter;
|
---|
663 |
|
---|
664 | typedef struct {
|
---|
665 | unsigned char cmdLen;
|
---|
666 | unsigned char cmdNo;
|
---|
667 | unsigned char transId;
|
---|
668 | unsigned char padding;
|
---|
669 | unsigned char txErrorCounterCh0;
|
---|
670 | unsigned char rxErrorCounterCh0;
|
---|
671 | unsigned char txErrorCounterCh1;
|
---|
672 | unsigned char rxErrorCounterCh1;
|
---|
673 | unsigned char busStatusCh0;
|
---|
674 | unsigned char busStatusCh1;
|
---|
675 | unsigned short time;
|
---|
676 | } cmdCanErrorEvent;
|
---|
677 |
|
---|
678 | typedef struct {
|
---|
679 | unsigned char cmdLen;
|
---|
680 | unsigned char cmdNo;
|
---|
681 | unsigned char transId;
|
---|
682 | unsigned char channel;
|
---|
683 | unsigned char lineMode;
|
---|
684 | unsigned char resistorNet; // Not used in Demeter (left-over from LAPcan)
|
---|
685 | unsigned short padding;
|
---|
686 | } cmdSetTransceiverModeReq;
|
---|
687 |
|
---|
688 | //##################################################################
|
---|
689 | // Memorator specific commands
|
---|
690 | typedef struct {
|
---|
691 | unsigned char cmdLen;
|
---|
692 | unsigned char cmdNo;
|
---|
693 | unsigned char transId;
|
---|
694 | unsigned char padding;
|
---|
695 | } cmdMemoGetFilesystemInfoStructReq;
|
---|
696 |
|
---|
697 | typedef struct {
|
---|
698 | unsigned char cmdLen;
|
---|
699 | unsigned char cmdNo;
|
---|
700 | unsigned char transId;
|
---|
701 | unsigned char padding;
|
---|
702 |
|
---|
703 | unsigned short fat_size; // Size of the FAT, in sectors
|
---|
704 | unsigned short fat_type; // 12 or 16 depending on FAT type.
|
---|
705 | unsigned short dir_entries; // Number of directory entries in the root dir
|
---|
706 | unsigned short cluster_size; // Two-logarithm of the cluster size in sectors
|
---|
707 | uint32_t fat1_start; // First FAT starts in this sector
|
---|
708 | uint32_t first_data_sector; // First sector available for data
|
---|
709 | uint32_t last_data_sector;
|
---|
710 | } cmdMemoGetFilesystemInfoStructResp;
|
---|
711 |
|
---|
712 | typedef struct {
|
---|
713 | unsigned char cmdLen;
|
---|
714 | unsigned char cmdNo;
|
---|
715 | unsigned char transId;
|
---|
716 | unsigned char padding;
|
---|
717 | } cmdMemoGetDiskInfoStructReq;
|
---|
718 |
|
---|
719 | typedef struct {
|
---|
720 | unsigned char cmdLen;
|
---|
721 | unsigned char cmdNo;
|
---|
722 | unsigned char transId;
|
---|
723 | unsigned char product_revision;
|
---|
724 | unsigned char oem_id[2];
|
---|
725 | char product_name[10];
|
---|
726 | uint32_t m_id;
|
---|
727 | uint32_t serial_number;
|
---|
728 | unsigned short date_code;
|
---|
729 | unsigned short padding;
|
---|
730 | } cmdMemoGetDiskInfoStructResp;
|
---|
731 |
|
---|
732 |
|
---|
733 | typedef struct {
|
---|
734 | unsigned char cmdLen;
|
---|
735 | unsigned char cmdNo;
|
---|
736 | unsigned char transId;
|
---|
737 | unsigned char padding;
|
---|
738 | } cmdMemoGetDiskHWInfoStructReq;
|
---|
739 |
|
---|
740 | typedef struct {
|
---|
741 | unsigned char cmdLen;
|
---|
742 | unsigned char cmdNo;
|
---|
743 | unsigned char transId;
|
---|
744 | unsigned char padding;
|
---|
745 |
|
---|
746 | unsigned char disk_type;
|
---|
747 | unsigned char version;
|
---|
748 | unsigned char read_time;
|
---|
749 | unsigned char wr_factor;
|
---|
750 |
|
---|
751 | unsigned char file_format;
|
---|
752 | unsigned char erase_value;
|
---|
753 | unsigned short read_blk_size;
|
---|
754 |
|
---|
755 | unsigned short wr_blk_size;
|
---|
756 | unsigned short trans_speed;
|
---|
757 |
|
---|
758 | uint32_t data_size;
|
---|
759 | } cmdMemoGetDiskHWInfoStructResp;
|
---|
760 |
|
---|
761 |
|
---|
762 | typedef struct {
|
---|
763 | unsigned char cmdLen;
|
---|
764 | unsigned char cmdNo;
|
---|
765 | unsigned char transId;
|
---|
766 | unsigned char subCmd;
|
---|
767 | unsigned char data[CONFIG_DATA_CHUNK];
|
---|
768 | } cmdMemoWriteConfigReq;
|
---|
769 |
|
---|
770 | typedef struct {
|
---|
771 | unsigned char cmdLen;
|
---|
772 | unsigned char cmdNo;
|
---|
773 | unsigned char transId;
|
---|
774 | unsigned char status;
|
---|
775 | } cmdMemoWriteConfigResp;
|
---|
776 |
|
---|
777 | typedef struct {
|
---|
778 | unsigned char cmdLen;
|
---|
779 | unsigned char cmdNo;
|
---|
780 | unsigned char transId;
|
---|
781 | unsigned char subCmd;
|
---|
782 | uint32_t dataChunkReqNo;
|
---|
783 | } cmdMemoReadConfigReq;
|
---|
784 |
|
---|
785 | typedef struct {
|
---|
786 | unsigned char cmdLen;
|
---|
787 | unsigned char cmdNo;
|
---|
788 | unsigned char transId;
|
---|
789 | unsigned char subCmd;
|
---|
790 | unsigned char status;
|
---|
791 | unsigned char padding[3];
|
---|
792 | unsigned char data[CONFIG_DATA_CHUNK];
|
---|
793 | } cmdMemoReadConfigResp;
|
---|
794 |
|
---|
795 | // Format disk
|
---|
796 | typedef struct {
|
---|
797 | unsigned char cmdLen;
|
---|
798 | unsigned char cmdNo;
|
---|
799 | unsigned char transId;
|
---|
800 | unsigned char padding;
|
---|
801 | } cmdMemoFormatDiskReq;
|
---|
802 |
|
---|
803 | typedef struct {
|
---|
804 | unsigned char cmdLen;
|
---|
805 | unsigned char cmdNo;
|
---|
806 | unsigned char transId;
|
---|
807 | unsigned char padding;
|
---|
808 | unsigned short formatStatus;
|
---|
809 | unsigned short padding2;
|
---|
810 | } cmdMemoFormatDiskResp;
|
---|
811 |
|
---|
812 | // Read RTC
|
---|
813 | typedef struct {
|
---|
814 | unsigned char cmdLen;
|
---|
815 | unsigned char cmdNo;
|
---|
816 | unsigned char transId;
|
---|
817 | unsigned char padding;
|
---|
818 | } cmdMemoGetRTCReq;
|
---|
819 |
|
---|
820 | // Read RTC - the response
|
---|
821 | typedef struct {
|
---|
822 | unsigned char cmdLen;
|
---|
823 | unsigned char cmdNo;
|
---|
824 | unsigned char transId;
|
---|
825 | unsigned char second;
|
---|
826 | unsigned char minute;
|
---|
827 | unsigned char hour;
|
---|
828 | unsigned char day;
|
---|
829 | unsigned char month;
|
---|
830 | unsigned char year;
|
---|
831 | unsigned char padding;
|
---|
832 | unsigned short padding2;
|
---|
833 | } cmdMemoGetRTCResp;
|
---|
834 |
|
---|
835 | typedef struct {
|
---|
836 | unsigned char cmdLen;
|
---|
837 | unsigned char cmdNo;
|
---|
838 | unsigned char transId;
|
---|
839 | unsigned char second;
|
---|
840 | unsigned char minute;
|
---|
841 | unsigned char hour;
|
---|
842 | unsigned char day;
|
---|
843 | unsigned char month;
|
---|
844 | unsigned char year;
|
---|
845 | unsigned char padding;
|
---|
846 | unsigned short padding2;
|
---|
847 | } cmdMemoSetRTCReq;
|
---|
848 |
|
---|
849 | typedef struct {
|
---|
850 | unsigned char cmdLen;
|
---|
851 | unsigned char cmdNo;
|
---|
852 | unsigned char transId;
|
---|
853 | unsigned char padding;
|
---|
854 | } cmdMemoSetRTCResp;
|
---|
855 |
|
---|
856 | typedef struct {
|
---|
857 | unsigned char cmdLen;
|
---|
858 | unsigned char cmdNo;
|
---|
859 | unsigned char transId;
|
---|
860 | unsigned char subCmd;
|
---|
861 | signed short timeout;
|
---|
862 | signed short padding;
|
---|
863 | } cmdLedActionReq;
|
---|
864 |
|
---|
865 | typedef struct {
|
---|
866 | unsigned char cmdLen;
|
---|
867 | unsigned char cmdNo;
|
---|
868 | unsigned char transId;
|
---|
869 | unsigned char subCmd;
|
---|
870 | } cmdLedActionResp;
|
---|
871 |
|
---|
872 | typedef struct {
|
---|
873 | unsigned char cmdLen;
|
---|
874 | unsigned char cmdNo;
|
---|
875 | unsigned char transId;
|
---|
876 | unsigned char subCmd;
|
---|
877 | signed short reqInterval; // The interval (milliseconds) that Memorator should wait for the next config msg.
|
---|
878 | unsigned char padding[2];
|
---|
879 | } cmdMemoConfigModeReq;
|
---|
880 |
|
---|
881 | typedef struct {
|
---|
882 | unsigned char cmdLen;
|
---|
883 | unsigned char cmdNo;
|
---|
884 | unsigned char transId;
|
---|
885 | unsigned char subCmd;
|
---|
886 | signed short interval; // The actual interval (milliseconds) that Memorator should wait for the next config msg.
|
---|
887 | unsigned char diskStat; // true if the disk is there.
|
---|
888 | unsigned char configMode; // true if we're in config mode.
|
---|
889 | } cmdMemoConfigModeResp;
|
---|
890 |
|
---|
891 | typedef struct {
|
---|
892 | unsigned char cmdLen;
|
---|
893 | unsigned char cmdNo;
|
---|
894 | unsigned char transId;
|
---|
895 | unsigned char portNo; // Hardware-specific port #
|
---|
896 | uint32_t portVal; // Hardware-specific port value
|
---|
897 | } cmdSetIoPortsReq;
|
---|
898 |
|
---|
899 | typedef struct {
|
---|
900 | unsigned char cmdLen;
|
---|
901 | unsigned char cmdNo;
|
---|
902 | unsigned char transId;
|
---|
903 | unsigned char portNo; // Hardware-specific port #
|
---|
904 | } cmdGetIoPortsReq;
|
---|
905 |
|
---|
906 | typedef struct {
|
---|
907 | unsigned char cmdLen;
|
---|
908 | unsigned char cmdNo;
|
---|
909 | unsigned char transId;
|
---|
910 | unsigned char portNo; // Hardware-specific port #
|
---|
911 | uint32_t portVal; // Hardware-specific port value
|
---|
912 | uint32_t padding;
|
---|
913 | unsigned short status;
|
---|
914 | unsigned short padding2;
|
---|
915 | } cmdGetIoPortsResp;
|
---|
916 |
|
---|
917 | typedef struct {
|
---|
918 | unsigned char cmdLen;
|
---|
919 | unsigned char cmdNo;
|
---|
920 | unsigned char transId;
|
---|
921 | unsigned char subCmd;
|
---|
922 | uint32_t sectorNo;
|
---|
923 | uint32_t dataChunkReqNo;
|
---|
924 | } cmdMemoReadSectorReq;
|
---|
925 |
|
---|
926 | typedef struct {
|
---|
927 | unsigned char cmdLen;
|
---|
928 | unsigned char cmdNo;
|
---|
929 | unsigned char transId;
|
---|
930 | unsigned char subCmd;
|
---|
931 | unsigned char status;
|
---|
932 | unsigned char padding[3];
|
---|
933 | unsigned char data[CONFIG_DATA_CHUNK];
|
---|
934 | } cmdMemoReadSectorResp;
|
---|
935 |
|
---|
936 |
|
---|
937 | typedef struct {
|
---|
938 | unsigned char cmdLen;
|
---|
939 | unsigned char cmdNo;
|
---|
940 | unsigned char transId;
|
---|
941 | unsigned char subCmd;
|
---|
942 | uint32_t sectorNo;
|
---|
943 | unsigned char data[CONFIG_DATA_CHUNK];
|
---|
944 | } cmdMemoWriteSectorReq;
|
---|
945 |
|
---|
946 | typedef struct {
|
---|
947 | unsigned char cmdLen;
|
---|
948 | unsigned char cmdNo;
|
---|
949 | unsigned char transId;
|
---|
950 | unsigned char subCmd;
|
---|
951 | unsigned char status;
|
---|
952 | unsigned char padding[3];
|
---|
953 | } cmdMemoWriteSectorResp;
|
---|
954 |
|
---|
955 | typedef struct {
|
---|
956 | unsigned char cmdLen;
|
---|
957 | unsigned char cmdNo;
|
---|
958 | unsigned char transId;
|
---|
959 | unsigned char subCmd;
|
---|
960 | uint32_t sectorNo;
|
---|
961 | uint32_t count;
|
---|
962 | } cmdMemoEraseSectorReq;
|
---|
963 |
|
---|
964 | typedef struct {
|
---|
965 | unsigned char cmdLen;
|
---|
966 | unsigned char cmdNo;
|
---|
967 | unsigned char transId;
|
---|
968 | unsigned char subCmd;
|
---|
969 | unsigned char status;
|
---|
970 | unsigned char padding[3];
|
---|
971 | } cmdMemoEraseSectorResp;
|
---|
972 |
|
---|
973 | // --- Micro files on Aurora
|
---|
974 | /* subCmd:
|
---|
975 | * SUBCOMMAND_UFILE_START:
|
---|
976 | * No data is expected
|
---|
977 | * SUBCOMMAND_UFILE_BULK:
|
---|
978 | * Request to read up to UFILE_DATA_CHUNK_SIZE bytes from the current
|
---|
979 | * position.
|
---|
980 | */
|
---|
981 | typedef struct {
|
---|
982 | unsigned char cmdLen;
|
---|
983 | unsigned char cmdNo;
|
---|
984 | unsigned char transId;
|
---|
985 | unsigned char subCmd;
|
---|
986 | unsigned char fileNo;
|
---|
987 | unsigned char targetBoard;
|
---|
988 | unsigned char padding[2];
|
---|
989 | } cmdReadUfileReq;
|
---|
990 |
|
---|
991 | /*
|
---|
992 | * Aurora.
|
---|
993 | * Data from the requested position, 0 < count <= UFILE_DATA_CHUNK_SIZE bytes
|
---|
994 | * can be found in data[].
|
---|
995 | * End of transfer is signalled with subCmd=SUBCOMMAND_UFILE_STOP (in which
|
---|
996 | * case count might be non-zero)
|
---|
997 | * status is zero for success.
|
---|
998 | */
|
---|
999 | typedef struct {
|
---|
1000 | unsigned char cmdLen;
|
---|
1001 | unsigned char cmdNo;
|
---|
1002 | unsigned char transId;
|
---|
1003 | unsigned char subCmd;
|
---|
1004 | unsigned char status;
|
---|
1005 | unsigned char fileLen; // Total file size
|
---|
1006 | unsigned char count; // Nmbr of valid bytes in data[]
|
---|
1007 | unsigned char targetBoard;
|
---|
1008 | unsigned char data[UFILE_DATA_CHUNK_SIZE];
|
---|
1009 | } cmdReadUfileResp;
|
---|
1010 |
|
---|
1011 | /*
|
---|
1012 | * Aurora.
|
---|
1013 | * Write a micro file.
|
---|
1014 | * Set subCmd to SUBCOMMAND_UFILE_START and fileLen to the total number of
|
---|
1015 | * bytes to write; no data is transferred.
|
---|
1016 | * Then make several calls with subCmd == SUBCOMMAND_UFILE_BULK; each call
|
---|
1017 | * transfers count bytes of data. The last block should have
|
---|
1018 | * subCmd=SUBCOMMAND_UFILE_STOP (and may contain data).
|
---|
1019 | */
|
---|
1020 | typedef struct {
|
---|
1021 | unsigned char cmdLen;
|
---|
1022 | unsigned char cmdNo;
|
---|
1023 | unsigned char transId;
|
---|
1024 | unsigned char subCmd;
|
---|
1025 | unsigned char fileNo;
|
---|
1026 | unsigned char fileLen; // Number of bytes that will be transferred
|
---|
1027 | unsigned char count; // Number of valid bytes in data[]
|
---|
1028 | unsigned char targetBoard;
|
---|
1029 | unsigned char data[UFILE_DATA_CHUNK_SIZE];
|
---|
1030 | } cmdWriteUfileReq;
|
---|
1031 |
|
---|
1032 |
|
---|
1033 | /*
|
---|
1034 | * Aurora.
|
---|
1035 | * subCmd is always the same as for the call.
|
---|
1036 | * status is zero for success.
|
---|
1037 | */
|
---|
1038 | typedef struct {
|
---|
1039 | unsigned char cmdLen;
|
---|
1040 | unsigned char cmdNo;
|
---|
1041 | unsigned char transId;
|
---|
1042 | unsigned char subCmd;
|
---|
1043 | unsigned char status;
|
---|
1044 | unsigned char targetBoard;
|
---|
1045 | unsigned char padding[2];
|
---|
1046 | } cmdWriteUfileResp;
|
---|
1047 |
|
---|
1048 | /*
|
---|
1049 | * Aurora.
|
---|
1050 | * Clear all micro files.
|
---|
1051 | */
|
---|
1052 | typedef struct {
|
---|
1053 | unsigned char cmdLen;
|
---|
1054 | unsigned char cmdNo;
|
---|
1055 | unsigned char transId;
|
---|
1056 | unsigned char targetBoard;
|
---|
1057 | unsigned char data[UFILE_DATA_CHUNK_SIZE];
|
---|
1058 | } cmdFormatUfilesReq;
|
---|
1059 |
|
---|
1060 |
|
---|
1061 | /*
|
---|
1062 | * Aurora.
|
---|
1063 | * status is zero for success.
|
---|
1064 | */
|
---|
1065 | typedef struct {
|
---|
1066 | unsigned char cmdLen;
|
---|
1067 | unsigned char cmdNo;
|
---|
1068 | unsigned char transId;
|
---|
1069 | unsigned char status;
|
---|
1070 | unsigned char targetBoard;
|
---|
1071 | unsigned char padding[3];
|
---|
1072 | } cmdFormatUfilesResp;
|
---|
1073 |
|
---|
1074 |
|
---|
1075 | typedef struct {
|
---|
1076 | unsigned char cmdLen;
|
---|
1077 | unsigned char cmdNo;
|
---|
1078 | unsigned char transId;
|
---|
1079 | unsigned char channel;
|
---|
1080 | } cmdGetTransceiverInfoReq;
|
---|
1081 |
|
---|
1082 | typedef struct {
|
---|
1083 | unsigned char cmdLen;
|
---|
1084 | unsigned char cmdNo;
|
---|
1085 | unsigned char transId;
|
---|
1086 | unsigned char channel;
|
---|
1087 | uint32_t transceiverCapabilities;
|
---|
1088 | unsigned char transceiverStatus;
|
---|
1089 | unsigned char transceiverType;
|
---|
1090 | unsigned char padding[2];
|
---|
1091 | } cmdGetTransceiverInfoResp;
|
---|
1092 |
|
---|
1093 |
|
---|
1094 | typedef struct {
|
---|
1095 | unsigned char cmdLen;
|
---|
1096 | unsigned char cmdNo;
|
---|
1097 | unsigned char transId;
|
---|
1098 | unsigned char pad1;
|
---|
1099 | unsigned short rate;
|
---|
1100 | unsigned short pad2;
|
---|
1101 | } cmdSetHeartbeatRateReq;
|
---|
1102 |
|
---|
1103 | typedef struct {
|
---|
1104 | unsigned char cmdLen;
|
---|
1105 | unsigned char cmdNo;
|
---|
1106 | unsigned short time;
|
---|
1107 | } cmdHeartbeatResp;
|
---|
1108 |
|
---|
1109 | typedef struct {
|
---|
1110 | unsigned char cmdLen;
|
---|
1111 | unsigned char cmdNo;
|
---|
1112 | unsigned char channel;
|
---|
1113 | unsigned char bufNo;
|
---|
1114 | unsigned char rawMessage[14];
|
---|
1115 | unsigned char flags;
|
---|
1116 | unsigned char _padding0;
|
---|
1117 | } cmdSetAutoTxBuffer;
|
---|
1118 |
|
---|
1119 | typedef struct {
|
---|
1120 | unsigned char cmdLen;
|
---|
1121 | unsigned char cmdNo;
|
---|
1122 | unsigned char requestType;
|
---|
1123 | unsigned char channel; // For certain requests only
|
---|
1124 | unsigned short interval; // D:o
|
---|
1125 | unsigned char bufNo; // D:o
|
---|
1126 | unsigned char padding;
|
---|
1127 | } cmdAutoTxBufferReq;
|
---|
1128 |
|
---|
1129 | typedef struct {
|
---|
1130 | unsigned char cmdLen;
|
---|
1131 | unsigned char cmdNo;
|
---|
1132 | unsigned char responseType;
|
---|
1133 | unsigned char bufferCount;
|
---|
1134 | uint32_t timerResolution;
|
---|
1135 | unsigned short capabilities;
|
---|
1136 | unsigned short padding0;
|
---|
1137 | } cmdAutoTxBufferResp;
|
---|
1138 |
|
---|
1139 | typedef union {
|
---|
1140 | cmdHead head;
|
---|
1141 |
|
---|
1142 | cmdTxCanMessage txCanMessage;
|
---|
1143 | cmdRxCanMessage rxCanMessage;
|
---|
1144 | cmdTxAck txAck;
|
---|
1145 | cmdTxRequest txRequest;
|
---|
1146 | cmdSetBusparamsReq setBusparamsReq;
|
---|
1147 | cmdGetBusparamsReq getBusparamsReq;
|
---|
1148 | cmdGetBusparamsResp getBusparamsResp;
|
---|
1149 | cmdGetChipStateReq getChipStateReq;
|
---|
1150 | cmdChipStateEvent chipStateEvent;
|
---|
1151 | cmdSetDrivermodeReq setDrivermodeReq;
|
---|
1152 | cmdGetDrivermodeReq getDrivermodeReq;
|
---|
1153 | cmdGetDrivermodeResp getDrivermodeResp;
|
---|
1154 | cmdResetChipReq resetChipReq;
|
---|
1155 | cmdResetCardReq resetCardReq;
|
---|
1156 | cmdStartChipReq startChipReq;
|
---|
1157 | cmdStartChipResp startChipResp;
|
---|
1158 | cmdStopChipReq stopChipReq;
|
---|
1159 | cmdStopChipResp stopChipResp;
|
---|
1160 | cmdResetClock resetClock;
|
---|
1161 | cmdClockOverflowEvent clockOverflowEvent;
|
---|
1162 | cmdGetCardInfoReq getCardInfoReq;
|
---|
1163 | cmdGetCardInfoResp getCardInfoResp;
|
---|
1164 | cmdGetInterfaceInfoReq getInterfaceInfoReq;
|
---|
1165 | cmdGetInterfaceInfoResp getInterfaceInfoResp;
|
---|
1166 | cmdGetSoftwareInfoReq getSoftwareInfoReq;
|
---|
1167 | cmdGetSoftwareInfoResp getSoftwareInfoResp;
|
---|
1168 | cmdGetBusLoadReq getBusLoadReq;
|
---|
1169 | cmdGetBusLoadResp getBusLoadResp;
|
---|
1170 | cmdResetStatisticsReq resetStatisticsReq;
|
---|
1171 | cmdErrorEvent errorEvent;
|
---|
1172 | cmdFlushQueue flushQueue;
|
---|
1173 | cmdNoCommand noCommand;
|
---|
1174 | cmdResetErrorCounter resetErrorCounter;
|
---|
1175 | cmdCanErrorEvent canErrorEvent;
|
---|
1176 | cmdCheckLicenseReq checkLicenseReq;
|
---|
1177 | cmdCheckLicenseResp checkLicenseResp;
|
---|
1178 | cmdReadClockReq readClockReq;
|
---|
1179 | cmdReadClockResp readClockResp;
|
---|
1180 | cmdSetTransceiverModeReq setTransceiverModeReq;
|
---|
1181 |
|
---|
1182 | cmdMemoGetFilesystemInfoStructReq memoGetFilesystemInfoStructReq;
|
---|
1183 | cmdMemoGetFilesystemInfoStructResp memoGetFilesystemInfoStructResp;
|
---|
1184 | cmdMemoGetDiskInfoStructReq memoGetDiskInfoStructReq;
|
---|
1185 | cmdMemoGetDiskInfoStructResp memoGetDiskInfoStructResp;
|
---|
1186 | cmdMemoGetDiskHWInfoStructReq memoGetDiskHWInfoStructReq;
|
---|
1187 | cmdMemoGetDiskHWInfoStructResp memoGetDiskHWInfoStructResp;
|
---|
1188 |
|
---|
1189 | cmdMemoWriteConfigReq memoWriteConfigReq;
|
---|
1190 | cmdMemoWriteConfigResp memoWriteConfigResp;
|
---|
1191 | cmdMemoReadConfigReq memoReadConfigReq;
|
---|
1192 | cmdMemoReadConfigResp memoReadConfigResp;
|
---|
1193 |
|
---|
1194 | cmdMemoFormatDiskReq memoFormatDiskReq;
|
---|
1195 | cmdMemoFormatDiskResp memoFormatDiskResp;
|
---|
1196 | cmdMemoGetRTCReq memoGetRTCReq;
|
---|
1197 | cmdMemoGetRTCResp memoGetRTCResp;
|
---|
1198 | cmdMemoSetRTCReq memoSetRTCReq;
|
---|
1199 | cmdMemoSetRTCResp memoSetRTCResp;
|
---|
1200 | cmdLedActionReq ledActionReq;
|
---|
1201 | cmdLedActionResp ledActionResp;
|
---|
1202 | cmdMemoConfigModeReq memoConfigModeReq;
|
---|
1203 | cmdMemoConfigModeResp memoConfigModeResp;
|
---|
1204 |
|
---|
1205 | cmdSetIoPortsReq setIoPortsReq;
|
---|
1206 | cmdGetIoPortsReq getIoPortsReq;
|
---|
1207 | cmdGetIoPortsResp getIoPortsResp;
|
---|
1208 |
|
---|
1209 | cmdMemoReadSectorReq memoReadSectorReq;
|
---|
1210 | cmdMemoReadSectorResp memoReadSectorResp;
|
---|
1211 | cmdMemoWriteSectorReq memoWriteSectorReq;
|
---|
1212 | cmdMemoWriteSectorResp memoWriteSectorResp;
|
---|
1213 | cmdMemoEraseSectorReq memoEraseSectorReq;
|
---|
1214 | cmdMemoEraseSectorResp memoEraseSectorResp;
|
---|
1215 |
|
---|
1216 | cmdReadUfileReq readUfileReq;
|
---|
1217 | cmdReadUfileResp readUfileResp;
|
---|
1218 | cmdWriteUfileReq writeUfileReq;
|
---|
1219 | cmdWriteUfileResp writeUfileResp;
|
---|
1220 | cmdWriteUfileReq formatUfilesReq;
|
---|
1221 | cmdWriteUfileResp formatUfilesResp;
|
---|
1222 |
|
---|
1223 | cmdGetTransceiverInfoReq getTransceiverInfoReq;
|
---|
1224 | cmdGetTransceiverInfoResp getTransceiverInfoResp;
|
---|
1225 |
|
---|
1226 | cmdSetHeartbeatRateReq setHeartbeatRateReq;
|
---|
1227 | cmdHeartbeatResp heartbeatResp;
|
---|
1228 |
|
---|
1229 | cmdSetAutoTxBuffer setAutoTxBuffer;
|
---|
1230 | cmdAutoTxBufferReq autoTxBufferReq;
|
---|
1231 | cmdAutoTxBufferResp autoTxBufferResp;
|
---|
1232 |
|
---|
1233 | #ifdef HELIOS_PRIVATE
|
---|
1234 | cmdHeliosOtherCommand o;
|
---|
1235 | #endif
|
---|
1236 | } heliosCmd;
|
---|
1237 |
|
---|
1238 |
|
---|
1239 | // Union for all *synchronized* responses from the card.
|
---|
1240 | // The receive queue uses this union, so it is to be kept small.
|
---|
1241 | typedef union {
|
---|
1242 | cmdHead head;
|
---|
1243 | cmdRxCanMessage rxCanMessage;
|
---|
1244 | cmdTxCanMessage txCanMessage;
|
---|
1245 | cmdTxAck txAck;
|
---|
1246 | cmdTxRequest txRequest;
|
---|
1247 | cmdChipStateEvent chipStateEvent;
|
---|
1248 | cmdGetBusLoadResp getBusLoadResp;
|
---|
1249 | cmdStartChipResp startChipResp;
|
---|
1250 | cmdStopChipResp stopChipResp;
|
---|
1251 | cmdCanErrorEvent canErrorEvent;
|
---|
1252 | cmdHeartbeatResp heartbeatResp;
|
---|
1253 | cmdReadClockResp readClockResp;
|
---|
1254 | } heliosResponse;
|
---|
1255 |
|
---|
1256 | #include <poppack.h>
|
---|
1257 |
|
---|
1258 | #if defined(CompilerAssert)
|
---|
1259 | CompilerAssert(sizeof(heliosResponse) == 20);
|
---|
1260 | // A basic sanity check of all structs:
|
---|
1261 | #define CHECK_ALIGNMENT(X) CompilerAssert((sizeof(X) % 4) == 0)
|
---|
1262 | CHECK_ALIGNMENT(cmdRxCanMessage );
|
---|
1263 | CHECK_ALIGNMENT(cmdTxCanMessage );
|
---|
1264 | CHECK_ALIGNMENT(cmdTxAck );
|
---|
1265 | CHECK_ALIGNMENT(cmdTxRequest );
|
---|
1266 | CHECK_ALIGNMENT(cmdSetBusparamsReq );
|
---|
1267 | CHECK_ALIGNMENT(cmdGetBusparamsReq );
|
---|
1268 | CHECK_ALIGNMENT(cmdGetBusparamsResp );
|
---|
1269 | CHECK_ALIGNMENT(cmdGetChipStateReq );
|
---|
1270 | CHECK_ALIGNMENT(cmdChipStateEvent );
|
---|
1271 | CHECK_ALIGNMENT(cmdSetDrivermodeReq );
|
---|
1272 | CHECK_ALIGNMENT(cmdGetDrivermodeReq );
|
---|
1273 | CHECK_ALIGNMENT(cmdGetDrivermodeResp );
|
---|
1274 | CHECK_ALIGNMENT(cmdResetChipReq );
|
---|
1275 | CHECK_ALIGNMENT(cmdResetCardReq );
|
---|
1276 | CHECK_ALIGNMENT(cmdStartChipReq );
|
---|
1277 | CHECK_ALIGNMENT(cmdStartChipResp );
|
---|
1278 | CHECK_ALIGNMENT(cmdStopChipReq );
|
---|
1279 | CHECK_ALIGNMENT(cmdStopChipResp );
|
---|
1280 | CHECK_ALIGNMENT(cmdResetClock );
|
---|
1281 | CHECK_ALIGNMENT(cmdClockOverflowEvent );
|
---|
1282 | CHECK_ALIGNMENT(cmdGetCardInfoReq );
|
---|
1283 | CHECK_ALIGNMENT(cmdGetCardInfoResp );
|
---|
1284 | CHECK_ALIGNMENT(cmdGetInterfaceInfoReq );
|
---|
1285 | CHECK_ALIGNMENT(cmdGetInterfaceInfoResp );
|
---|
1286 | CHECK_ALIGNMENT(cmdGetSoftwareInfoReq );
|
---|
1287 | CHECK_ALIGNMENT(cmdGetSoftwareInfoResp );
|
---|
1288 | CHECK_ALIGNMENT(cmdGetBusLoadReq );
|
---|
1289 | CHECK_ALIGNMENT(cmdGetBusLoadResp );
|
---|
1290 | CHECK_ALIGNMENT(cmdResetStatisticsReq );
|
---|
1291 | CHECK_ALIGNMENT(cmdErrorEvent );
|
---|
1292 | CHECK_ALIGNMENT(cmdFlushQueue );
|
---|
1293 | CHECK_ALIGNMENT(cmdNoCommand );
|
---|
1294 | CHECK_ALIGNMENT(cmdResetErrorCounter );
|
---|
1295 | CHECK_ALIGNMENT(cmdCanErrorEvent );
|
---|
1296 | CHECK_ALIGNMENT(cmdCheckLicenseReq );
|
---|
1297 | CHECK_ALIGNMENT(cmdCheckLicenseResp );
|
---|
1298 | CHECK_ALIGNMENT(cmdReadClockReq );
|
---|
1299 | CHECK_ALIGNMENT(cmdReadClockResp );
|
---|
1300 | CHECK_ALIGNMENT(cmdSetTransceiverModeReq );
|
---|
1301 |
|
---|
1302 | CHECK_ALIGNMENT(cmdMemoGetFilesystemInfoStructReq );
|
---|
1303 | CHECK_ALIGNMENT(cmdMemoGetFilesystemInfoStructResp );
|
---|
1304 | CHECK_ALIGNMENT(cmdMemoGetDiskInfoStructReq );
|
---|
1305 | CHECK_ALIGNMENT(cmdMemoGetDiskInfoStructResp );
|
---|
1306 | CHECK_ALIGNMENT(cmdMemoGetDiskHWInfoStructReq );
|
---|
1307 | CHECK_ALIGNMENT(cmdMemoGetDiskHWInfoStructResp );
|
---|
1308 |
|
---|
1309 | CHECK_ALIGNMENT(cmdMemoWriteConfigReq );
|
---|
1310 | CHECK_ALIGNMENT(cmdMemoWriteConfigResp );
|
---|
1311 | CHECK_ALIGNMENT(cmdMemoReadConfigReq );
|
---|
1312 | CHECK_ALIGNMENT(cmdMemoReadConfigResp );
|
---|
1313 |
|
---|
1314 | CHECK_ALIGNMENT(cmdMemoFormatDiskReq );
|
---|
1315 | CHECK_ALIGNMENT(cmdMemoFormatDiskResp );
|
---|
1316 |
|
---|
1317 | CHECK_ALIGNMENT(cmdMemoGetRTCReq );
|
---|
1318 | CHECK_ALIGNMENT(cmdMemoGetRTCResp );
|
---|
1319 | CHECK_ALIGNMENT(cmdMemoSetRTCReq );
|
---|
1320 | CHECK_ALIGNMENT(cmdMemoSetRTCResp );
|
---|
1321 | CHECK_ALIGNMENT(cmdLedActionReq );
|
---|
1322 | CHECK_ALIGNMENT(cmdLedActionResp );
|
---|
1323 |
|
---|
1324 | CHECK_ALIGNMENT(cmdMemoConfigModeReq );
|
---|
1325 | CHECK_ALIGNMENT(cmdMemoConfigModeResp );
|
---|
1326 |
|
---|
1327 | CHECK_ALIGNMENT(cmdSetIoPortsReq );
|
---|
1328 | CHECK_ALIGNMENT(cmdGetIoPortsReq );
|
---|
1329 | CHECK_ALIGNMENT(cmdGetIoPortsResp );
|
---|
1330 |
|
---|
1331 | CHECK_ALIGNMENT(cmdMemoReadSectorReq );
|
---|
1332 | CHECK_ALIGNMENT(cmdMemoReadSectorResp );
|
---|
1333 | CHECK_ALIGNMENT(cmdMemoWriteSectorReq );
|
---|
1334 | CHECK_ALIGNMENT(cmdMemoWriteSectorResp );
|
---|
1335 | CHECK_ALIGNMENT(cmdMemoEraseSectorReq );
|
---|
1336 | CHECK_ALIGNMENT(cmdMemoEraseSectorResp );
|
---|
1337 |
|
---|
1338 | CHECK_ALIGNMENT(cmdReadUfileReq );
|
---|
1339 | CHECK_ALIGNMENT(cmdReadUfileResp );
|
---|
1340 | CHECK_ALIGNMENT(cmdWriteUfileReq );
|
---|
1341 | CHECK_ALIGNMENT(cmdWriteUfileResp );
|
---|
1342 | CHECK_ALIGNMENT(cmdFormatUfilesReq );
|
---|
1343 | CHECK_ALIGNMENT(cmdFormatUfilesResp );
|
---|
1344 |
|
---|
1345 | CHECK_ALIGNMENT(cmdGetTransceiverInfoReq );
|
---|
1346 | CHECK_ALIGNMENT(cmdGetTransceiverInfoResp );
|
---|
1347 |
|
---|
1348 | CHECK_ALIGNMENT(cmdSetHeartbeatRateReq );
|
---|
1349 | CHECK_ALIGNMENT(cmdHeartbeatResp );
|
---|
1350 |
|
---|
1351 | CHECK_ALIGNMENT(cmdSetAutoTxBuffer );
|
---|
1352 | CHECK_ALIGNMENT(cmdAutoTxBufferReq );
|
---|
1353 | CHECK_ALIGNMENT(cmdAutoTxBufferResp );
|
---|
1354 |
|
---|
1355 | CompilerAssert(sizeof(heliosCmd) <= MAX_CMD_LEN);
|
---|
1356 | #endif
|
---|
1357 |
|
---|
1358 |
|
---|
1359 | #endif //_HELIOS_CMDS_H_
|
---|