Common APIs used by high level application to use this USB class.
These routines are used to transfer data to/from USB VENDOR endpoints.
See Quick start guide for USB Device Vendor module (UDI Vendor).
Modules | |
Interface with USB Device Core (UDC) | |
Structures and functions required by UDC. | |
Implementation of UDI Vendor Class | |
Class internal implementation. | |
USB interface descriptors | |
The following structures provide predefined USB interface descriptors. | |
Functions | |
bool | udi_vendor_bulk_in_run (uint8_t *buf, iram_size_t buf_size, udd_callback_trans_t callback) |
Start a transfer on bulk IN. More... | |
bool | udi_vendor_bulk_out_run (uint8_t *buf, iram_size_t buf_size, udd_callback_trans_t callback) |
Start a transfer on bulk OUT. More... | |
bool | udi_vendor_interrupt_in_run (uint8_t *buf, iram_size_t buf_size, udd_callback_trans_t callback) |
Start a transfer on interrupt IN. More... | |
bool | udi_vendor_interrupt_out_run (uint8_t *buf, iram_size_t buf_size, udd_callback_trans_t callback) |
Start a transfer on interrupt OUT. More... | |
bool | udi_vendor_iso_in_run (uint8_t *buf, iram_size_t buf_size, udd_callback_trans_t callback) |
Start a transfer on isochronous IN. More... | |
bool | udi_vendor_iso_out_run (uint8_t *buf, iram_size_t buf_size, udd_callback_trans_t callback) |
Start a transfer on isochronous OUT. More... | |
bool udi_vendor_bulk_in_run | ( | uint8_t * | buf, |
iram_size_t | buf_size, | ||
udd_callback_trans_t | callback | ||
) |
Start a transfer on bulk IN.
When the transfer is finished or aborted (stall, reset, ...), the callback is called. The callback returns the transfer status and eventually the number of byte transfered.
buf | Buffer on Internal RAM to send or fill. It must be align, then use COMPILER_WORD_ALIGNED. |
buf_size | Buffer size to send or fill |
callback | NULL or function to call at the end of transfer |
1
if function was successfully done, otherwise 0
. References udd_ep_run(), and UDI_VENDOR_EP_BULK_IN.
Referenced by main_vendor_bulk_out_received().
bool udi_vendor_bulk_out_run | ( | uint8_t * | buf, |
iram_size_t | buf_size, | ||
udd_callback_trans_t | callback | ||
) |
Start a transfer on bulk OUT.
When the transfer is finished or aborted (stall, reset, ...), the callback is called. The callback returns the transfer status and eventually the number of byte transfered.
buf | Buffer on Internal RAM to send or fill. It must be align, then use COMPILER_WORD_ALIGNED. |
buf_size | Buffer size to send or fill |
callback | NULL or function to call at the end of transfer |
1
if function was successfully done, otherwise 0
. References udd_ep_run(), and UDI_VENDOR_EP_BULK_OUT.
Referenced by main_vendor_bulk_in_received().
bool udi_vendor_interrupt_in_run | ( | uint8_t * | buf, |
iram_size_t | buf_size, | ||
udd_callback_trans_t | callback | ||
) |
Start a transfer on interrupt IN.
When the transfer is finished or aborted (stall, reset, ...), the callback is called. The callback returns the transfer status and eventually the number of byte transfered.
buf | Buffer on Internal RAM to send or fill. It must be align, then use COMPILER_WORD_ALIGNED. |
buf_size | Buffer size to send or fill |
callback | NULL or function to call at the end of transfer |
1
if function was successfully done, otherwise 0
. References udd_ep_run(), and UDI_VENDOR_EP_INTERRUPT_IN.
Referenced by main_vendor_int_out_received().
bool udi_vendor_interrupt_out_run | ( | uint8_t * | buf, |
iram_size_t | buf_size, | ||
udd_callback_trans_t | callback | ||
) |
Start a transfer on interrupt OUT.
When the transfer is finished or aborted (stall, reset, ...), the callback is called. The callback returns the transfer status and eventually the number of byte transfered.
buf | Buffer on Internal RAM to send or fill. It must be align, then use COMPILER_WORD_ALIGNED. |
buf_size | Buffer size to send or fill |
callback | NULL or function to call at the end of transfer |
1
if function was successfully done, otherwise 0
. References udd_ep_run(), and UDI_VENDOR_EP_INTERRUPT_OUT.
Referenced by main_vendor_int_in_received().
bool udi_vendor_iso_in_run | ( | uint8_t * | buf, |
iram_size_t | buf_size, | ||
udd_callback_trans_t | callback | ||
) |
Start a transfer on isochronous IN.
When the transfer is finished or aborted (stall, reset, ...), the callback is called. The callback returns the transfer status and eventually the number of byte transfered.
buf | Buffer on Internal RAM to send or fill. It must be align, then use COMPILER_WORD_ALIGNED. |
buf_size | Buffer size to send or fill |
callback | NULL or function to call at the end of transfer |
1
if function was successfully done, otherwise 0
. bool udi_vendor_iso_out_run | ( | uint8_t * | buf, |
iram_size_t | buf_size, | ||
udd_callback_trans_t | callback | ||
) |
Start a transfer on isochronous OUT.
When the transfer is finished or aborted (stall, reset, ...), the callback is called. The callback returns the transfer status and eventually the number of byte transfered.
buf | Buffer on Internal RAM to send or fill. It must be align, then use COMPILER_WORD_ALIGNED. |
buf_size | Buffer size to send or fill |
callback | NULL or function to call at the end of transfer |
1
if function was successfully done, otherwise 0
.