diff --git a/src/usb.h b/src/usb.h index b61e702f2..69adcf96b 100644 --- a/src/usb.h +++ b/src/usb.h @@ -7,7 +7,9 @@ typedef struct uint8_t pid; //low 4 bits are the real pid, top 4 bits are just ~pid uint8_t dev_addr; uint8_t dev_endpoint; - uint8_t* data; + int crc5; + uint16_t crc16; + uint8_t data[1024]; int len; void* device; } usb_packet_t; @@ -26,7 +28,14 @@ typedef enum typedef enum { + USB_PID_TOKEN_STALL = 0x1e, USB_PID_TOKEN_SETUP = 0x2d, + USB_PID_TOKEN_PRE = 0x3c, + USB_PID_TOKEN_DATA1 = 0x4b, + USB_PID_TOKEN_NAK = 0x5a, USB_PID_TOKEN_IN = 0x69, + USB_PID_TOKEN_SOF = 0xa5, + USB_PID_TOKEN_DATA0 = 0xc3, + USB_PID_TOKEN_ACK = 0xd2, USB_PID_TOKEN_OUT = 0xe1 } usb_pid_type_t; \ No newline at end of file