USB Mass Storage Class Bulk-only device interface driver. More...
#include <assert.h>#include <atomic.h>#include <byteorder.h>#include <dmapool.h>#include <interrupt.h>#include <physmem.h>#include <status_codes.h>#include <string.h>#include <types.h>#include <util.h>#include <block/device.h>#include <scsi/cdb.h>#include <scsi/spc_protocol.h>#include <scsi/sbc_protocol.h>#include <usb/dev_mux.h>#include <usb/udi_msc_bulk.h>#include <usb/msc_protocol.h>#include <usb/request.h>#include <usb/usb_protocol.h>#include <usb/udc.h>#include <app/usb.h>Go to the source code of this file.
Data Structures | |
| struct | msc_interface |
| A Mass Storage Class interface instance. More... | |
Defines | |
| #define | MSC_MAX_NR_SEGS (2) |
| Maximum number of pending block buffer segments. | |
Functions | |
| static void | msc_queue_empty (struct msc_interface *msc) |
| Current transfer is done; run any registered busy callback functions and clear it. | |
| static int | msc_submit_read_buffers (struct msc_interface *msc, struct block_device *bdev, struct block_request *breq, uint32_t nr_blocks) |
| static void | msc_read_worker (struct msc_interface *msc) |
| static void | msc_do_read (struct msc_interface *msc, struct udc *udc, struct usb_msc_cbw *cbw, uint32_t lba, uint32_t nr_blocks) |
| static int | msc_submit_write_data_req (struct msc_interface *msc, struct block_device *bdev, uint32_t nr_blocks) |
| static void | msc_write_worker (void *data) |
| status_t | udi_msc_enable (struct udc *udc, struct udm_interface *iface, uint16_t setting) |
| Enable the MSC interface. | |
| void | udi_msc_disable (struct udc *udc, struct udm_interface *iface) |
| Disable the MSC interface. | |
| status_t | udi_msc_setup (struct udc *udc, struct udm_interface *iface, struct usb_setup_req *req) |
| Handle a setup request directed at the MSC interface. | |
| status_t | udi_msc_get_iface_descriptor (struct udm_interface *iface, struct usb_request *req, enum usb_device_speed speed, uint16_t len) |
| Get the interface descriptor for the MSC interface. | |
| void | udi_msc_free_descriptor (struct udm_interface *iface, struct usb_request *req) |
| Free the memory allocated by msc_get_iface_descriptor(). | |
| void | udi_msc_set_busy (struct udm_interface *iface, uint16_t asc, void(*queue_empty)(void *data), void *data) |
| Reject data transfer requests. | |
| void | udi_msc_set_ready (struct udm_interface *iface) |
| Allow data transfer requests. | |
USB Mass Storage Class Bulk-only device interface driver.
Copyright (C) 2009 Atmel Corporation. All rights reserved.
Definition in file msc_bulk.c.
1.6.3