Variable length frames, part1: USB Host -> Pm3
This commit is contained in:
@@ -35,6 +35,27 @@ typedef struct {
|
||||
} d;
|
||||
} PACKED UsbCommand;
|
||||
|
||||
typedef struct {
|
||||
uint32_t magic;
|
||||
uint32_t length; // length of the variable part, 0 if none.
|
||||
} PACKED UsbCommandNGPreamble;
|
||||
|
||||
#define USB_PREAMBLE_MAGIC 0xAA5500FF
|
||||
|
||||
typedef struct {
|
||||
uint64_t cmd;
|
||||
uint64_t arg[3];
|
||||
} PACKED UsbCommandNG;
|
||||
|
||||
typedef struct {
|
||||
uint32_t crc;
|
||||
uint32_t magic;
|
||||
} PACKED UsbCommandNGPostamble;
|
||||
|
||||
#define USB_POSTAMBLE_MAGIC 0xFF0055AA
|
||||
|
||||
extern bool use_cmd_ng;
|
||||
|
||||
#ifdef WITH_FPC_HOST
|
||||
// "Session" flag, to tell via which interface next msgs should be sent: USB or FPC USART
|
||||
extern bool reply_via_fpc;
|
||||
|
||||
Reference in New Issue
Block a user