//***************************************************************************************** // Set Device Configuration : //***************************************************************************************** u_int8 Set_Configuration(void) { usbstack.setup.bmRequest=0; usbstack.setup.bRequest=SET_CONFIG; usbstack.setup.wIndex=0; usbstack.setup.wLength=0; usbstack.buffer=NULL; return ep0Xfer(); }
//***************************************************************************************** // Get Device Descriptor : Device, Configuration, String //***************************************************************************************** u_int8 GetDesc(void) { usbstack.setup.bmRequest=0x80; usbstack.setup.bRequest=GET_DESCRIPTOR; usbstack.setup.wValue=(usbstack.setup.wValue); usbstack.wPayload=uDev.wPayLoad[0]; //usbstack.buffer=&usbstack.setup; return ep0Xfer(); }
//***************************************************************************************** // Set Device Address : //***************************************************************************************** u_int8 SetAddress( u_int8 addr) { usbstack.usbaddr=0; usbstack.setup.bmRequest=0; usbstack.setup.bRequest=SET_ADDRESS; usbstack.setup.wValue=addr; usbstack.setup.wIndex=0; usbstack.setup.wLength=0; return ep0Xfer(); }
unsigned char TPBulk_GetMaxLUN(void) { usbstack.setup.bmRequest=0xa1; usbstack.setup.bRequest=0xfe; usbstack.setup.wValue=0; usbstack.setup.wIndex=0; usbstack.setup.wLength=1; usbstack.buffer=DBUF; return ep0Xfer(); }