libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
msc.h File Reference
#include <stdint.h>
#include <libopencm3/usb/usbd.h>
Include dependency graph for msc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define USB_CLASS_MSC   0x08
 
#define USB_MSC_SUBCLASS_RBC   0x01
 
#define USB_MSC_SUBCLASS_ATAPI   0x02
 
#define USB_MSC_SUBCLASS_UFI   0x04
 
#define USB_MSC_SUBCLASS_SCSI   0x06
 
#define USB_MSC_SUBCLASS_LOCKABLE   0x07
 
#define USB_MSC_SUBCLASS_IEEE1667   0x08
 
#define USB_MSC_PROTOCOL_CBI   0x00
 
#define USB_MSC_PROTOCOL_CBI_ALT   0x01
 
#define USB_MSC_PROTOCOL_BBB   0x50
 
#define USB_MSC_REQ_CODES_ADSC   0x00
 
#define USB_MSC_REQ_CODES_GET   0xFC
 
#define USB_MSC_REQ_CODES_PUT   0xFD
 
#define USB_MSC_REQ_CODES_GML   0xFE
 
#define USB_MSC_REQ_CODES_BOMSR   0xFF
 
#define USB_MSC_REQ_BULK_ONLY_RESET   0xFF
 
#define USB_MSC_REQ_GET_MAX_LUN   0xFE
 

Typedefs

typedef struct _usbd_mass_storage usbd_mass_storage
 

Functions

usbd_mass_storageusb_msc_init (usbd_device *usbd_dev, uint8_t ep_in, uint8_t ep_in_size, uint8_t ep_out, uint8_t ep_out_size, const char *vendor_id, const char *product_id, const char *product_revision_level, const uint32_t block_count, int(*read_block)(uint32_t lba, uint8_t *copy_to), int(*write_block)(uint32_t lba, const uint8_t *copy_from))
 Initializes the USB Mass Storage subsystem. More...