USBUS Mass Storage Class functions definitions. More...
USBUS Mass Storage Class functions definitions.
Definition in file msc.h.
Go to the source code of this file.
Data Structures | |
struct | usbus_msc_lun |
USBUS MSC Logical Unit descriptor. More... | |
struct | usbus_msc_device |
USBUS MSC device interface context. More... | |
#define | USBUS_MSC_EP_DATA_SIZE 64 |
USBUS MSC bulk data endpoint size. | |
#define | USBUS_MSC_EP_IN_REQUIRED_NUMOF 1 |
Number of IN EPs required for the MSC interface. | |
#define | USBUS_MSC_EP_OUT_REQUIRED_NUMOF 1 |
Number of Out EPs required for the MSC interface. | |
enum | usbus_msc_state_t { WAITING , WAIT_FOR_TRANSFER , DATA_TRANSFER_IN , DATA_TRANSFER_OUT , GEN_CSW } |
USBUS MSC internal state machine enum. More... | |
typedef struct usbus_msc_lun | usbus_msc_lun_t |
USBUS MSC Logical Unit descriptor. | |
typedef struct usbus_msc_device | usbus_msc_device_t |
USBUS MSC device interface context. | |
int | usbus_msc_init (usbus_t *usbus, usbus_msc_device_t *handler) |
MSC initialization function. | |
int | usbus_msc_add_lun (usbus_t *usbus, mtd_dev_t *dev) |
Register a MTD device as a MSC LUN (Logical Unit Number) | |
int | usbus_msc_remove_lun (usbus_t *usbus, mtd_dev_t *dev) |
Unregister a MTD device as a MSC LUN. | |
#define USBUS_MSC_EP_DATA_SIZE 64 |
#define USBUS_MSC_EP_IN_REQUIRED_NUMOF 1 |
#define USBUS_MSC_EP_OUT_REQUIRED_NUMOF 1 |
enum usbus_msc_state_t |
USBUS MSC internal state machine enum.
Register a MTD device as a MSC LUN (Logical Unit Number)
[in] | usbus | USBUS context |
[in] | dev | pointer to the MTD device to export |
int usbus_msc_init | ( | usbus_t * | usbus, |
usbus_msc_device_t * | handler | ||
) |
MSC initialization function.
usbus | USBUS thread to use |
handler | MSC device struct |