Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
USB Device Interface (UDI) for Vendor Class

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

 
 Quick Start Guide(s)
 In this section you can find a list of all Quick Start guides related to the USB Device Interface (UDI) for Vendor Class.
 
 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.

Parameters
bufBuffer on Internal RAM to send or fill. It must be align, then use COMPILER_WORD_ALIGNED.
buf_sizeBuffer size to send or fill
callbackNULL or function to call at the end of transfer
Returns
1 if function was successfully done, otherwise 0.

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.

Parameters
bufBuffer on Internal RAM to send or fill. It must be align, then use COMPILER_WORD_ALIGNED.
buf_sizeBuffer size to send or fill
callbackNULL or function to call at the end of transfer
Returns
1 if function was successfully done, otherwise 0.

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.

Parameters
bufBuffer on Internal RAM to send or fill. It must be align, then use COMPILER_WORD_ALIGNED.
buf_sizeBuffer size to send or fill
callbackNULL or function to call at the end of transfer
Returns
1 if function was successfully done, otherwise 0.

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.

Parameters
bufBuffer on Internal RAM to send or fill. It must be align, then use COMPILER_WORD_ALIGNED.
buf_sizeBuffer size to send or fill
callbackNULL or function to call at the end of transfer
Returns
1 if function was successfully done, otherwise 0.

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.

Parameters
bufBuffer on Internal RAM to send or fill. It must be align, then use COMPILER_WORD_ALIGNED.
buf_sizeBuffer size to send or fill
callbackNULL or function to call at the end of transfer
Returns
1 if function was successfully done, otherwise 0.

Referenced by main_vendor_iso_out_received().

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.

Parameters
bufBuffer on Internal RAM to send or fill. It must be align, then use COMPILER_WORD_ALIGNED.
buf_sizeBuffer size to send or fill
callbackNULL or function to call at the end of transfer
Returns
1 if function was successfully done, otherwise 0.

Referenced by main_vendor_iso_out_received().