This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RTX custom class example

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.

Parents
  • 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...

Reply
  • 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...

Children
No data