Common APIs used by high level application to use this USB host class.
This Vendor Class implementation supports one endpoint for all endpoint types on all directions: Control IN, control OUT, interrupt IN, interrupt OUT, bulk IN, bulk OUT, isochronous IN, isochronous OUT.
This implementation is an example and can be a base to create another Vendor Class which support more endpoint as two bulk IN endpoints.
See Quick start guide for USB host vendor module (UHI vendor).
Modules | |
Related Project(s) | |
In this section you can find all the projects related to the UHI for Vendor Class. | |
Quick Start Guide(s) | |
In this section you can find a list of all Quick Start guides related to the UHI for Vendor Class. | |
Implementation of UHI Vendor | |
Class internal implementation. | |
Interface with USB Host Core (UHC) | |
Define and functions required by UHC. | |
bool uhi_vendor_bulk_in_run | ( | uint8_t * | buf, |
iram_size_t | buf_size, | ||
uhd_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
. bool uhi_vendor_bulk_is_available | ( | void | ) |
Check if a transfer on BULK is possible.
1
if possible, otherwise 0
. bool uhi_vendor_bulk_out_run | ( | uint8_t * | buf, |
iram_size_t | buf_size, | ||
uhd_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
. bool uhi_vendor_control_in_run | ( | uint8_t * | buf, |
iram_size_t | buf_size, | ||
uhd_callback_setup_end_t | callback | ||
) |
Start a transfer on control 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 uhi_vendor_control_out_run | ( | uint8_t * | buf, |
iram_size_t | buf_size, | ||
uhd_callback_setup_end_t | callback | ||
) |
Start a transfer on control 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
. bool uhi_vendor_int_in_run | ( | uint8_t * | buf, |
iram_size_t | buf_size, | ||
uhd_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
. bool uhi_vendor_int_is_available | ( | void | ) |
Check if a transfer on INTERRUPT is possible.
1
if possible, otherwise 0
. bool uhi_vendor_int_out_run | ( | uint8_t * | buf, |
iram_size_t | buf_size, | ||
uhd_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
. bool uhi_vendor_iso_in_run | ( | uint8_t * | buf, |
iram_size_t | buf_size, | ||
uhd_callback_trans_t | callback | ||
) |
Start a transfer on ISO 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 uhi_vendor_iso_is_available | ( | void | ) |
Check if a transfer on ISO is possible.
1
if possible, otherwise 0
. bool uhi_vendor_iso_out_run | ( | uint8_t * | buf, |
iram_size_t | buf_size, | ||
uhd_callback_trans_t | callback | ||
) |
Start a transfer on ISO 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
.