LMS 2012
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
c_daisy.h
Go to the documentation of this file.
1 /*
2  * LEGO® MINDSTORMS EV3
3  *
4  * Copyright (C) 2010-2013 The LEGO Group
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef C_DAISY_H_
22 #define C_DAISY_H_
23 #include "libusb.h"
24 
25  /* The public libusb header file
26  *
27  * The libusb library is free software and it can
28  * redistribute it and/or modify it under the terms
29  * of the GNU Lesser General Publil License as
30  * published by the Free Software Foundation; either
31  * version 2.1 of the License, or (at your option) any
32  * later version.
33  * See the libusb.h for more informations
34  *
35  * Thanks to: Daniel Drake and Johannes Erdfelt! */
36 
37 #include "lms2012.h"
38 
39 #include "c_com.h"
40 
41 #define FALSE 0
42 #define TRUE 1
43 
44 /*
45  Daisy Chain Command Bytes:
46 
47  ,------,------,------,------,------,------,------,------,------,------,
48 
49  |Byte 0|Byte 1|Byte 2|Byte 3|Byte 4|Byte 5|Byte 6|Byte 7|Byte 8|Byte 9|
50 
51  '------'------'------'------'------'------'------'------'------'------'
52 
53  Byte 0 – 1: Command size, Little Endian\n
54 
55  Byte 2 – 3: Message counter, Little Endian\n
56 
57  Byte 4: Command type. see following defines
58 */
59 
60 #define DAISY_COMMAND_REPLY 0x0A // Daisy command, reply required
61 #define DAISY_COMMAND_NO_REPLY 0x8A // Daisy command, reply not required
62 
63 /*
64  Byte 5: Daisy sub Command. see following defines
65 */
66 
67 #define DAISY_CHAIN_DOWNSTREAM 0xA0 // Write down into the branch of DaisyChained Bricks
68 #define DAISY_CHAIN_UPSTREAM 0xA1 // Data packet from port expanding (DaisyChained) downstream Bricks
69 #define DAISY_CHAIN_INFO 0xA2 // Sensor information packet (max. 54 bytes)
70 #define DAISY_UNLOCK_SLAVE 0xA3 // Ask the slave to start pushing data upstream
71 #define DAISY_SET_TYPE 0xA4 // Set mode/type downstream (no reply needed - status via array)
72 #define DAISY_CHAIN_DOWNSTREAM_WITH_BUSY 0XA5 // Payload also includes Magic Cookies (4 pcs)
73 
74 /*
75  Byte 6: Layer Counter (Down = source) // Incremented for each layer hit downstream
76  (Up = destination) // Decremented for each layer hit - when zero destination reached.
77  Byte 7: Layer Counter (Down = destination) // Decremented for each layer hit - when zero destination reached.
78  (Up = source) // Incremented for each layer hit upstream
79 
80  Byte 8: The normal payload. E.g. bytecode(s) with parameters or sensor-data
81 
82 
83 Daisy Chain Command Response Bytes:
84 
85  ,------,------,------,------,------,------,------,------,
86 
87  |Byte 0|Byte 1|Byte 2|Byte 3| | | |Byte n|
88 
89  '------'------'------'------'------'------'------'------'
90 
91  Byte 0 – 1: Reply size, Little Endian\n
92 
93  Byte 2 – 3: Message counter, Little Endian\n
94 
95  Byte 4: Reply type. see following defines
96 */
97 
98 #define DAISY_REPLY 0x08 // Daisy command reply
99 #define DAISY_REPLY_ERROR 0x09 // Daisy command reply error
100 
101 /*
102  Byte 5 - n: Response buffer (Layered sensor information)
103 
104  Byte 5: Layer Counter (Down = source) // Incremented for each layer hit downstream
105  (Up = destination) // Decremented for each layer hit - when zero destination reached.
106  Byte 6: Layer Counter (Down = destination) // Decremented for each layer hit - when zero destination reached.
107  (Up = source) // Incremented for each layer hit upstream
108 
109  Byte 7: The layered sensordata
110 
111 */
112 
113 /*** DAISY USB defines ***/
114 
115 #define DAISY_VENDOR_ID 0x0694 // LEGO Group
116 #define DAISY_PRODUCT_ID 0x0005 // EV3, the 5'th USB device
117 #define INTERFACE_NUMBER 0 // One and only
118 
119 #define DIR_IN 0x80 // USB EP direction
120 #define DIR_OUT 0x00 // -
121 #define DAISY_INT_EP_ADR 0x01 // HW specific
122 
123 #define DAISY_INTERRUPT_EP_IN DIR_IN + DAISY_INT_EP_ADR // Interrupt endpoint used for UPSTREAM
124 #define DAISY_INTERRUPT_EP_OUT DIR_OUT + DAISY_INT_EP_ADR // Interrupt endpoint used for DOWNSTREAM
125 
126 #define DAISY_MAX_EP_IN_SIZE 64 // FULL speed record size
127 #define DAISY_MAX_EP_OUT_SIZE 64 // FULL speed record size
128 #define DAISY_DEFAULT_MAX_EP_SIZE DAISY_MAX_EP_OUT_SIZE
129 #define DAISY_UPSTREAM_DATA_LENGTH DAISY_DEFAULT_MAX_EP_SIZE
130 #define DAISY_DEFAULT_TIMEOUT 1000 // Timeout set to 1 sec by default
131 #define NO_USER_DATA 0 // No user data embedded in transfer
132 #define DAISY_MAX_INPUT_PER_LAYER 4 // Hardware size
133 #define DAISY_MAX_OUTPUT_PER_LAYER 4 // -
134 #define DAISY_MAX_SENSORS_PER_LAYER (DAISY_MAX_INPUT_PER_LAYER + DAISY_MAX_OUTPUT_PER_LAYER) // Total per layer
135 #define DAISY_MAX_LAYER_DEPT 4 // Max layer depth
136 
137 #define DEVICE_MAX_DATA 32 // Max data size
138 #define BUSYFLAGS 16 // Motor busyflags (grand total)
139 #define DEVICE_MAX_INCL_BUSYFLAGS (DEVICE_MAX_DATA + BUSYFLAGS)
140 
141 #define SLAVE_PROD_ID "0005"
142 #define SLAVE_VENDOR_ID "0694"
143 
144 typedef struct
145 {
150  DATA8 PayLoad[];
151 }DAISY_POLL;
152 
153 #define SIZEOF_DAISY_POLL 6
154 
155 typedef struct
156 {
163 
164 #define SIZEOF_UNLOCK_REPLY 7
165 
166 typedef struct
167 {
174  DATA8 PayLoad[];
175 }DAISY_READ;
176 
177 #define SIZEOF_DAISY_READ 8
178 
179 typedef struct
180 {
185  DATA8 PayLoad[];
186 }DAISY_WRITE;
187 
188 #define SIZEOF_DAISY_WRITE 6
189 
190 typedef struct
191 {
201  UBYTE DeviceData[DEVICE_MAX_DATA];
205 
206 #define SIZEOF_DAISY_DEVICE_DATA_PROLOG 11
207 #define SIZEOF_REPLY_DAISY_READ (DAISY_DEFAULT_MAX_EP_SIZE - sizeof(CMDSIZE))
208 #define DAISY_DEVICE_PAYLOAD_SIZE (DEVICE_MAX_DATA + 4) // Status, Type, Mode, DeviceData, CheckSum
209 #define DAISY_DEVICE_CHKSUM_SIZE 1
210 #define DAISY_MAX_INPUT_SENSOR_INDEX 3
211 #define DAISY_SENSOR_OUTPUT_OFFSET 12
212 #define DAISY_SENSOR_DATA_SIZE (SIZEOF_DAISY_DEVICE_DATA_PROLOG + DEVICE_MAX_DATA + DAISY_DEVICE_CHKSUM_SIZE - sizeof(CMDSIZE))
213 #define BUSYFLAGS_START_POS (SIZEOF_DAISY_DEVICE_DATA_PROLOG + DEVICE_MAX_DATA + DAISY_DEVICE_CHKSUM_SIZE)
214 typedef struct
215 {
221 }DAISY_INFO;
222 
223 #define SIZEOF_DAISY_INFO 6
224 #define SIZEOF_DAISY_INFO_READ (DAISY_DEFAULT_MAX_EP_SIZE - SIZEOF_DAISY_INFO)
225 
226 #define LAYER_POS 6
227 #define SENSOR_POS (LAYER_POS + 1)
228 
229 
230 #define DAISY_MAX_DATASIZE DAISY_DEFAULT_MAX_EP_SIZE
231 #define DAISY_DATA_PACKET (DAISY_DEFAULT_MAX_EP_SIZE - sizeof(CMDSIZE))
232 
233 #define PAYLOAD_OFFSET 4
234 
235 typedef struct // Used for downstream
236 {
240  DATA8 PayLoad[];
241 }
242 DAISYCMD;
243 
244 RESULT cDaisyReady(void);
245 int cDaisyWrite(void); // Write (ASYNC) one packet DOWNSTREAM
246 RESULT cDaisyGetDownstreamData(DATA8 Layer,DATA8 Sensor,DATA8 Length,DATA8 *pType,DATA8 *pMode,DATA8 *pData);
247 void cDaisyPollFromDownstream(void); // Read (ASYNC) one packet UPSTREAM
248 RESULT cDaisyDownStreamCmd(DATA8 *pData, DATA8 Length, DATA8 Layer); // DaisyChained commands e.g. Motor cmd's // (up from a lower layer)
249 int cDaisyWriteDone(void); // Async check INTERNAL for Write finished
250 int cDaisyGetLastWriteState(void); // Async check used for EXTERNAL check for Write finished
251 int cDaisyGetLastWriteResult(void); // Get last ERROR code (or success ;-))
252 RESULT cDaisyInit(void); // Initialize LIBUSB and open an USB DaisyChain link
253 RESULT cDaisyOpen(void); // Open() the DaisyChain link to the slave
254 RESULT cDaisyClose(void); // Close() the DaisyChain stuff
255 RESULT cDaisyExit(void); // Close the DaisyChain link and deinitializes the LIBUSB
256 void cDaisyControl(void); // Get cycles for the DAISY stuff
257 void cDaisySetTimeout(int TimeOut); // TimeOut value for read and write
258 DATA8 cDaisyGetUsbUpStreamSpeed(void); // The connection speed upstream (Gadget side)
259 void cDaisyReadFromDownStream(void); // Read array and hand over upstream
260 int cDaisyGetInterruptPacketSize(void); // Max packet the Daisychained device supports
261 void cDaisyCmd(RXBUF *pRxBuf, TXBUF *pTxBuf); // "Internal" Daisy and daisy-chained commands
262 RESULT cDaisySetDeviceInfo(DATA8 Length,UBYTE *pInfo); // Device Info pushed by INPUT module
263 RESULT cDaisyGetDeviceInfo(DATA8 Length,UBYTE *pInfo); // Get Device Info for upstream TX
264 RESULT cDaisySetDeviceType(DATA8 Layer,DATA8 Port,DATA8 Type,DATA8 Mode);
265 UWORD cDaisyData(UBYTE **pData); // Separate buffered DaisyData - NOT conflicting with normal transfer e.g. answers, errors etc.
266 void cDaisyStuffTxed(void); // Tell when bits'n'bytes has left first (our) BUFFER
267 uint GetDaisyPushCounter(void);
268 void ResetDaisyPushCounter(void);
269 RESULT cDaisyChained(void);
270 void DecrementDaisyPushCounter(void);
271 void cDaisyPushUpStream(void); // Flood upward
272 void cDaisyPrepareNext(void);
273 void SetUnlocked(int Status);
274 int GetUnlocked(void);
275 void SetSlaveUnlocked(int Status);
276 int GetSlaveUnlocked(void);
278 void cDaisySetOwnLayer(UBYTE Layer);
280 UBYTE cDaisyCheckBusyBit(UBYTE Layer, UBYTE PortBits); // Used by the "ONFOR" motor stuff
281 RESULT cDaisyCheckBusyIndex(UBYTE Layer, UBYTE Port);
282 void cDaisySetBusyFlags(UBYTE Layer, UBYTE Port, UBYTE MagicCookie);
283 void cDaisySetOwnLayer(UBYTE Layer); // The nice to known - used for "self"-layer insertion downstream
284 RESULT cDaisyMotorDownStream(DATA8 *pData, DATA8 Length, DATA8 Layer, DATA8 PortField); // Looks like the normal CMD, but
285  // port field added - i.e. NOT too much
286  // specific protocol down @ the transport layer
287 enum
288 {
289  DAISY_WR_NOT_CONNECTED, // No DAISY device connected :-(
290  DAISY_WR_CONNECTED, // Connected but not opened yet
291  DAISY_WR_IDLE, // Connected and an unlocked "slave"-device
292  DAISY_WR_REQUESTED, // Write session started
293  DAISY_WR_COMPLETED, // Write finished asyncronous
294  DAISY_WR_TIMED_OUT, // Write process timed out
295  DAISY_WR_FAIL // Write failed (non-specific)
296 }
298 
299 enum
300 {
301  DAISY_RD_IDLE, // Daisy READ control state idling
302  DAISY_RD_REQUESTED, // Read request issued - async
303  DAISY_RD_DONE, // Read done - happily
304  // Read ERRORs:
305  DAISY_RD_DISCONNECTED, // Daisy chained device downstream disconnected :-(
306  DAISY_RD_TIMEDOUT, // A read is timed out - too lazy??
307  DAISY_RD_ERROR // Read NON-specific ERROR
308 }
310 
311 enum
312 {
313  DAISY_DOWN_DISCONNECTED, // Daisy downstream states
320 }
322 
323 enum
324 {
327 }
329 
330 /*** Below LibUsb ERROR codes - I will try to lower the count upwards :-) ***/
331 
332 // LIBUSB_ERROR_IO = -1 Input/output error
333 // LIBUSB_ERROR_INVALID_PARAM = -2 Invalid parameter
334 // LIBUSB_ERROR_ACCESS = -3 Access denied (insufficient permissions)
335 // LIBUSB_ERROR_NO_DEVICE = -4 No such device (it may have been disconnected)
336 // LIBUSB_ERROR_NOT_FOUND = -5 Entity not found
337 // LIBUSB_ERROR_BUSY = -6 Resource busy
338 // LIBUSB_ERROR_TIMEOUT = -7 Operation timed out#define SIZEOF_DAISY_INFO 6
339 // LIBUSB_ERROR_OVERFLOW = -8 Overflow
340 // LIBUSB_ERROR_PIPE = -9 Pipe error
341 // LIBUSB_ERROR_INTERRUPTED = -10 System call interrupted (perhaps due to signal)
342 // LIBUSB_ERROR_NO_MEM = -11 Insufficient memory
343 // LIBUSB_ERROR_NOT_SUPPORTED = -12 Operation not supported or unimplemented on this platform
344 // LIBUSB_ERROR_OTHER = -99 Other error
345 // DAISY_ERROR_RD_DONE = -80 Signal READ done - NOT an error
346 
347 enum
348 {
349  DAISY_WR_OK = LIBUSB_SUCCESS, // Write started OK - REMEMBER we try to be asyncronous :-)
350  DAISY_WR_DONE = DAISY_WR_OK, // Request fullfilled else DAISY_WR_NOT_FINISHED
351  DAISY_WR_NOT_FINISHED = LIBUSB_ERROR_BUSY, // Previous write not finished yet :-(
352  DAISY_WR_ERROR = LIBUSB_ERROR_OTHER, // ERROR bucket - NOT specified
354  DAISY_WR_DISCONNECTED = LIBUSB_ERROR_NO_DEVICE // No device - I must be disconnected
355 }
357 
358 // PAYLOAD Helper defines
359 
360 enum
361 {
366 }
368 
369 enum
370 {
378 }
380 
381 enum
382 {
390 }
392 
393 #define LAYER_POS_DOWN (STAT +1)
394 #define SENSOR_POS_DOWN (LAYER_POS_DOWN +1)
395 #define TYPE_POS_DOWN (SENSOR_POS_DOWN + 1)
396 #define MODE_POS_DOWN (TYPE_POS_DOWN + 1)
397 
398 #define LAYER_POS_TO_SLAVE (STAT)
399 #define SENSOR_POS_TO_SLAVE (LAYER_POS_TO_SLAVE +1)
400 #define TYPE_POS_TO_SLAVE (SENSOR_POS_TO_SLAVE + 1)
401 #define MODE_POS_TO_SLAVE (TYPE_POS_TO_SLAVE + 1)
402 
403 enum
404 {
407 }
409 
410 #define CHECKSUM_POS (DAISY_DEVICE_PAYLOAD_SIZE - 1)
411 
412 #define BUSYTIME 25000 // [uS]
413 #define DAISY_PRIORITY_COUNT 2 // 1:3
414 #define DAISY_PUSH_NOT_UNLOCKED 0x55
415 
416 enum
417 {
418  DAISY_RD_OK = LIBUSB_SUCCESS, // Read request started OK - REMEMBER we try to be asyncronous :-)
419  DAISY_RD_NO_DATA_YET = LIBUSB_ERROR_BUSY, // Data not received yet
420  //DAISY_RD_ERROR = LIBUSB_ERROR_OTHER, // ERROR bucket - NOT specified
421  //DAISY_RD_TIMEDOUT = LIBUSB_ERROR_TIMEOUT, // Too slow...
422  //DAISY_RD_DISCONNECTED = LIBUSB_ERROR_NO_DEVICE // No device - I must be disconnected
423 }
425 
426 #define TIME_TO_CHECK_FOR_DAISY_DOWNSTREAM 2000 //16000
427 #define DAISY_SLAVE_SEARCH_STRING "ID 0694:0005 Lego Group"
428 
429 #endif /* C_DAISY_H_ */
UBYTE CmdType
Definition: c_daisy.h:218
enum @21 INFO_INDEXES
void SetUnlocked(int Status)
Definition: c_daisy.c:149
int cDaisyGetInterruptPacketSize(void)
Definition: c_daisy.c:1014
void cDaisyControl(void)
Definition: c_daisy.c:2340
RESULT cDaisyClose(void)
Definition: c_daisy.c:2582
RESULT cDaisyChained(void)
Definition: c_daisy.c:1004
MSGCNT MsgCount
Definition: c_daisy.h:182
Definition: c_daisy.h:372
UBYTE SensorNo
Definition: c_daisy.h:173
enum @20 REPLY_INDEXES
RESULT cDaisyCheckBusyIndex(UBYTE Layer, UBYTE Port)
Definition: c_daisy.c:350
CMDSIZE CmdSize
Definition: c_daisy.h:157
void cDaisyPollFromDownstream(void)
UBYTE cDaisyCheckBusyBit(UBYTE Layer, UBYTE PortBits)
Definition: c_daisy.c:360
enum @17 DAISY_PUSH_CONNECTION_STATES
CMDSIZE CmdSize
Definition: c_daisy.h:192
void SetSlaveUnlocked(int Status)
Definition: c_daisy.c:159
unsigned int TimeOut
Definition: c_wifi.c:100
UBYTE cDaisyGetOwnLayer(void)
Definition: c_daisy.c:215
void cDaisyPrepareNext(void)
Definition: c_daisy.c:1643
Definition: c_daisy.h:377
Definition: c_daisy.h:406
uint GetDaisyPushCounter(void)
Definition: c_daisy.c:510
void cDaisySetOwnLayer(UBYTE Layer)
Definition: c_daisy.c:204
MSGCNT MsgCount
Definition: c_daisy.h:193
CMDSIZE CmdSize
Definition: c_daisy.h:168
void Info(void)
opINFO byte code
Definition: lms2012.c:3734
enum @14 DAISY_WRITE_STATES
RESULT cDaisyMotorDownStream(DATA8 *pData, DATA8 Length, DATA8 Layer, DATA8 PortField)
Definition: c_daisy.c:399
int GetSlaveUnlocked(void)
Definition: c_daisy.c:164
UBYTE CmdType
Definition: c_daisy.h:183
RESULT cDaisyDownStreamCmd(DATA8 *pData, DATA8 Length, DATA8 Layer)
Definition: c_daisy.c:665
enum @22 INFO_STATES
UBYTE Cmd
Definition: c_daisy.h:149
enum @18 DAISY_WR_ERROR_CODES
int GetUnlocked(void)
Definition: c_daisy.c:154
void cDaisyReadFromDownStream(void)
void ResetDaisyPushCounter(void)
Definition: c_daisy.c:520
RESULT cDaisySetDeviceType(DATA8 Layer, DATA8 Port, DATA8 Type, DATA8 Mode)
Definition: c_daisy.c:1156
RESULT cDaisyInit(void)
Definition: c_daisy.c:1212
RESULT cDaisyGetDeviceInfo(DATA8 Length, UBYTE *pInfo)
Definition: c_daisy.c:1370
enum @16 DAISY_DOWN_CONNECTION_STATES
Definition: c_daisy.h:373
UWORD CMDSIZE
Definition: c_com.h:960
UBYTE Layer
Definition: c_daisy.h:172
int cDaisyGetLastWriteState(void)
Definition: c_daisy.c:169
unsigned char UBYTE
Basic Type used to symbolise 8 bit unsigned values.
Definition: lmstypes.h:29
UWORD MSGCNT
Definition: c_com.h:961
RESULT cDaisySetDeviceInfo(DATA8 Length, UBYTE *pInfo)
Definition: c_daisy.c:1396
Definition: c_daisy.h:405
int cDaisyWrite(void)
Definition: c_daisy.c:2159
MSGCNT MsgCount
Definition: c_daisy.h:217
Definition: c_com.h:1516
Definition: c_com.h:1534
RESULT cDaisyExit(void)
Definition: c_daisy.c:2587
void cDaisyPushUpStream(void)
Definition: c_daisy.c:1442
unsigned short UWORD
Basic Type used to symbolise 16 bit unsigned values.
Definition: lmstypes.h:30
CMDSIZE CmdSize
Definition: c_daisy.h:216
RESULT cDaisyReady(void)
Definition: c_daisy.c:531
UBYTE DaisyCmd
Definition: c_daisy.h:237
UBYTE CmdType
Definition: c_daisy.h:148
UBYTE FirstCookie
Definition: c_daisy.h:203
Definition: c_daisy.h:371
UBYTE SensorNo
Definition: c_daisy.h:239
void cDaisyStuffTxed(void)
DATA8 cDaisyGetUsbUpStreamSpeed(void)
Definition: c_daisy.c:960
Definition: c_daisy.h:374
UBYTE Cmd
Definition: c_daisy.h:219
CMDSIZE CmdSize
Definition: c_daisy.h:146
MSGCNT MsgCount
Definition: c_daisy.h:147
RESULT cDaisyGetDownstreamData(DATA8 Layer, DATA8 Sensor, DATA8 Length, DATA8 *pType, DATA8 *pMode, DATA8 *pData)
Definition: c_daisy.c:1670
MSGCNT MsgCount
Definition: c_daisy.h:169
enum @15 DAISY_READ_STATES
void cDaisySetBusyFlags(UBYTE Layer, UBYTE Port, UBYTE MagicCookie)
Definition: c_daisy.c:391
SBYTE DATA8
VM Type for 1 byte signed value.
Definition: lmstypes.h:61
RESULT cDaisyOpen(void)
Definition: c_daisy.c:2572
enum @19 PAYLOAD_POSITIONS
UBYTE CmdType
Definition: c_daisy.h:170
#define DEVICE_MAX_DATA
Definition: c_daisy.h:137
enum @23 DAISY_READ_ERROR_CODES
UBYTE Layer
Definition: c_daisy.h:238
UBYTE Cmd
Definition: c_daisy.h:171
int cDaisyGetLastWriteResult(void)
Definition: c_daisy.c:174
void DecrementDaisyPushCounter(void)
Definition: c_daisy.c:525
CMDSIZE CmdSize
Definition: c_daisy.h:181
void cDaisyCmd(RXBUF *pRxBuf, TXBUF *pTxBuf)
Definition: c_daisy.c:722
void cDaisySetTimeout(int TimeOut)
Definition: c_daisy.c:1009
UWORD cDaisyData(UBYTE **pData)
Definition: c_daisy.c:500
int cDaisyWriteDone(void)
Definition: c_daisy.c:1806
UBYTE Cmd
Definition: c_daisy.h:184