Hello, How can I used Vendor Request with USBCore.h?
* Name: usbcore.c * Purpose: USB Core Module * Version: V1.20
There is some line in these file with USB Vendor Request
#if USB_VENDOR case REQUEST_VENDOR: switch (SetupPacket.bmRequestType.BM.Recipient) { case REQUEST_TO_DEVICE: if (!USB_ReqVendorDev(FALSE)) { goto stall_i; /* not supported */ } break; case REQUEST_TO_INTERFACE: if (!USB_ReqVendorIF(FALSE)) { goto stall_i; /* not supported */ } break; case REQUEST_TO_ENDPOINT: if (!USB_ReqVendorEP(FALSE)) { goto stall_i; /* not supported */ } break; default: goto stall_i; } USB_StatusInStage(); break; /* end case REQUEST_VENDOR */ #endif /* USB_VENDOR */
But I don't find any sample or documentation how to implement USB_ReqVendorDev, USB_ReqVendorIF, USB_ReqVendorEP
Thanks
missing information: target device is LPC17XX
Vendor requests are also carried by control transfer, like standard device requests (Get_Descriptor, Set_Configuration, etc). The USB stack shows typical control transfer handling in the code for standard device requests. Extract a skeleton from the code.
Tsuneo