zephyr/include/usb
Loic Poulain 16921b0698 usb: Add transfer management API
The transfer API provides 'high' level functions to manage sending and
reception of USB data. A USB (class) driver has to register the generic
usb_transfer_ep_callback as endpoint status callback in order to use
the API.

With this API, the class driver does not need to take care of low-level
usb transfer management (packet splitting, ZLP, synchronization...).
The usb_transfer methods will split transfer into multiple transactions
depending endpoint max size and controller capabilities.

Once the transfer is completed, class driver is notified by a callback.
The usb_transfer method can be executed in IRQ/atomic context.
A usb_transfer synchronous helper exists which block-waits until
transfer completion.

In write case, a transfer is complete when all data has been sent.
In read case, a transfer is complete when the exact amount of data
requested has been received or if a short-pkt (including ZLP) is
received.

transfer methods are thread-safe.

A transfer can be cancelled at any time.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2018-03-16 14:45:24 -07:00
..
class usb: cdc: Remove duplicated class code 2018-02-05 06:39:50 -08:00
usb_common.h usb: Rename unicode into UTF16LE 2018-03-14 13:40:59 +01:00
usb_device.h usb: Add transfer management API 2018-03-16 14:45:24 -07:00
usbstruct.h usb: hid: Remove duplicated definitions 2018-02-05 06:39:50 -08:00