00001 /* ---------------------------------------------------------------------------- 00002 * SAM Software Package License 00003 * ---------------------------------------------------------------------------- 00004 * Copyright (c) 2014, Atmel Corporation 00005 * 00006 * All rights reserved. 00007 * 00008 * Redistribution and use in source and binary forms, with or without 00009 * modification, are permitted provided that the following conditions are met: 00010 * 00011 * - Redistributions of source code must retain the above copyright notice, 00012 * this list of conditions and the disclaimer below. 00013 * 00014 * Atmel's name may not be used to endorse or promote products derived from 00015 * this software without specific prior written permission. 00016 * 00017 * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR 00018 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00019 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 00020 * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, 00021 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00022 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 00023 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00024 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00025 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 00026 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00027 * ---------------------------------------------------------------------------- 00028 */ 00029 00030 /** \file 00031 * 00032 * \section ms_dev_desc Device Descriptors 00033 * 00034 * Declaration of constants for using Device Descriptors with a Mass Storage 00035 * driver. 00036 * 00037 * - For a USB device: 00038 * -# When declaring a USBDeviceDescriptor instance, use the Mass Storage 00039 * codes defined in this file (see "MS device codes"). 00040 * 00041 * \section ms_if_desc Interface Descriptors 00042 * 00043 * Definition of several constants used when manipulating Mass Storage interface 00044 * descriptors. 00045 * 00046 * - For a USB device: 00047 * -# When declaring an interface descriptor for a Mass Storage device, use 00048 * the class, subclass and protocol codes defined here (see 00049 * "MS interface codes"). 00050 */ 00051 00052 #ifndef _MSDESCRIPTORS_H_ 00053 #define _MSDESCRIPTORS_H_ 00054 /**\addtogroup usb_msd 00055 *@{ 00056 */ 00057 00058 /*------------------------------------------------------------------------------ 00059 * Definitions 00060 *------------------------------------------------------------------------------*/ 00061 00062 /** \addtogroup usbd_ms_device_codes MS device codes 00063 * @{ 00064 * This page lists the class, subclass & protocol codes used by a device with 00065 * a Mass Storage driver. 00066 * 00067 * \section Codes 00068 * 00069 * - MSDeviceDescriptor_CLASS 00070 * - MSDeviceDescriptor_SUBCLASS 00071 * - MSDeviceDescriptor_PROTOCOL 00072 */ 00073 00074 /** Class code for a Mass Storage device. */ 00075 #define MSDeviceDescriptor_CLASS 0 00076 00077 /** Subclass code for a Mass Storage device. */ 00078 #define MSDeviceDescriptor_SUBCLASS 0 00079 00080 /** Protocol code for a Mass Storage device. */ 00081 #define MSDeviceDescriptor_PROTOCOL 0 00082 /** @}*/ 00083 00084 00085 /** \addtogroup usb_ms_interface_code MS interface codes 00086 * @{ 00087 * This page lists the available class, subclass & protocol codes for a Mass 00088 * Storage interface. 00089 * 00090 * \section Codes 00091 * 00092 * - MSInterfaceDescriptor_CLASS 00093 * - MSInterfaceDescriptor_SCSI 00094 * - MSInterfaceDescriptor_BULKONLY 00095 */ 00096 00097 /** Class code for a Mass Storage interface. */ 00098 #define MSInterfaceDescriptor_CLASS 0x08 00099 00100 /** Subclass code for a Mass Storage interface using the SCSI protocol. */ 00101 #define MSInterfaceDescriptor_SCSI 0x06 00102 00103 /** Protocol code for a Mass Storage interface using Bulk-Only Transport. */ 00104 #define MSInterfaceDescriptor_BULKONLY 0x50 00105 /** @}*/ 00106 00107 /**@}*/ 00108 #endif /* #ifndef _MSDESCRIPTORS_H_ */ 00109