So many arduino integration changes...
This commit is contained in:
38
include/ard_protocol.h
Normal file
38
include/ard_protocol.h
Normal file
@@ -0,0 +1,38 @@
|
||||
#ifndef CHECKM8_TOOL_ARD_PROTOCOL_H
|
||||
#define CHECKM8_TOOL_ARD_PROTOCOL_H
|
||||
|
||||
static const char PROT_PARTIAL_CTRL_XFER = 'P';
|
||||
static const char PROT_NO_ERROR_CTRL_XFER = 'N';
|
||||
static const char PROT_NO_ERROR_CTRL_XFER_DATA = 'M';
|
||||
static const char PROT_CTRL_XFER = 'C';
|
||||
static const char PROT_RESET = 'R';
|
||||
static const char PROT_SERIAL_DESC = 'S';
|
||||
|
||||
static const char PROT_SUCCESS = '\x00';
|
||||
static const char PROT_ACK = '\x01';
|
||||
static const char PROT_FAIL_BADCMD = '\xFF';
|
||||
static const char PROT_FAIL_NODEV = '\xFE';
|
||||
static const char PROT_FAIL_WRONGDEV = '\xFD';
|
||||
static const char PROT_FAIL_USB = '\xFC';
|
||||
static const char PROT_FAIL_TOOBIG = '\xFB';
|
||||
|
||||
static const char PROT_FAIL_INITUSB = '\xEF';
|
||||
|
||||
struct usb_xfer_args
|
||||
{
|
||||
unsigned char bmRequestType;
|
||||
unsigned char bRequest;
|
||||
unsigned short wValue;
|
||||
unsigned short wIndex;
|
||||
|
||||
unsigned short data_len;
|
||||
};
|
||||
|
||||
struct serial_desc_args
|
||||
{
|
||||
unsigned short dev_idVendor;
|
||||
unsigned short dev_idProduct;
|
||||
unsigned char len;
|
||||
};
|
||||
|
||||
#endif //CHECKM8_TOOL_ARD_PROTOCOL_H
|
||||
@@ -3,7 +3,9 @@
|
||||
|
||||
//#define LIBUSB_LOGGING
|
||||
#define CHECKM8_LOGGING
|
||||
//#define WITH_ARDUINO
|
||||
#define ARDUINO_LOGGING
|
||||
|
||||
#define WITH_ARDUINO
|
||||
#define ARDUINO_DEV "/dev/ttyACM0"
|
||||
#define ARDUINO_BAUD 115200
|
||||
|
||||
|
||||
Reference in New Issue
Block a user