USB Device Interface (UDI) for Mass Storage Class (MSC) provides an interface for the configuration and management of USB MSC storage device.
The outline of this documentation is as follows:
For more details for Atmel® Software Framework (ASF) USB Device Stack, refer to following application notes:
Data Structures | |
struct | udi_msc_desc_t |
Interface descriptor structure for MSC. 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... | |
UDI MSC Interface for UDC | |
UDC_DESC_STORAGE udi_api_t | udi_api_msc |
Global structure which contains standard UDI interface for UDC. More... | |
USB Interface Descriptors | |
The following structures provide predefined USB interface descriptors. It must be used to define the final USB descriptors. | |
#define | UDI_MSC_STRING_ID 0 |
By default no string is associated to this interface. 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_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_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 is 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.
[in] | b_read | Memory to USB, if true |
[in,out] | block | Buffer on Internal RAM to send or fill |
[in] | block_size | Buffer size to send or fill |
[in] | 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
. UDC_DESC_STORAGE udi_api_t udi_api_msc |
Global structure which contains standard UDI interface for UDC.