Re: USB controller driver usb_dc_ep_write
+ Johann, Andrei, Pawel
<devel@...> On Behalf Of Mark Wang
Sent: 10 December 2018 13:37
Subject: [Zephyr-devel] USB controller driver usb_dc_ep_write
I see many USB controller drivers implement usb_dc_ep_write function with one copy, copy the data (passed to usb_dc_ep_write) to one self’s
buffer then do the transfer.
Do I need do this when implementing one new USB controller driver?
There is no requirement to copy the data, but usually, usb device drivers copy the data to the controller FIFO.
Does the Zephyr USB stack limit the data (pass to usb_dc_ep_write) is in RAM?
There is no defined data size limit when calling the function, but at
then end, driver decides how much data is written (e.g. size of the
The function prototype is as follow:
int usb_dc_ep_write(const u8_t ep, const u8_t *const data,
const u32_t data_len, u32_t *const ret_bytes)
For USB users (e.g. class/gadget drivers, app) the high level usb_transfer() function can be used to execute USB data transfer.
Join email@example.com to automatically receive all group messages.