I'm looking for a USB device custom class example for the LPC17xx. There's plenty of examples for HID, CDC & memory, but nothing for custom classes.
I have added usbd_cls.c (usbd_cls_ep_req etc) and my own USBD_ConfigDescriptor to override the usb_lib.c definition.
It's not working, so I must be missing something else.
It was not too difficult.
1. Override USBD_ConfigDescriptor to define your own interface and endpoints
2. Create an endpoint task. eg __task void USBD_RTX_EndPoint2(void)
3. Use USBD_ReadEP to retrieve packets eg U32 PacketSize = USBD_ReadEP(2, Packet);
4. Use USBD_WriteEP to send packets. eg USBD_WriteEP(0x82, &Out, sizeof(Out));
5. Ensure the USB clock is 48 MHz
Now I wish to make a dual MSC & custom class interface...