The following structures provide predefined USB interface descriptors.
Common APIs used by high level application to use this USB class.
It must be used to define the final USB descriptors.
These routines are used by memory to transfer its data to/from USB MSC endpoints.
See Quick start guide for USB device Mass Storage module (UDI MSC).
Modules | |
Related Project(s) | |
In this section you can find all the projects related to the USB interface descriptors. | |
Quick Start Guide(s) | |
In this section you can find a list of all Quick Start guides related to the USB interface descriptors. | |
Interface with USB Device Core (UDC) | |
Structures and functions required by UDC. | |
Implementation of UDI MSC | |
Class internal implementation. | |
Data Structures | |
struct | udi_msc_desc_t |
Interface descriptor structure for MSC. More... | |
Macros | |
#define | UDI_MSC_DESC |
Content of MSC interface descriptor for all speeds. More... | |
#define | UDI_MSC_DESC_FS |
Content of MSC interface descriptor for full speed only. More... | |
#define | UDI_MSC_DESC_HS |
Content of MSC interface descriptor for high speed only. More... | |
#define | UDI_MSC_EPS_SIZE_FS 64 |
MSC endpoints size for full speed. More... | |
#define | UDI_MSC_EPS_SIZE_HS 512 |
MSC endpoints size for high speed. More... | |
#define | UDI_MSC_STRING_ID 0 |
By default no string associated to this interface. More... | |
Functions | |
bool | udi_msc_process_trans (void) |
Process the background read/write commands. More... | |
bool | udi_msc_trans_block (bool b_read, uint8_t *block, iram_size_t block_size, void(*callback)(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep)) |
Transfers data to/from USB MSC endpoints. More... | |
#define UDI_MSC_DESC |
Content of MSC interface descriptor for all speeds.
#define UDI_MSC_DESC_FS |
Content of MSC interface descriptor for full speed only.
#define UDI_MSC_DESC_HS |
Content of MSC interface descriptor for high speed only.
#define UDI_MSC_EPS_SIZE_FS 64 |
MSC endpoints size for full speed.
#define UDI_MSC_EPS_SIZE_HS 512 |
MSC endpoints size for high speed.
#define UDI_MSC_STRING_ID 0 |
By default no string associated to this interface.
bool udi_msc_process_trans | ( | void | ) |
Process the background read/write commands.
Routine called by the main loop
bool udi_msc_trans_block | ( | bool | b_read, |
uint8_t * | block, | ||
iram_size_t | block_size, | ||
void(*)(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep) | callback | ||
) |
Transfers data to/from USB MSC endpoints.
b_read | Memory to USB, if true |
block | Buffer on Internal RAM to send or fill |
block_size | Buffer size to send or fill |
callback | Function to call at the end of transfer. If NULL then the routine exit when transfer is finish. |
1
if function was successfully done, otherwise 0
.