Add more PID token types

This commit is contained in:
Melissa Goad
2017-01-22 00:35:15 -06:00
parent 46479aa1bd
commit f52213d4e3

View File

@@ -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;