Replies: 8 comments
-
|
In the spirit of not waiting for someone else to solve my problem, I am trying to strip down webusb example. There is only one control endpoint, so I imagined only request specific to this vendor interface will need |
Beta Was this translation helpful? Give feedback.
-
|
If I need to implement something similar to vendor class, then I need to reference class/vendor_device.c and class/vendor_device.h as example drivers. One small thing I noticed though is that in the webusb example there is endpoint size 512, but the CFG_TUD_VENDOR_EPSIZE was not properly defined to support endpoint size 512 in tusb_config.h |
Beta Was this translation helpful? Give feedback.
-
|
More specifically, what is the difference between init/reset/open? What I know now is that tud_rhport_init calls _init operation for each driver before calling device-specific dcd_init. Also I see p_epbuf->epout and p_epbuf->epin are used to store the buffer for usb transactions, and if I do not rely on the streaming buffer of tusb I would copy their memory content directly. But I do not see where are those buffer address set. I guess the dcd will take the information and configure the hardware correctly? However can I use an endpoint directly without involving the stream interface? |
Beta Was this translation helpful? Give feedback.
-
|
Digging a little further, it seems that |
Beta Was this translation helpful? Give feedback.
-
|
In the end what I am looking for is a vendor device with a mix of interrupt and bulk endpoints. Having some basic example / documentation / advise of how to handle these basic operations would be great. |
Beta Was this translation helpful? Give feedback.
-
|
I am happy to summarize /document the solution if I find out how to do this in the end, but I think I need some help. |
Beta Was this translation helpful? Give feedback.
-
|
I figured most things out. Here is some trimmed sample. |
Beta Was this translation helpful? Give feedback.
-
|
There is also a nice example which is @kkitayam's CMSIS-DAP dongle. https://github.com/kkitayam/akiprobe/blob/main/src/cmsis_dap_device.c |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi I am quite new in TinyUSB. I have worked out the simplest CDC example, but for my application I might need more control. I want to implement it with vendor device and libusb. ( I have done a simple version with CH32V307, but would rather port it to tinyusb which is portable). I think WebUSB example is the closest, and I also saw the rpi pico commit with usbd_app_driver_get_cb, but would there be a simpler bare-minimal example to introduce the use of vendor device with generic in/out bulk/interrupt endpoint, or how to properly use usbd_app_driver_get_cb?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions