ATMEL: usb_commun_ms.h Source File

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

# usb_commun_ms.h

Go to the documentation of this file.

    00001 /*This file is prepared for Doxygen automatic documentation generation.*/
    00012
    00013 /* Copyright (c) 2009 Atmel Corporation. All rights reserved.
    00014  *
    00015  * Redistribution and use in source and binary forms, with or without
    00016  * modification, are permitted provided that the following conditions are met:
    00017  *
    00018  * 1. Redistributions of source code must retain the above copyright notice,
    00019  * this list of conditions and the following disclaimer.
    00020  *
    00021  * 2. Redistributions in binary form must reproduce the above copyright notice,
    00022  * this list of conditions and the following disclaimer in the documentation
    00023  * and/or other materials provided with the distribution.
    00024  *
    00025  * 3. The name of Atmel may not be used to endorse or promote products derived
    00026  * from this software without specific prior written permission.
    00027  *
    00028  * 4. This software may only be redistributed and used in connection with an Atmel
    00029  * AVR product.
    00030  *
    00031  * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
    00032  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    00033  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE EXPRESSLY AND
    00034  * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
    00035  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    00036  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    00037  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    00038  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    00039  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    00040  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    00041  */
    00042
    00043 #ifndef _USB_COMMUN_MS_H_
    00044 #define _USB_COMMUN_MS_H_
    00045
    00048 #define  MS_CLASS                            0x08
    00049
    00050 // ABOUT SUBCLASS, only sub class 6 must be used for new design.
    00051 // What is the SCSI transparent command set (Sub Class 6) ?
    00052 // The SCSI specifications are available from http://www.t10.org/,
    00053 // but these documents don't mention a transparent command set.
    00054 // According to its creator, subclass 06h means that the host should determine the device type by issuing a SCSI INQUIRY command.
    00055 // In the returned INQUIRY data, bits 4..0 of byte 0 specify a peripheral device type (PDT).
    00056 // The SCSI Primary Commands (SPC) specification defines various PDTs and the specifications they should comply with.
    00057 // The code in the VERSION returned in INQUIRY corresponds to a command set of PDT.
    00058 #define  MS_SUB_CLASS1                       0x01
    00059 #define  MS_SUB_CLASS2                       0x02
    00060 #define  MS_SUB_CLASS3                       0x03
    00061 #define  MS_SUB_CLASS4                       0x04
    00062 #define  MS_SUB_CLASS5                       0x05
    00063 #define  MS_SUB_CLASS6                       0x06
    00064
    00065 // ABOUT PROTOCOL, The CBI transport specification is approved for use only with full-speed floppy disk drives.
    00066 // CBI shall not be used in high-speed capable divices, or in devices other than floppy disk drives.
    00067 // Usage of CBI for any new design is discouraged.
    00068 #define  MS_PRO_CTRLBULKINT_COMP             0x00
    00069 #define  MS_PRO_CTRLBULKINT_NOCOMP           0x01
    00070 #define  MS_PROTOCOL_BULK_ONLY               0x50
    00071 #define  MS_PROTOCOL                         MS_PROTOCOL_BULK_ONLY
    00073
    00076 #define  SETUP_MASS_STORAGE_GET_MAX_LUN      0xFE
    00077 #define  SETUP_MASS_STORAGE_RESET            0xFF
    00079
    00080 #endif   // _USB_COMMUN_MS_H_
    00081