Define USB_CMD_DATA_SIZE_MIX

This commit is contained in:
Philippe Teuwen 2019-04-29 22:38:26 +02:00
parent b08b1c2cd9
commit fc6be9fea4
2 changed files with 2 additions and 1 deletions

View file

@ -173,7 +173,7 @@ void SendCommandNG(uint16_t cmd, uint8_t *data, size_t len) {
void SendCommandMIX(uint64_t cmd, uint64_t arg0, uint64_t arg1, uint64_t arg2, void *data, size_t len) {
uint64_t arg[3] = {arg0, arg1, arg2};
if (len > USB_CMD_DATA_SIZE - sizeof(arg)) {
if (len > USB_CMD_DATA_SIZE_MIX) {
PrintAndLogEx(WARNING, "Sending %d bytes of payload is too much for MIX frames, abort", len);
return;
}

View file

@ -28,6 +28,7 @@ typedef BYTE uint8_t;
#endif
#define USB_CMD_DATA_SIZE 512
#define USB_CMD_DATA_SIZE_MIX ( USB_CMD_DATA_SIZE - 3 * sizeof(uint64_t) )
typedef struct {
uint64_t cmd;