diff --git a/examples_x035/usbdevice.incomplete/fsusb.c b/examples_x035/usbdevice.incomplete/fsusb.c
index 319018c4052602275613b15592a7a457ced4a6b3..d16530ebe5cf6cfa385c09902942effa7c220a42 100644
--- a/examples_x035/usbdevice.incomplete/fsusb.c
+++ b/examples_x035/usbdevice.incomplete/fsusb.c
@@ -39,7 +39,7 @@ void USBFS_IRQHandler()
 
 	// Combined FG + ST flag.
 	uint16_t intfgst = *(uint16_t*)(&USBFS->INT_FG);
-	int len = 0, errflag = 0;
+	int len = 0;
 	struct _USBState * ctx = &FSUSBCTX;
 	GPIOA->BSHR = 1;
 
@@ -71,7 +71,7 @@ void USBFS_IRQHandler()
 					{
 						case USB_GET_DESCRIPTOR:
 							len = ctx->USBFS_SetupReqLen >= DEF_USBD_UEP0_SIZE ? DEF_USBD_UEP0_SIZE : ctx->USBFS_SetupReqLen;
-							memcpy( ctx->USBFS_EP0_Buf, ctx->pUSBFS_Descr, len );
+							memcpy( ctx->USBFS_EP_Buf[0], ctx->pUSBFS_Descr, len );
 							ctx->USBFS_SetupReqLen -= len;
 							ctx->pUSBFS_Descr += len;
 							USBFS->UEP0_TX_LEN = len;
@@ -160,10 +160,10 @@ void USBFS_IRQHandler()
 			int USBFS_SetupReqIndex = pUSBFS_SetupReqPak->wIndex;
 			int USBFS_IndexValue = FSUSBCTX.USBFS_IndexValue = ( pUSBFS_SetupReqPak->wIndex << 16 ) | pUSBFS_SetupReqPak->wValue;
 			len = 0;
-			errflag = 0;
 
 			if( ( USBFS_SetupReqType & USB_REQ_TYP_MASK ) != USB_REQ_TYP_STANDARD )
 			{
+#if FUSB_HID_INTERFACES > 0 
 				if( ( USBFS_SetupReqType & USB_REQ_TYP_MASK ) == USB_REQ_TYP_CLASS )
 				{
 					/* Class Request */
@@ -173,43 +173,36 @@ void USBFS_IRQHandler()
 							break;
 
 						case HID_SET_IDLE:
-							if( USBFS_SetupReqIndex < 0x02 )
+							if( USBFS_SetupReqIndex < FUSB_HID_INTERFACES )
 								FSUSBCTX.USBFS_HidIdle[ USBFS_SetupReqIndex ] = (uint8_t)( USBFS_IndexValue >> 8 );
-							else
-								errflag = 0xFF;
 							break;
 						case HID_SET_PROTOCOL:
-							if ( USBFS_SetupReqIndex < 0x02 )
+							if ( USBFS_SetupReqIndex < FUSB_HID_INTERFACES )
 								FSUSBCTX.USBFS_HidProtocol[USBFS_SetupReqIndex] = (uint8_t)USBFS_IndexValue;
-							else
-								errflag = 0xFF;
 							break;
 
 						case HID_GET_IDLE:
-							if( USBFS_SetupReqIndex < 0x02 )
+							if( USBFS_SetupReqIndex < FUSB_HID_INTERFACES )
 							{
-								FSUSBCTX.USBFS_EP0_Buf[ 0 ] = FSUSBCTX.USBFS_HidIdle[ USBFS_SetupReqIndex ];
+								FSUSBCTX.USBFS_EP_Buf[0][0] = FSUSBCTX.USBFS_HidIdle[ USBFS_SetupReqIndex ];
 								len = 1;
 							}
-							else
-								errflag = 0xFF;
 							break;
 
 						case HID_GET_PROTOCOL:
-							if( USBFS_SetupReqIndex < 0x02 )
+							if( USBFS_SetupReqIndex < FUSB_HID_INTERFACES )
 							{
-								FSUSBCTX.USBFS_EP0_Buf[ 0 ] = FSUSBCTX.USBFS_HidProtocol[ USBFS_SetupReqIndex ];
+								FSUSBCTX.USBFS_EP_Buf[0][0] = FSUSBCTX.USBFS_HidProtocol[ USBFS_SetupReqIndex ];
 								len = 1;
 							}
-							else
-								errflag = 0xFF;
 							break;
 
 						default:
-							errflag = 0xFF;
+							goto reporterror;
 							break;
 					}
 				}
+#endif
 			}
 			else
 			{
@@ -233,7 +226,7 @@ void USBFS_IRQHandler()
 						}
 						if( e == e_end )
 						{
-							errflag = 0xFF;
+							goto reporterror;
 						}
 
 						/* Copy Descriptors to Endp0 DMA buffer */
@@ -242,7 +235,7 @@ void USBFS_IRQHandler()
 							USBFS_SetupReqLen = len;
 						}
 						len = ( USBFS_SetupReqLen >= DEF_USBD_UEP0_SIZE ) ? DEF_USBD_UEP0_SIZE : USBFS_SetupReqLen;
-						memcpy( ctx->USBFS_EP0_Buf, ctx->pUSBFS_Descr, len );
+						memcpy( ctx->USBFS_EP_Buf[0], ctx->pUSBFS_Descr, len );
 						ctx->pUSBFS_Descr += len;
 						break;
 					}
@@ -254,7 +247,7 @@ void USBFS_IRQHandler()
 
 					/* Get usb configuration now set */
 					case USB_GET_CONFIGURATION:
-						ctx->USBFS_EP0_Buf[ 0 ] = ctx->USBFS_DevConfig;
+						ctx->USBFS_EP_Buf[0][0] = ctx->USBFS_DevConfig;
 						if( ctx->USBFS_SetupReqLen > 1 )
 						{
 							ctx->USBFS_SetupReqLen = 1;
@@ -279,7 +272,7 @@ void USBFS_IRQHandler()
 							}
 							else
 							{
-								errflag = 0xFF;
+								goto reporterror;
 							}
 						}
 						else if( ( USBFS_SetupReqType & USB_REQ_RECIP_MASK ) == USB_REQ_RECIP_ENDP )
@@ -300,18 +293,18 @@ void USBFS_IRQHandler()
 										break;
 
 									default:
-										errflag = 0xFF;
+										goto reporterror;
 										break;
 								}
 							}
 							else
 							{
-								errflag = 0xFF;
+								goto reporterror;
 							}
 						}
 						else
 						{
-							errflag = 0xFF;
+							goto reporterror;
 						}
 						break;
 
@@ -329,7 +322,7 @@ void USBFS_IRQHandler()
 							else
 #endif
 							{
-								errflag = 0xFF;
+								goto reporterror;
 							}
 						}
 						else if( ( USBFS_SetupReqType & USB_REQ_RECIP_MASK ) == USB_REQ_RECIP_ENDP )
@@ -348,24 +341,24 @@ void USBFS_IRQHandler()
 										break;
 
 									default:
-										errflag = 0xFF;
+										goto reporterror;
 										break;
 								}
 							}
 							else
 							{
-								errflag = 0xFF;
+								goto reporterror;
 							}
 						}
 						else
 						{
-							errflag = 0xFF;
+							goto reporterror;
 						}
 						break;
 
 					/* This request allows the host to select another setting for the specified interface  */
 					case USB_GET_INTERFACE:
-						ctx->USBFS_EP0_Buf[ 0 ] = 0x00;
+						ctx->USBFS_EP_Buf[0][0] = 0x00;
 						if( USBFS_SetupReqLen > 1 )
 						{
 							USBFS_SetupReqLen = 1;
@@ -377,17 +370,17 @@ void USBFS_IRQHandler()
 
 					/* host get status of specified device/interface/end-points */
 					case USB_GET_STATUS:
-						ctx->USBFS_EP0_Buf[ 0 ] = 0x00;
-						ctx->USBFS_EP0_Buf[ 1 ] = 0x00;
+						ctx->USBFS_EP_Buf[0][0] = 0x00;
+						ctx->USBFS_EP_Buf[0][1] = 0x00;
 						if( ( USBFS_SetupReqType & USB_REQ_RECIP_MASK ) == USB_REQ_RECIP_DEVICE )
 						{
 							if( ctx->USBFS_DevSleepStatus & 0x01 )
 							{
-								ctx->USBFS_EP0_Buf[ 0 ] = 0x02;
+								ctx->USBFS_EP_Buf[0][0] = 0x02;
 							}
 							else
 							{
-								ctx->USBFS_EP0_Buf[ 0 ] = 0x00;
+								ctx->USBFS_EP_Buf[0][0] = 0x00;
 							}
 						}
 						else if( ( USBFS_SetupReqType & USB_REQ_RECIP_MASK ) == USB_REQ_RECIP_ENDP )
@@ -396,24 +389,24 @@ void USBFS_IRQHandler()
 							{
 								if( ( USBFS->UEP1_CTRL_H & USBFS_UEP_T_RES_MASK ) == USBFS_UEP_T_RES_STALL )
 								{
-									ctx->USBFS_EP0_Buf[ 0 ] = 0x01;
+									ctx->USBFS_EP_Buf[0][0] = 0x01;
 								}
 							}
 							else if( (uint8_t)( USBFS_SetupReqIndex & 0xFF ) == ( DEF_UEP_IN | DEF_UEP2 ) )
 							{
 								if( ( USBFS->UEP2_CTRL_H & USBFS_UEP_T_RES_MASK ) == USBFS_UEP_T_RES_STALL )
 								{
-									ctx->USBFS_EP0_Buf[ 0 ] = 0x01;
+									ctx->USBFS_EP_Buf[0][0] = 0x01;
 								}
 							}
 							else
 							{
-								errflag = 0xFF;
+								goto reporterror;
 							}
 						}
 						else
 						{
-							errflag = 0xFF;
+							goto reporterror;
 						}
 						if( USBFS_SetupReqLen > 2 )
 						{
@@ -422,18 +415,12 @@ void USBFS_IRQHandler()
 						break;
 
 					default:
-						errflag = 0xFF;
+						goto reporterror;
 						break;
 				}
 			}
 
-			/* errflag = 0xFF means a request not support or some errors occurred, else correct */
-			if( errflag == 0xFF )
-			{
-				/* if one request not support, return stall */
-				USBFS->UEP0_CTRL_H = USBFS_UEP_T_TOG | USBFS_UEP_T_RES_STALL|USBFS_UEP_R_TOG | USBFS_UEP_R_RES_STALL;
-			}
-			else
+
 			{
 				/* end-point 0 data Tx/Rx */
 				if( USBFS_SetupReqType & DEF_UEP_IN )
@@ -458,6 +445,12 @@ void USBFS_IRQHandler()
 			}
 			break;
 
+		// This might look a little weird, for error handling but it saves a nontrivial amount of storage, and simplifies
+		// control flow to hard-abort here.
+		reporterror:
+			// if one request not support, return stall.  Stall means permanent error.
+			USBFS->UEP0_CTRL_H = USBFS_UEP_T_TOG | USBFS_UEP_T_RES_STALL|USBFS_UEP_R_TOG | USBFS_UEP_R_RES_STALL;
+
 		/* Sof pack processing */
 		case CUIS_TOKEN_SOF:
 			break;
@@ -465,6 +458,8 @@ void USBFS_IRQHandler()
 		default :
 			break;
 		}
+
+
 	}
 	else if( intfgst & CRB_UIF_BUS_RST )
 	{
@@ -508,9 +503,9 @@ void USBFS_Device_Endp_Init()
     USBFS->UEP2_3_MOD = RB_UEP2_TX_EN;
 	USBFS->UEP567_MOD = 0;
 
-	USBFS->UEP0_DMA = (intptr_t)FSUSBCTX.USBFS_EP0_Buf;
-	USBFS->UEP1_DMA = (intptr_t)FSUSBCTX.USBFS_EP1_Buf;
-	USBFS->UEP2_DMA = (intptr_t)FSUSBCTX.USBFS_EP2_Buf;
+	USBFS->UEP0_DMA = (intptr_t)FSUSBCTX.USBFS_EP_Buf[0];
+	USBFS->UEP1_DMA = (intptr_t)FSUSBCTX.USBFS_EP_Buf[1];
+	USBFS->UEP2_DMA = (intptr_t)FSUSBCTX.USBFS_EP_Buf[2];
 
 	USBFS->UEP0_CTRL_H = USBFS_UEP_R_RES_ACK | USBFS_UEP_T_RES_NAK;
 	USBFS->UEP1_CTRL_H = USBFS_UEP_T_RES_NAK;
@@ -523,13 +518,6 @@ void USBFS_Device_Endp_Init()
     }
 }
 
-
-void USBFS_Poll()
-{
-	//USBDEBUG2 = USBFS->INT_ST;//EP0_DATA[1];
-	//USBDEBUG1 = USBFS->MIS_ST;
-}
-
 int FSUSBSetup()
 {
 	RCC->APB2PCENR |= RCC_APB2Periph_AFIO | RCC_APB2Periph_GPIOC;
diff --git a/examples_x035/usbdevice.incomplete/fsusb.h b/examples_x035/usbdevice.incomplete/fsusb.h
index 0ea32230edf8b1f05c8626df23abdef1d264c678..3aca2cedfae14eefc6ffc508d5821a6dcd09d50e 100644
--- a/examples_x035/usbdevice.incomplete/fsusb.h
+++ b/examples_x035/usbdevice.incomplete/fsusb.h
@@ -9,7 +9,6 @@
 extern uint32_t USBDEBUG0, USBDEBUG1, USBDEBUG2;
 
 int FSUSBSetup();
-void USBFS_Poll();
 uint8_t USBFS_Endp_DataUp(uint8_t endp, uint8_t *pbuf, uint16_t len, uint8_t mod);
 
 
@@ -28,19 +27,18 @@ struct _USBState
 	volatile uint8_t  USBFS_DevEnumStatus;
 
 	/* Endpoint Buffer */
-	__attribute__ ((aligned(4))) uint8_t USBFS_EP0_Buf[64];
-	__attribute__ ((aligned(4))) uint8_t USBFS_EP1_Buf[64];
-	__attribute__ ((aligned(4))) uint8_t USBFS_EP2_Buf[64];
-	#define pUSBFS_SetupReqPak                 ((tusb_control_request_t*)ctx->USBFS_EP0_Buf)
+	__attribute__ ((aligned(4))) uint8_t USBFS_EP_Buf[FUSB_CONFIG_EPS][64];
 
+	#define pUSBFS_SetupReqPak                 ((tusb_control_request_t*)ctx->USBFS_EP_Buf[0])
 
-	int USBFS_HidIdle[2];
-	int USBFS_HidProtocol[2];
+
+	uint8_t USBFS_HidIdle[FUSB_HID_INTERFACES];
+	uint8_t USBFS_HidProtocol[FUSB_HID_INTERFACES];
 
 	const uint8_t  *pUSBFS_Descr;
 
 	/* USB IN Endpoint Busy Flag */
-	volatile uint8_t  USBFS_Endp_Busy[UNUM_EP];
+	volatile uint8_t  USBFS_Endp_Busy[FUSB_CONFIG_EPS];
 };
 
 extern struct _USBState FSUSBCTX;
diff --git a/examples_x035/usbdevice.incomplete/usb_config.h b/examples_x035/usbdevice.incomplete/usb_config.h
new file mode 100644
index 0000000000000000000000000000000000000000..840c01238eb19cb44e3780e3bdbca927b1231f32
--- /dev/null
+++ b/examples_x035/usbdevice.incomplete/usb_config.h
@@ -0,0 +1,225 @@
+#ifndef _USB_CONFIG_H
+#define _USB_CONFIG_H
+
+#define FUSB_5V_OPERATION 0
+#define FUSB_CONFIG_EPS   3 // Include EP0 in this count
+#define FUSB_SUPPORTS_SLEEP 0
+
+#define FUSB_HID_INTERFACES 2
+
+
+//Taken from http://www.usbmadesimple.co.uk/ums_ms_desc_dev.htm
+static const uint8_t device_descriptor[] = {
+	18, //Length
+	1,  //Type (Device)
+	0x00, 0x02, //Spec
+	0x0, //Device Class
+	0x0, //Device Subclass
+	0x0, //Device Protocol  (000 = use config descriptor)
+	64, //Max packet size for EP0 (This has to be 8 because of the USB Low-Speed Standard)
+	0xaa, 0xaa, //ID Vendor
+	0x04, 0xd0, //ID Product
+	0x03, 0x00, //ID Rev
+	1, //Manufacturer string
+	2, //Product string
+	3, //Serial string
+	1, //Max number of configurations
+};
+
+
+
+/* Configuration Descriptor Set */
+static const uint8_t config_descriptor[ ] =
+{
+    /* Configuration Descriptor */
+    0x09,                                                   // bLength
+    0x02,                                                   // bDescriptorType
+    0x3B, 0x00,                                             // wTotalLength
+    0x02,                                                   // bNumInterfaces
+    0x01,                                                   // bConfigurationValue
+    0x00,                                                   // iConfiguration
+    0xA0,                                                   // bmAttributes: Bus Powered; Remote Wakeup
+    0x32,                                                   // MaxPower: 100mA
+
+    /* Interface Descriptor (Keyboard) */
+    0x09,                                                   // bLength
+    0x04,                                                   // bDescriptorType
+    0x00,                                                   // bInterfaceNumber
+    0x00,                                                   // bAlternateSetting
+    0x01,                                                   // bNumEndpoints
+    0x03,                                                   // bInterfaceClass
+    0x01,                                                   // bInterfaceSubClass
+    0x01,                                                   // bInterfaceProtocol: Keyboard
+    0x00,                                                   // iInterface
+
+    /* HID Descriptor (Keyboard) */
+    0x09,                                                   // bLength
+    0x21,                                                   // bDescriptorType
+    0x11, 0x01,                                             // bcdHID
+    0x00,                                                   // bCountryCode
+    0x01,                                                   // bNumDescriptors
+    0x22,                                                   // bDescriptorType
+    0x3E, 0x00,                                             // wDescriptorLength
+
+    /* Endpoint Descriptor (Keyboard) */
+    0x07,                                                   // bLength
+    0x05,                                                   // bDescriptorType
+    0x81,                                                   // bEndpointAddress: IN Endpoint 1
+    0x03,                                                   // bmAttributes
+    0x08, 0x00,                                             // wMaxPacketSize
+    0x0A,                                                   // bInterval: 10mS
+
+    /* Interface Descriptor (Mouse) */
+    0x09,                                                   // bLength
+    0x04,                                                   // bDescriptorType
+    0x01,                                                   // bInterfaceNumber
+    0x00,                                                   // bAlternateSetting
+    0x01,                                                   // bNumEndpoints
+    0x03,                                                   // bInterfaceClass
+    0x01,                                                   // bInterfaceSubClass
+    0x02,                                                   // bInterfaceProtocol: Mouse
+    0x00,                                                   // iInterface
+
+    /* HID Descriptor (Mouse) */
+    0x09,                                                   // bLength
+    0x21,                                                   // bDescriptorType
+    0x10, 0x01,                                             // bcdHID
+    0x00,                                                   // bCountryCode
+    0x01,                                                   // bNumDescriptors
+    0x22,                                                   // bDescriptorType
+    0x34, 0x00,                                             // wDescriptorLength
+
+    /* Endpoint Descriptor (Mouse) */
+    0x07,                                                   // bLength
+    0x05,                                                   // bDescriptorType
+    0x82,                                                   // bEndpointAddress: IN Endpoint 2
+    0x03,                                                   // bmAttributes
+    0x08, 0x00,                                             // wMaxPacketSize
+    0x01                                                    // bInterval: 1mS
+};
+
+
+
+/* Keyboard Report Descriptor */
+static const uint8_t KeyRepDesc[ ] =
+{
+    0x05, 0x01,                                             // Usage Page (Generic Desktop)
+    0x09, 0x06,                                             // Usage (Keyboard)
+    0xA1, 0x01,                                             // Collection (Application)
+    0x05, 0x07,                                             // Usage Page (Key Codes)
+    0x19, 0xE0,                                             // Usage Minimum (224)
+    0x29, 0xE7,                                             // Usage Maximum (231)
+    0x15, 0x00,                                             // Logical Minimum (0)
+    0x25, 0x01,                                             // Logical Maximum (1)
+    0x75, 0x01,                                             // Report Size (1)
+    0x95, 0x08,                                             // Report Count (8)
+    0x81, 0x02,                                             // Input (Data,Variable,Absolute)
+    0x95, 0x01,                                             // Report Count (1)
+    0x75, 0x08,                                             // Report Size (8)
+    0x81, 0x01,                                             // Input (Constant)
+    0x95, 0x03,                                             // Report Count (3)
+    0x75, 0x01,                                             // Report Size (1)
+    0x05, 0x08,                                             // Usage Page (LEDs)
+    0x19, 0x01,                                             // Usage Minimum (1)
+    0x29, 0x03,                                             // Usage Maximum (3)
+    0x91, 0x02,                                             // Output (Data,Variable,Absolute)
+    0x95, 0x05,                                             // Report Count (5)
+    0x75, 0x01,                                             // Report Size (1)
+    0x91, 0x01,                                             // Output (Constant,Array,Absolute)
+    0x95, 0x06,                                             // Report Count (6)
+    0x75, 0x08,                                             // Report Size (8)
+    0x26, 0xFF, 0x00,                                       // Logical Maximum (255)
+    0x05, 0x07,                                             // Usage Page (Key Codes)
+    0x19, 0x00,                                             // Usage Minimum (0)
+    0x29, 0x91,                                             // Usage Maximum (145)
+    0x81, 0x00,                                             // Input(Data,Array,Absolute)
+    0xC0                                                    // End Collection
+};
+
+/* Mouse Report Descriptor */
+static const uint8_t MouseRepDesc[ ] =
+{
+    0x05, 0x01,                                             // Usage Page (Generic Desktop)
+    0x09, 0x02,                                             // Usage (Mouse)
+    0xA1, 0x01,                                             // Collection (Application)
+    0x09, 0x01,                                             // Usage (Pointer)
+    0xA1, 0x00,                                             // Collection (Physical)
+    0x05, 0x09,                                             // Usage Page (Button)
+    0x19, 0x01,                                             // Usage Minimum (Button 1)
+    0x29, 0x03,                                             // Usage Maximum (Button 3)
+    0x15, 0x00,                                             // Logical Minimum (0)
+    0x25, 0x01,                                             // Logical Maximum (1)
+    0x75, 0x01,                                             // Report Size (1)
+    0x95, 0x03,                                             // Report Count (3)
+    0x81, 0x02,                                             // Input (Data,Variable,Absolute)
+    0x75, 0x05,                                             // Report Size (5)
+    0x95, 0x01,                                             // Report Count (1)
+    0x81, 0x01,                                             // Input (Constant,Array,Absolute)
+    0x05, 0x01,                                             // Usage Page (Generic Desktop)
+    0x09, 0x30,                                             // Usage (X)
+    0x09, 0x31,                                             // Usage (Y)
+    0x09, 0x38,                                             // Usage (Wheel)
+    0x15, 0x81,                                             // Logical Minimum (-127)
+    0x25, 0x7F,                                             // Logical Maximum (127)
+    0x75, 0x08,                                             // Report Size (8)
+    0x95, 0x03,                                             // Report Count (3)
+    0x81, 0x06,                                             // Input (Data,Variable,Relative)
+    0xC0,                                                   // End Collection
+    0xC0                                                    // End Collection
+};
+
+
+#define STR_MANUFACTURER u"WCH"
+#define STR_PRODUCT      u"CH32X035 Custom Device"
+#define STR_SERIAL       u"CUSTOMDEVICE000"
+
+struct usb_string_descriptor_struct {
+	uint8_t bLength;
+	uint8_t bDescriptorType;
+	uint16_t wString[];
+};
+const static struct usb_string_descriptor_struct string0 __attribute__((section(".rodata"))) = {
+	4,
+	3,
+	{0x0409}
+};
+const static struct usb_string_descriptor_struct string1 __attribute__((section(".rodata")))  = {
+	sizeof(STR_MANUFACTURER),
+	3,
+	STR_MANUFACTURER
+};
+const static struct usb_string_descriptor_struct string2 __attribute__((section(".rodata")))  = {
+	sizeof(STR_PRODUCT),
+	3,
+	STR_PRODUCT
+};
+const static struct usb_string_descriptor_struct string3 __attribute__((section(".rodata")))  = {
+	sizeof(STR_SERIAL),
+	3,
+	STR_SERIAL
+};
+
+// This table defines which descriptor data is sent for each specific
+// request from the host (in wValue and wIndex).
+const static struct descriptor_list_struct {
+	uint32_t	lIndexValue;
+	const uint8_t	*addr;
+	uint8_t		length;
+} descriptor_list[] = {
+	{0x00000100, device_descriptor, sizeof(device_descriptor)},
+	{0x00000200, config_descriptor, sizeof(config_descriptor)},
+	// interface number // 2200 for hid descriptors.
+	{0x00002200, KeyRepDesc, sizeof(KeyRepDesc)},
+	{0x00012200, MouseRepDesc, sizeof(MouseRepDesc)},
+	{0x00002100, config_descriptor + 18, 9 }, // Not sure why, this seems to be useful for Windows + Android.
+
+	{0x00000300, (const uint8_t *)&string0, 4},
+	{0x04090301, (const uint8_t *)&string1, sizeof(STR_MANUFACTURER)},
+	{0x04090302, (const uint8_t *)&string2, sizeof(STR_PRODUCT)},	
+	{0x04090303, (const uint8_t *)&string3, sizeof(STR_SERIAL)}
+};
+#define DESCRIPTOR_LIST_ENTRIES ((sizeof(descriptor_list))/(sizeof(struct descriptor_list_struct)) )
+
+
+#endif
+
diff --git a/examples_x035/usbdevice.incomplete/usb_defines.h b/examples_x035/usbdevice.incomplete/usb_defines.h
new file mode 100644
index 0000000000000000000000000000000000000000..4fd18b68433d10408b992598c9fd3bb24b4657ea
--- /dev/null
+++ b/examples_x035/usbdevice.incomplete/usb_defines.h
@@ -0,0 +1,833 @@
+
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2019 Ha Thach (tinyusb.org)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ * This file is part of the TinyUSB stack.
+ */
+
+/** \ingroup group_usb_definitions
+ *  \defgroup USBDef_Type USB Types
+ *  @{ */
+
+// Cribbed from the WCH x035 example code, but originally from USB IF.
+
+#ifndef _TUSB_TYPES_H_
+#define _TUSB_TYPES_H_
+
+#include <stdbool.h>
+#include <stdint.h>
+
+
+/*------------------------------------------------------------------*/
+/* From Linux
+ *------------------------------------------------------------------*/
+
+
+#define USB_DIR_OUT			0		/* to device */
+#define USB_DIR_IN			0x80		/* to host */
+
+#define USB_TYPE_MASK			(0x03 << 5)
+#define USB_TYPE_STANDARD		(0x00 << 5)
+#define USB_TYPE_CLASS			(0x01 << 5)
+#define USB_TYPE_VENDOR			(0x02 << 5)
+#define USB_TYPE_RESERVED		(0x03 << 5)
+
+
+/*
+ * USB recipients, the third of three bRequestType fields
+ */
+#define USB_RECIP_MASK			0x1f
+#define USB_RECIP_DEVICE		0x00
+#define USB_RECIP_INTERFACE		0x01
+#define USB_RECIP_ENDPOINT		0x02
+#define USB_RECIP_OTHER			0x03
+/* From Wireless USB 1.0 */
+#define USB_RECIP_PORT			0x04
+#define USB_RECIP_RPIPE		0x05
+
+#define TU_ATTR_PACKED __attribute__((packed))
+#ifndef TU_BIT
+#define TU_BIT(n)             (1U << (n))
+#endif
+#define TU_STRCAT(a, b)   a##b            ///< concat without expand
+#define TU_XSTRCAT(a, b)  TU_STRCAT(a, b) ///< expand then concat
+// Compile-time Assert
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
+  #define TU_VERIFY_STATIC   _Static_assert
+#elif defined (__cplusplus) && __cplusplus >= 201103L
+  #define TU_VERIFY_STATIC   static_assert
+#else
+  #define TU_VERIFY_STATIC(const_expr, _mess) enum { TU_XSTRCAT(_verify_static_, _TU_COUNTER_) = 1/(!!(const_expr)) }
+#endif
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/*------------------------------------------------------------------*/
+/* CONSTANTS
+ *------------------------------------------------------------------*/
+
+/// defined base on EHCI specs value for Endpoint Speed
+typedef enum
+{
+  TUSB_SPEED_FULL = 0,
+  TUSB_SPEED_LOW     ,
+  TUSB_SPEED_HIGH,
+  TUSB_SPEED_INVALID = 0xff,
+}tusb_speed_t;
+
+/// defined base on USB Specs Endpoint's bmAttributes
+typedef enum
+{
+  TUSB_XFER_CONTROL = 0 ,
+  TUSB_XFER_ISOCHRONOUS ,
+  TUSB_XFER_BULK        ,
+  TUSB_XFER_INTERRUPT
+}tusb_xfer_type_t;
+
+typedef enum
+{
+  TUSB_DIR_OUT = 0,
+  TUSB_DIR_IN  = 1,
+
+  TUSB_DIR_IN_MASK = 0x80
+}tusb_dir_t;
+
+/// USB Descriptor Types
+typedef enum
+{
+  TUSB_DESC_DEVICE                = 0x01,
+  TUSB_DESC_CONFIGURATION         = 0x02,
+  TUSB_DESC_STRING                = 0x03,
+  TUSB_DESC_INTERFACE             = 0x04,
+  TUSB_DESC_ENDPOINT              = 0x05,
+  TUSB_DESC_DEVICE_QUALIFIER      = 0x06,
+  TUSB_DESC_OTHER_SPEED_CONFIG    = 0x07,
+  TUSB_DESC_INTERFACE_POWER       = 0x08,
+  TUSB_DESC_OTG                   = 0x09,
+  TUSB_DESC_DEBUG                 = 0x0A,
+  TUSB_DESC_INTERFACE_ASSOCIATION = 0x0B,
+
+  TUSB_DESC_BOS                   = 0x0F,
+  TUSB_DESC_DEVICE_CAPABILITY     = 0x10,
+
+  TUSB_DESC_FUNCTIONAL            = 0x21,
+
+  // Class Specific Descriptor
+  TUSB_DESC_CS_DEVICE             = 0x21,
+  TUSB_DESC_CS_CONFIGURATION      = 0x22,
+  TUSB_DESC_CS_STRING             = 0x23,
+  TUSB_DESC_CS_INTERFACE          = 0x24,
+  TUSB_DESC_CS_ENDPOINT           = 0x25,
+
+  TUSB_DESC_SUPERSPEED_ENDPOINT_COMPANION     = 0x30,
+  TUSB_DESC_SUPERSPEED_ISO_ENDPOINT_COMPANION = 0x31
+}tusb_desc_type_t;
+
+typedef enum
+{
+  TUSB_REQ_GET_STATUS        = 0  ,
+  TUSB_REQ_CLEAR_FEATURE     = 1  ,
+  TUSB_REQ_RESERVED          = 2  ,
+  TUSB_REQ_SET_FEATURE       = 3  ,
+  TUSB_REQ_RESERVED2         = 4  ,
+  TUSB_REQ_SET_ADDRESS       = 5  ,
+  TUSB_REQ_GET_DESCRIPTOR    = 6  ,
+  TUSB_REQ_SET_DESCRIPTOR    = 7  ,
+  TUSB_REQ_GET_CONFIGURATION = 8  ,
+  TUSB_REQ_SET_CONFIGURATION = 9  ,
+  TUSB_REQ_GET_INTERFACE     = 10 ,
+  TUSB_REQ_SET_INTERFACE     = 11 ,
+  TUSB_REQ_SYNCH_FRAME       = 12
+}tusb_request_code_t;
+
+typedef enum
+{
+  TUSB_REQ_FEATURE_EDPT_HALT     = 0,
+  TUSB_REQ_FEATURE_REMOTE_WAKEUP = 1,
+  TUSB_REQ_FEATURE_TEST_MODE     = 2
+}tusb_request_feature_selector_t;
+
+typedef enum
+{
+  TUSB_REQ_TYPE_STANDARD = 0,
+  TUSB_REQ_TYPE_CLASS,
+  TUSB_REQ_TYPE_VENDOR,
+  TUSB_REQ_TYPE_INVALID
+} tusb_request_type_t;
+
+typedef enum
+{
+  TUSB_REQ_RCPT_DEVICE =0,
+  TUSB_REQ_RCPT_INTERFACE,
+  TUSB_REQ_RCPT_ENDPOINT,
+  TUSB_REQ_RCPT_OTHER
+} tusb_request_recipient_t;
+
+// https://www.usb.org/defined-class-codes
+typedef enum
+{
+  TUSB_CLASS_UNSPECIFIED          = 0    ,
+  TUSB_CLASS_AUDIO                = 1    ,
+  TUSB_CLASS_CDC                  = 2    ,
+  TUSB_CLASS_HID                  = 3    ,
+  TUSB_CLASS_RESERVED_4           = 4    ,
+  TUSB_CLASS_PHYSICAL             = 5    ,
+  TUSB_CLASS_IMAGE                = 6    ,
+  TUSB_CLASS_PRINTER              = 7    ,
+  TUSB_CLASS_MSC                  = 8    ,
+  TUSB_CLASS_HUB                  = 9    ,
+  TUSB_CLASS_CDC_DATA             = 10   ,
+  TUSB_CLASS_SMART_CARD           = 11   ,
+  TUSB_CLASS_RESERVED_12          = 12   ,
+  TUSB_CLASS_CONTENT_SECURITY     = 13   ,
+  TUSB_CLASS_VIDEO                = 14   ,
+  TUSB_CLASS_PERSONAL_HEALTHCARE  = 15   ,
+  TUSB_CLASS_AUDIO_VIDEO          = 16   ,
+
+  TUSB_CLASS_DIAGNOSTIC           = 0xDC ,
+  TUSB_CLASS_WIRELESS_CONTROLLER  = 0xE0 ,
+  TUSB_CLASS_MISC                 = 0xEF ,
+  TUSB_CLASS_APPLICATION_SPECIFIC = 0xFE ,
+  TUSB_CLASS_VENDOR_SPECIFIC      = 0xFF
+}tusb_class_code_t;
+
+typedef enum
+{
+  MISC_SUBCLASS_COMMON = 2
+}misc_subclass_type_t;
+
+typedef enum
+{
+  MISC_PROTOCOL_IAD = 1
+}misc_protocol_type_t;
+
+typedef enum
+{
+  APP_SUBCLASS_USBTMC = 0x03,
+  APP_SUBCLASS_DFU_RUNTIME = 0x01
+} app_subclass_type_t;
+
+typedef enum
+{
+  DEVICE_CAPABILITY_WIRELESS_USB               = 0x01,
+  DEVICE_CAPABILITY_USB20_EXTENSION            = 0x02,
+  DEVICE_CAPABILITY_SUPERSPEED_USB             = 0x03,
+  DEVICE_CAPABILITY_CONTAINER_id               = 0x04,
+  DEVICE_CAPABILITY_PLATFORM                   = 0x05,
+  DEVICE_CAPABILITY_POWER_DELIVERY             = 0x06,
+  DEVICE_CAPABILITY_BATTERY_INFO               = 0x07,
+  DEVICE_CAPABILITY_PD_CONSUMER_PORT           = 0x08,
+  DEVICE_CAPABILITY_PD_PROVIDER_PORT           = 0x09,
+  DEVICE_CAPABILITY_SUPERSPEED_PLUS            = 0x0A,
+  DEVICE_CAPABILITY_PRECESION_TIME_MEASUREMENT = 0x0B,
+  DEVICE_CAPABILITY_WIRELESS_USB_EXT           = 0x0C,
+  DEVICE_CAPABILITY_BILLBOARD                  = 0x0D,
+  DEVICE_CAPABILITY_AUTHENTICATION             = 0x0E,
+  DEVICE_CAPABILITY_BILLBOARD_EX               = 0x0F,
+  DEVICE_CAPABILITY_CONFIGURATION_SUMMARY      = 0x10
+}device_capability_type_t;
+
+enum {
+  TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP = TU_BIT(5),
+  TUSB_DESC_CONFIG_ATT_SELF_POWERED  = TU_BIT(6),
+};
+
+#define TUSB_DESC_CONFIG_POWER_MA(x)  ((x)/2)
+
+/// Device State TODO remove
+typedef enum
+{
+  TUSB_DEVICE_STATE_UNPLUG = 0  ,
+  TUSB_DEVICE_STATE_CONFIGURED  ,
+  TUSB_DEVICE_STATE_SUSPENDED   ,
+}tusb_device_state_t;
+
+typedef enum
+{
+  XFER_RESULT_SUCCESS,
+  XFER_RESULT_FAILED,
+  XFER_RESULT_STALLED,
+}xfer_result_t;
+
+enum // TODO remove
+{
+  DESC_OFFSET_LEN  = 0,
+  DESC_OFFSET_TYPE = 1
+};
+
+enum
+{
+  INTERFACE_INVALID_NUMBER = 0xff
+};
+
+
+typedef enum
+{
+  MS_OS_20_SET_HEADER_DESCRIPTOR       = 0x00,
+  MS_OS_20_SUBSET_HEADER_CONFIGURATION = 0x01,
+  MS_OS_20_SUBSET_HEADER_FUNCTION      = 0x02,
+  MS_OS_20_FEATURE_COMPATBLE_ID        = 0x03,
+  MS_OS_20_FEATURE_REG_PROPERTY        = 0x04,
+  MS_OS_20_FEATURE_MIN_RESUME_TIME     = 0x05,
+  MS_OS_20_FEATURE_MODEL_ID            = 0x06,
+  MS_OS_20_FEATURE_CCGP_DEVICE         = 0x07,
+  MS_OS_20_FEATURE_VENDOR_REVISION     = 0x08
+} microsoft_os_20_type_t;
+
+enum
+{
+  CONTROL_STAGE_SETUP,
+  CONTROL_STAGE_DATA,
+  CONTROL_STAGE_ACK
+};
+
+//--------------------------------------------------------------------+
+// USB Descriptors
+//--------------------------------------------------------------------+
+
+/// USB Device Descriptor
+typedef struct TU_ATTR_PACKED
+{
+  uint8_t  bLength            ; ///< Size of this descriptor in bytes.
+  uint8_t  bDescriptorType    ; ///< DEVICE Descriptor Type.
+  uint16_t bcdUSB             ; ///< BUSB Specification Release Number in Binary-Coded Decimal (i.e., 2.10 is 210H). This field identifies the release of the USB Specification with which the device and its descriptors are compliant.
+
+  uint8_t  bDeviceClass       ; ///< Class code (assigned by the USB-IF). \li If this field is reset to zero, each interface within a configuration specifies its own class information and the various interfaces operate independently. \li If this field is set to a value between 1 and FEH, the device supports different class specifications on different interfaces and the interfaces may not operate independently. This value identifies the class definition used for the aggregate interfaces. \li If this field is set to FFH, the device class is vendor-specific.
+  uint8_t  bDeviceSubClass    ; ///< Subclass code (assigned by the USB-IF). These codes are qualified by the value of the bDeviceClass field. \li If the bDeviceClass field is reset to zero, this field must also be reset to zero. \li If the bDeviceClass field is not set to FFH, all values are reserved for assignment by the USB-IF.
+  uint8_t  bDeviceProtocol    ; ///< Protocol code (assigned by the USB-IF). These codes are qualified by the value of the bDeviceClass and the bDeviceSubClass fields. If a device supports class-specific protocols on a device basis as opposed to an interface basis, this code identifies the protocols that the device uses as defined by the specification of the device class. \li If this field is reset to zero, the device does not use class-specific protocols on a device basis. However, it may use classspecific protocols on an interface basis. \li If this field is set to FFH, the device uses a vendor-specific protocol on a device basis.
+  uint8_t  bMaxPacketSize0    ; ///< Maximum packet size for endpoint zero (only 8, 16, 32, or 64 are valid). For HS devices is fixed to 64.
+
+  uint16_t idVendor           ; ///< Vendor ID (assigned by the USB-IF).
+  uint16_t idProduct          ; ///< Product ID (assigned by the manufacturer).
+  uint16_t bcdDevice          ; ///< Device release number in binary-coded decimal.
+  uint8_t  iManufacturer      ; ///< Index of string descriptor describing manufacturer.
+  uint8_t  iProduct           ; ///< Index of string descriptor describing product.
+  uint8_t  iSerialNumber      ; ///< Index of string descriptor describing the device's serial number.
+
+  uint8_t  bNumConfigurations ; ///< Number of possible configurations.
+} tusb_desc_device_t;
+
+TU_VERIFY_STATIC( sizeof(tusb_desc_device_t) == 18, "size is not correct");
+
+// USB Binary Device Object Store (BOS) Descriptor
+typedef struct TU_ATTR_PACKED
+{
+  uint8_t  bLength         ; ///< Size of this descriptor in bytes
+  uint8_t  bDescriptorType ; ///< CONFIGURATION Descriptor Type
+  uint16_t wTotalLength    ; ///< Total length of data returned for this descriptor
+  uint8_t  bNumDeviceCaps  ; ///< Number of device capability descriptors in the BOS
+} tusb_desc_bos_t;
+
+/// USB Configuration Descriptor
+typedef struct TU_ATTR_PACKED
+{
+  uint8_t  bLength             ; ///< Size of this descriptor in bytes
+  uint8_t  bDescriptorType     ; ///< CONFIGURATION Descriptor Type
+  uint16_t wTotalLength        ; ///< Total length of data returned for this configuration. Includes the combined length of all descriptors (configuration, interface, endpoint, and class- or vendor-specific) returned for this configuration.
+
+  uint8_t  bNumInterfaces      ; ///< Number of interfaces supported by this configuration
+  uint8_t  bConfigurationValue ; ///< Value to use as an argument to the SetConfiguration() request to select this configuration.
+  uint8_t  iConfiguration      ; ///< Index of string descriptor describing this configuration
+  uint8_t  bmAttributes        ; ///< Configuration characteristics \n D7: Reserved (set to one)\n D6: Self-powered \n D5: Remote Wakeup \n D4...0: Reserved (reset to zero) \n D7 is reserved and must be set to one for historical reasons. \n A device configuration that uses power from the bus and a local source reports a non-zero value in bMaxPower to indicate the amount of bus power required and sets D6. The actual power source at runtime may be determined using the GetStatus(DEVICE) request (see USB 2.0 spec Section 9.4.5). \n If a device configuration supports remote wakeup, D5 is set to one.
+  uint8_t  bMaxPower           ; ///< Maximum power consumption of the USB device from the bus in this specific configuration when the device is fully operational. Expressed in 2 mA units (i.e., 50 = 100 mA).
+} tusb_desc_configuration_t;
+
+/// USB Interface Descriptor
+typedef struct TU_ATTR_PACKED
+{
+  uint8_t  bLength            ; ///< Size of this descriptor in bytes
+  uint8_t  bDescriptorType    ; ///< INTERFACE Descriptor Type
+
+  uint8_t  bInterfaceNumber   ; ///< Number of this interface. Zero-based value identifying the index in the array of concurrent interfaces supported by this configuration.
+  uint8_t  bAlternateSetting  ; ///< Value used to select this alternate setting for the interface identified in the prior field
+  uint8_t  bNumEndpoints      ; ///< Number of endpoints used by this interface (excluding endpoint zero). If this value is zero, this interface only uses the Default Control Pipe.
+  uint8_t  bInterfaceClass    ; ///< Class code (assigned by the USB-IF). \li A value of zero is reserved for future standardization. \li If this field is set to FFH, the interface class is vendor-specific. \li All other values are reserved for assignment by the USB-IF.
+  uint8_t  bInterfaceSubClass ; ///< Subclass code (assigned by the USB-IF). \n These codes are qualified by the value of the bInterfaceClass field. \li If the bInterfaceClass field is reset to zero, this field must also be reset to zero. \li If the bInterfaceClass field is not set to FFH, all values are reserved for assignment by the USB-IF.
+  uint8_t  bInterfaceProtocol ; ///< Protocol code (assigned by the USB). \n These codes are qualified by the value of the bInterfaceClass and the bInterfaceSubClass fields. If an interface supports class-specific requests, this code identifies the protocols that the device uses as defined by the specification of the device class. \li If this field is reset to zero, the device does not use a class-specific protocol on this interface. \li If this field is set to FFH, the device uses a vendor-specific protocol for this interface.
+  uint8_t  iInterface         ; ///< Index of string descriptor describing this interface
+} tusb_desc_interface_t;
+
+/// USB Endpoint Descriptor
+typedef struct TU_ATTR_PACKED
+{
+  uint8_t  bLength          ; ///< Size of this descriptor in bytes
+  uint8_t  bDescriptorType  ; ///< ENDPOINT Descriptor Type
+
+  uint8_t  bEndpointAddress ; ///< The address of the endpoint on the USB device described by this descriptor. The address is encoded as follows: \n Bit 3...0: The endpoint number \n Bit 6...4: Reserved, reset to zero \n Bit 7: Direction, ignored for control endpoints 0 = OUT endpoint 1 = IN endpoint.
+
+  struct TU_ATTR_PACKED {
+    uint8_t xfer  : 2;
+    uint8_t sync  : 2;
+    uint8_t usage : 2;
+    uint8_t       : 2;
+  } bmAttributes     ; ///< This field describes the endpoint's attributes when it is configured using the bConfigurationValue. \n Bits 1..0: Transfer Type \n- 00 = Control \n- 01 = Isochronous \n- 10 = Bulk \n- 11 = Interrupt \n If not an isochronous endpoint, bits 5..2 are reserved and must be set to zero. If isochronous, they are defined as follows: \n Bits 3..2: Synchronization Type \n- 00 = No Synchronization \n- 01 = Asynchronous \n- 10 = Adaptive \n- 11 = Synchronous \n Bits 5..4: Usage Type \n- 00 = Data endpoint \n- 01 = Feedback endpoint \n- 10 = Implicit feedback Data endpoint \n- 11 = Reserved \n Refer to Chapter 5 of USB 2.0 specification for more information. \n All other bits are reserved and must be reset to zero. Reserved bits must be ignored by the host.
+
+  struct TU_ATTR_PACKED {
+    uint16_t size           : 11; ///< Maximum packet size this endpoint is capable of sending or receiving when this configuration is selected. \n For isochronous endpoints, this value is used to reserve the bus time in the schedule, required for the per-(micro)frame data payloads. The pipe may, on an ongoing basis, actually use less bandwidth than that reserved. The device reports, if necessary, the actual bandwidth used via its normal, non-USB defined mechanisms. \n For all endpoints, bits 10..0 specify the maximum packet size (in bytes). \n For high-speed isochronous and interrupt endpoints: \n Bits 12..11 specify the number of additional transaction opportunities per microframe: \n- 00 = None (1 transaction per microframe) \n- 01 = 1 additional (2 per microframe) \n- 10 = 2 additional (3 per microframe) \n- 11 = Reserved \n Bits 15..13 are reserved and must be set to zero.
+    uint16_t hs_period_mult : 2;
+    uint16_t TU_RESERVED    : 3;
+  }wMaxPacketSize;
+
+  uint8_t  bInterval        ; ///< Interval for polling endpoint for data transfers. Expressed in frames or microframes depending on the device operating speed (i.e., either 1 millisecond or 125 us units). \n- For full-/high-speed isochronous endpoints, this value must be in the range from 1 to 16. The bInterval value is used as the exponent for a \f$ 2^(bInterval-1) \f$ value; e.g., a bInterval of 4 means a period of 8 (\f$ 2^(4-1) \f$). \n- For full-/low-speed interrupt endpoints, the value of this field may be from 1 to 255. \n- For high-speed interrupt endpoints, the bInterval value is used as the exponent for a \f$ 2^(bInterval-1) \f$ value; e.g., a bInterval of 4 means a period of 8 (\f$ 2^(4-1) \f$) . This value must be from 1 to 16. \n- For high-speed bulk/control OUT endpoints, the bInterval must specify the maximum NAK rate of the endpoint. A value of 0 indicates the endpoint never NAKs. Other values indicate at most 1 NAK each bInterval number of microframes. This value must be in the range from 0 to 255. \n Refer to Chapter 5 of USB 2.0 specification for more information.
+} tusb_desc_endpoint_t;
+
+/// USB Other Speed Configuration Descriptor
+typedef struct TU_ATTR_PACKED
+{
+  uint8_t  bLength             ; ///< Size of descriptor
+  uint8_t  bDescriptorType     ; ///< Other_speed_Configuration Type
+  uint16_t wTotalLength        ; ///< Total length of data returned
+
+  uint8_t  bNumInterfaces      ; ///< Number of interfaces supported by this speed configuration
+  uint8_t  bConfigurationValue ; ///< Value to use to select configuration
+  uint8_t  IConfiguration      ; ///< Index of string descriptor
+  uint8_t  bmAttributes        ; ///< Same as Configuration descriptor
+  uint8_t  bMaxPower           ; ///< Same as Configuration descriptor
+} tusb_desc_other_speed_t;
+
+/// USB Device Qualifier Descriptor
+typedef struct TU_ATTR_PACKED
+{
+  uint8_t  bLength            ; ///< Size of descriptor
+  uint8_t  bDescriptorType    ; ///< Device Qualifier Type
+  uint16_t bcdUSB             ; ///< USB specification version number (e.g., 0200H for V2.00)
+
+  uint8_t  bDeviceClass       ; ///< Class Code
+  uint8_t  bDeviceSubClass    ; ///< SubClass Code
+  uint8_t  bDeviceProtocol    ; ///< Protocol Code
+  uint8_t  bMaxPacketSize0    ; ///< Maximum packet size for other speed
+  uint8_t  bNumConfigurations ; ///< Number of Other-speed Configurations
+  uint8_t  bReserved          ; ///< Reserved for future use, must be zero
+} tusb_desc_device_qualifier_t;
+
+/// USB Interface Association Descriptor (IAD ECN)
+typedef struct TU_ATTR_PACKED
+{
+  uint8_t bLength           ; ///< Size of descriptor
+  uint8_t bDescriptorType   ; ///< Other_speed_Configuration Type
+
+  uint8_t bFirstInterface   ; ///< Index of the first associated interface.
+  uint8_t bInterfaceCount   ; ///< Total number of associated interfaces.
+
+  uint8_t bFunctionClass    ; ///< Interface class ID.
+  uint8_t bFunctionSubClass ; ///< Interface subclass ID.
+  uint8_t bFunctionProtocol ; ///< Interface protocol ID.
+
+  uint8_t iFunction         ; ///< Index of the string descriptor describing the interface association.
+} tusb_desc_interface_assoc_t;
+
+// USB String Descriptor
+typedef struct TU_ATTR_PACKED
+{
+  uint8_t  bLength         ; ///< Size of this descriptor in bytes
+  uint8_t  bDescriptorType ; ///< Descriptor Type
+  uint16_t unicode_string[];
+} tusb_desc_string_t;
+
+// USB Binary Device Object Store (BOS)
+typedef struct TU_ATTR_PACKED
+{
+  uint8_t bLength;
+  uint8_t bDescriptorType ;
+  uint8_t bDevCapabilityType;
+  uint8_t bReserved;
+  uint8_t PlatformCapabilityUUID[16];
+  uint8_t CapabilityData[];
+} tusb_desc_bos_platform_t;
+
+// USB WebuSB URL Descriptor
+typedef struct TU_ATTR_PACKED
+{
+  uint8_t bLength;
+  uint8_t bDescriptorType;
+  uint8_t bScheme;
+  char    url[];
+} tusb_desc_webusb_url_t;
+
+/*------------------------------------------------------------------*/
+/* Types
+ *------------------------------------------------------------------*/
+typedef struct TU_ATTR_PACKED{
+  union {
+    struct TU_ATTR_PACKED {
+      uint8_t recipient :  5; ///< Recipient type tusb_request_recipient_t.
+      uint8_t type      :  2; ///< Request type tusb_request_type_t.
+      uint8_t direction :  1; ///< Direction type. tusb_dir_t
+    } bmRequestType_bit;
+
+    uint8_t bmRequestType;
+  };
+
+  uint8_t  bRequest;
+  uint16_t wValue;
+  uint16_t wIndex;
+  uint16_t wLength;
+} tusb_control_request_t;
+
+TU_VERIFY_STATIC( sizeof(tusb_control_request_t) == 8, "size is not correct");
+
+// TODO move to somewhere suitable
+static inline uint8_t bm_request_type(uint8_t direction, uint8_t type, uint8_t recipient)
+{
+  return ((uint8_t) (direction << 7)) | ((uint8_t) (type << 5)) | (recipient);
+}
+
+//--------------------------------------------------------------------+
+// Endpoint helper
+//--------------------------------------------------------------------+
+
+// Get direction from Endpoint address
+static inline tusb_dir_t tu_edpt_dir(uint8_t addr)
+{
+  return (addr & TUSB_DIR_IN_MASK) ? TUSB_DIR_IN : TUSB_DIR_OUT;
+}
+
+// Get Endpoint number from address
+static inline uint8_t tu_edpt_number(uint8_t addr)
+{
+  return (uint8_t)(addr & (~TUSB_DIR_IN_MASK));
+}
+
+static inline uint8_t tu_edpt_addr(uint8_t num, uint8_t dir)
+{
+  return (uint8_t)(num | (dir ? TUSB_DIR_IN_MASK : 0));
+}
+
+//--------------------------------------------------------------------+
+// Descriptor helper
+//--------------------------------------------------------------------+
+static inline uint8_t const * tu_desc_next(void const* desc)
+{
+  uint8_t const* desc8 = (uint8_t const*) desc;
+  return desc8 + desc8[DESC_OFFSET_LEN];
+}
+
+static inline uint8_t tu_desc_type(void const* desc)
+{
+  return ((uint8_t const*) desc)[DESC_OFFSET_TYPE];
+}
+
+static inline uint8_t tu_desc_len(void const* desc)
+{
+  return ((uint8_t const*) desc)[DESC_OFFSET_LEN];
+}
+
+#ifdef __cplusplus
+ }
+#endif
+
+#endif /* _TUSB_TYPES_H_ */
+
+/** @} */
+
+
+#if 0
+
+/* USB Setup Request */
+typedef struct __attribute__((packed)) _USB_SETUP_REQ
+{
+    uint8_t  bRequestType;
+    uint8_t  bRequest;
+    uint16_t wValue;
+    uint16_t wIndex;
+    uint16_t wLength;
+} USB_SETUP_REQ, *PUSB_SETUP_REQ;
+
+/* USB Device Descriptor */
+typedef struct __attribute__((packed)) _USB_DEVICE_DESCR
+{
+    uint8_t  bLength;
+    uint8_t  bDescriptorType;
+    uint16_t bcdUSB;
+    uint8_t  bDeviceClass;
+    uint8_t  bDeviceSubClass;
+    uint8_t  bDeviceProtocol;
+    uint8_t  bMaxPacketSize0;
+    uint16_t idVendor;
+    uint16_t idProduct;
+    uint16_t bcdDevice;
+    uint8_t  iManufacturer;
+    uint8_t  iProduct;
+    uint8_t  iSerialNumber;
+    uint8_t  bNumConfigurations;
+} USB_DEV_DESCR, *PUSB_DEV_DESCR;
+
+/* USB Configuration Descriptor */
+typedef struct __attribute__((packed)) _USB_CONFIG_DESCR
+{
+    uint8_t  bLength;
+    uint8_t  bDescriptorType;
+    uint16_t wTotalLength;
+    uint8_t  bNumInterfaces;
+    uint8_t  bConfigurationValue;
+    uint8_t  iConfiguration;
+    uint8_t  bmAttributes;
+    uint8_t  MaxPower;
+} USB_CFG_DESCR, *PUSB_CFG_DESCR;
+
+/* USB Interface Descriptor */
+typedef struct __attribute__((packed)) _USB_INTERF_DESCR
+{
+    uint8_t  bLength;
+    uint8_t  bDescriptorType;
+    uint8_t  bInterfaceNumber;
+    uint8_t  bAlternateSetting;
+    uint8_t  bNumEndpoints;
+    uint8_t  bInterfaceClass;
+    uint8_t  bInterfaceSubClass;
+    uint8_t  bInterfaceProtocol;
+    uint8_t  iInterface;
+} USB_ITF_DESCR, *PUSB_ITF_DESCR;
+
+/* USB Endpoint Descriptor */
+typedef struct __attribute__((packed)) _USB_ENDPOINT_DESCR
+{
+    uint8_t  bLength;
+    uint8_t  bDescriptorType;
+    uint8_t  bEndpointAddress;
+    uint8_t  bmAttributes;
+    uint8_t  wMaxPacketSizeL;
+    uint8_t  wMaxPacketSizeH;
+    uint8_t  bInterval;
+} USB_ENDP_DESCR, *PUSB_ENDP_DESCR;
+
+/* USB Configuration Descriptor Set */
+typedef struct __attribute__((packed)) _USB_CONFIG_DESCR_LONG
+{
+    USB_CFG_DESCR  cfg_descr;
+    USB_ITF_DESCR  itf_descr;
+    USB_ENDP_DESCR endp_descr[ 1 ];
+} USB_CFG_DESCR_LONG, *PUSB_CFG_DESCR_LONG;
+
+/* USB HUB Descriptor */
+typedef struct __attribute__((packed)) _USB_HUB_DESCR
+{
+    uint8_t  bDescLength;
+    uint8_t  bDescriptorType;
+    uint8_t  bNbrPorts;
+    uint8_t  wHubCharacteristicsL;
+    uint8_t  wHubCharacteristicsH;
+    uint8_t  bPwrOn2PwrGood;
+    uint8_t  bHubContrCurrent;
+    uint8_t  DeviceRemovable;
+    uint8_t  PortPwrCtrlMask;
+} USB_HUB_DESCR, *PUSB_HUB_DESCR;
+
+/* USB HID Descriptor */
+typedef struct __attribute__((packed)) _USB_HID_DESCR
+{
+    uint8_t  bLength;
+    uint8_t  bDescriptorType;
+    uint16_t bcdHID;
+    uint8_t  bCountryCode;
+    uint8_t  bNumDescriptors;
+    uint8_t  bDescriptorTypeX;
+    uint8_t  wDescriptorLengthL;
+    uint8_t  wDescriptorLengthH;
+} USB_HID_DESCR, *PUSB_HID_DESCR;
+
+
+/*******************************************************************************/
+/* USB Communication Related Macro Definition */
+
+/* USB PID */
+#ifndef USB_PID_SETUP
+#define USB_PID_NULL                0x00
+#define USB_PID_SOF                 0x05
+#define USB_PID_SETUP               0x0D
+#define USB_PID_IN                  0x09
+#define USB_PID_OUT                 0x01
+#define USB_PID_NYET                0x06
+#define USB_PID_ACK                 0x02
+#define USB_PID_NAK                 0x0A
+#define USB_PID_STALL               0x0E
+#define USB_PID_DATA0               0x03
+#define USB_PID_DATA1               0x0B
+#define USB_PID_PRE                 0x0C
+#endif
+
+/* USB standard device request code */
+#ifndef USB_GET_DESCRIPTOR
+#define USB_GET_STATUS              0x00
+#define USB_CLEAR_FEATURE           0x01
+#define USB_SET_FEATURE             0x03
+#define USB_SET_ADDRESS             0x05
+#define USB_GET_DESCRIPTOR          0x06
+#define USB_SET_DESCRIPTOR          0x07
+#define USB_GET_CONFIGURATION       0x08
+#define USB_SET_CONFIGURATION       0x09
+#define USB_GET_INTERFACE           0x0A
+#define USB_SET_INTERFACE           0x0B
+#define USB_SYNCH_FRAME             0x0C
+#endif
+
+#define DEF_STRING_DESC_LANG        0x00
+#define DEF_STRING_DESC_MANU        0x01
+#define DEF_STRING_DESC_PROD        0x02
+#define DEF_STRING_DESC_SERN        0x03
+
+/* USB hub class request code */
+#ifndef HUB_GET_DESCRIPTOR
+#define HUB_GET_STATUS              0x00
+#define HUB_CLEAR_FEATURE           0x01
+#define HUB_GET_STATE               0x02
+#define HUB_SET_FEATURE             0x03
+#define HUB_GET_DESCRIPTOR          0x06
+#define HUB_SET_DESCRIPTOR          0x07
+#endif
+
+/* USB HID class request code */
+#ifndef HID_GET_REPORT
+#define HID_GET_REPORT              0x01
+#define HID_GET_IDLE                0x02
+#define HID_GET_PROTOCOL            0x03
+#define HID_SET_REPORT              0x09
+#define HID_SET_IDLE                0x0A
+#define HID_SET_PROTOCOL            0x0B
+#endif
+
+/* Bit Define for USB Request Type */
+#ifndef USB_REQ_TYP_MASK
+#define USB_REQ_TYP_IN              0x80
+#define USB_REQ_TYP_OUT             0x00
+#define USB_REQ_TYP_READ            0x80
+#define USB_REQ_TYP_WRITE           0x00
+#define USB_REQ_TYP_MASK            0x60
+#define USB_REQ_TYP_STANDARD        0x00
+#define USB_REQ_TYP_CLASS           0x20
+#define USB_REQ_TYP_VENDOR          0x40
+#define USB_REQ_TYP_RESERVED        0x60
+#define USB_REQ_RECIP_MASK          0x1F
+#define USB_REQ_RECIP_DEVICE        0x00
+#define USB_REQ_RECIP_INTERF        0x01
+#define USB_REQ_RECIP_ENDP          0x02
+#define USB_REQ_RECIP_OTHER         0x03
+#define USB_REQ_FEAT_REMOTE_WAKEUP  0x01
+#define USB_REQ_FEAT_ENDP_HALT      0x00
+#endif
+
+/* USB Descriptor Type */
+#ifndef USB_DESCR_TYP_DEVICE
+#define USB_DESCR_TYP_DEVICE        0x01
+#define USB_DESCR_TYP_CONFIG        0x02
+#define USB_DESCR_TYP_STRING        0x03
+#define USB_DESCR_TYP_INTERF        0x04
+#define USB_DESCR_TYP_ENDP          0x05
+#define USB_DESCR_TYP_QUALIF        0x06
+#define USB_DESCR_TYP_SPEED         0x07
+#define USB_DESCR_TYP_OTG           0x09
+#define USB_DESCR_TYP_BOS           0X0F
+#define USB_DESCR_TYP_HID           0x21
+#define USB_DESCR_TYP_REPORT        0x22
+#define USB_DESCR_TYP_PHYSIC        0x23
+#define USB_DESCR_TYP_CS_INTF       0x24
+#define USB_DESCR_TYP_CS_ENDP       0x25
+#define USB_DESCR_TYP_HUB           0x29
+#endif
+
+/* USB Device Class */
+#ifndef USB_DEV_CLASS_HUB
+#define USB_DEV_CLASS_RESERVED      0x00
+#define USB_DEV_CLASS_AUDIO         0x01
+#define USB_DEV_CLASS_COMMUNIC      0x02
+#define USB_DEV_CLASS_HID           0x03
+#define USB_DEV_CLASS_MONITOR       0x04
+#define USB_DEV_CLASS_PHYSIC_IF     0x05
+#define USB_DEV_CLASS_POWER         0x06
+#define USB_DEV_CLASS_PRINTER       0x07
+#define USB_DEV_CLASS_STORAGE       0x08
+#define USB_DEV_CLASS_HUB           0x09
+#define USB_DEV_CLASS_VEN_SPEC      0xFF
+#endif
+
+/* USB Hub Class Request */
+#ifndef HUB_GET_HUB_DESCRIPTOR
+#define HUB_CLEAR_HUB_FEATURE       0x20
+#define HUB_CLEAR_PORT_FEATURE      0x23
+#define HUB_GET_BUS_STATE           0xA3
+#define HUB_GET_HUB_DESCRIPTOR      0xA0
+#define HUB_GET_HUB_STATUS          0xA0
+#define HUB_GET_PORT_STATUS         0xA3
+#define HUB_SET_HUB_DESCRIPTOR      0x20
+#define HUB_SET_HUB_FEATURE         0x20
+#define HUB_SET_PORT_FEATURE        0x23
+#endif
+
+/* Hub Class Feature Selectors */
+#ifndef HUB_PORT_RESET
+#define HUB_C_HUB_LOCAL_POWER       0
+#define HUB_C_HUB_OVER_CURRENT      1
+#define HUB_PORT_CONNECTION         0
+#define HUB_PORT_ENABLE             1
+#define HUB_PORT_SUSPEND            2
+#define HUB_PORT_OVER_CURRENT       3
+#define HUB_PORT_RESET              4
+#define HUB_PORT_POWER              8
+#define HUB_PORT_LOW_SPEED          9
+#define HUB_C_PORT_CONNECTION       16
+#define HUB_C_PORT_ENABLE           17
+#define HUB_C_PORT_SUSPEND          18
+#define HUB_C_PORT_OVER_CURRENT     19
+#define HUB_C_PORT_RESET            20
+#endif
+
+/* USB HID Class Request Code */
+#ifndef HID_GET_REPORT
+#define HID_GET_REPORT              0x01
+#define HID_GET_IDLE                0x02
+#define HID_GET_PROTOCOL            0x03
+#define HID_SET_REPORT              0x09
+#define HID_SET_IDLE                0x0A
+#define HID_SET_PROTOCOL            0x0B
+#endif
+
+/* USB UDisk */
+#ifndef USB_BO_CBW_SIZE
+#define USB_BO_CBW_SIZE             0x1F
+#define USB_BO_CSW_SIZE             0x0D
+#endif
+#ifndef USB_BO_CBW_SIG0
+#define USB_BO_CBW_SIG0             0x55
+#define USB_BO_CBW_SIG1             0x53
+#define USB_BO_CBW_SIG2             0x42
+#define USB_BO_CBW_SIG3             0x43
+#define USB_BO_CSW_SIG0             0x55
+#define USB_BO_CSW_SIG1             0x53
+#define USB_BO_CSW_SIG2             0x42
+#define USB_BO_CSW_SIG3             0x53
+#endif
+
+/* USB CDC Class request code */
+#ifndef CDC_GET_LINE_CODING
+#define CDC_GET_LINE_CODING         0X21                                      /* This request allows the host to find out the currently configured line coding */
+#define CDC_SET_LINE_CODING         0x20                                      /* Configures DTE rate, stop-bits, parity, and number-of-character */
+#define CDC_SET_LINE_CTLSTE         0X22                                      /* This request generates RS-232/V.24 style control signals */
+#define CDC_SEND_BREAK              0X23                                      /* Sends special carrier modulation used to specify RS-232 style break */
+#endif
+/*******************************************************************************/
+
+
+
+#endif
diff --git a/examples_x035/usbdevice.incomplete/usbdevice.c b/examples_x035/usbdevice.incomplete/usbdevice.c
index 3dfd0251756332f58a85af7b44757f6486ee1fe6..2f3c3c1f1643efc25d977136552cdb8584e703d3 100644
--- a/examples_x035/usbdevice.incomplete/usbdevice.c
+++ b/examples_x035/usbdevice.incomplete/usbdevice.c
@@ -30,7 +30,6 @@ void USBFS_IRQHandler();
 	while(1)
 	{
 		printf( "%lu %08x %lu %d %d\n", USBDEBUG0, USBDEBUG1, USBDEBUG2, 0, 0 );
-		USBFS_Poll();
 		int i;
 		//printf( "!! %d %d %d\n", NUM_EP, USBFS_Endp_Busy[0], USBFS_Endp_Busy[1] );
 		for( i = 1; i < 3; i++ )
@@ -46,7 +45,19 @@ USBDEBUG0+= 100;
   //              USBFSD_UEP_TX_CTRL( i ) = ( USBFSD_UEP_TX_CTRL( i ) & ~USBFS_UEP_T_RES_MASK ) | USBFS_UEP_T_RES_ACK;
 	//			USBFS_Endp_Busy[i] = 1;
 
-				char pbuf[16] = { 0x00, 1, 1 };
+				char pbuf[16] = { 0xaa, 1, 1 };
+/*				static iter;
+				if( i == 2 )
+				{
+					iter++;
+					switch( (iter>>3) & 3 )
+					{
+					case 0: pbuf[1] = 1; break;
+					case 1: pbuf[2] = 1; break;
+					case 2: pbuf[1] = -1; break;
+					case 3: pbuf[2] = -1; break;
+					}
+				}*/
 				uint8_t r = USBFS_Endp_DataUp( i, pbuf, (i==1)?8:4, DEF_UEP_CPY_LOAD);
 //USBDEBUG1+=r;
 			}