Atmel Software Framework

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
USB Device Interface (UDI) for Mass Storage Class (MSC)

Common APIs used by high level application to use this USB class.

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).


 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 Mass Storage Class (MSC).
 Interface with USB Device Core (UDC)
 Structures and functions required by UDC.
 Implementation of UDI MSC
 Class internal implementation.
 USB interface descriptors
 The following structures provide predefined USB interface descriptors.


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...

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_readMemory to USB, if true
blockBuffer on Internal RAM to send or fill
block_sizeBuffer size to send or fill
callbackFunction 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.

References block_size, callback, NULL, UDI_MSC_EP_IN, UDI_MSC_EP_OUT, and udi_msc_trans_ack().

Referenced by at45dbx_usb_read_10(), at45dbx_usb_write_10(), sd_mmc_spi_read_multiple_sector_callback(), sd_mmc_spi_write_multiple_sector_callback(), sd_mmc_usb_read_10(), sd_mmc_usb_write_10(), and virtual_usb_trans().