How to develop an USB device as vendor specified class

I have the same question of this old post

"I would like to implement a Vendor Specified Interface Class for use with libusb on the nRF52840 USB. There are examples of HID, CDC, Audio, etc. But it is not clear to me how to define my own class. Basically, I would like to configure one interface, where I set the bInterfaceClass to 0xFF, and have one bulk IN endpoint, and one bulk OUT endpoint."

Since the question was posted 6 years ago and the example mentioned is not still in the actual SDKs (in my case SDK 2.3.0), I want to know if there is a more recent example or tutorial. The only one I found is the testusb which implements an USB loopback test, but it's not clear because in the source code there is only the usb_enable(NULL) and nothing else. In the Zephyr's documentation I found this and I'm confusing if the two example are related or not because in the Zephyr's documentation I read that it needs to configure some structures and handlers (loopback_vendor_handler) but in the NCS example there aren't such definitions. How should I write and read data througth USB?

How should I write and read data througth USB? Do someone has a clear example as starting point?

Related