⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 upsd3400_usb_app.h

📁 upsd34xx系列单片机keil环境中的开发例程
💻 H
字号:
/*------------------------------------------------------------------------------
upsd3400_usb_app.h

Version:
March 22, 2005 - Version 1.0 - Initial Release.

Description:  USB Flash Disk related information.


Copyright (c) 2005 STMicroelectronics Inc.

This example demo code is provided as is and has no warranty,
implied or otherwise.  You are free to use/modify any of the provided
code at your own risk in your applications with the expressed limitation
of liability (see below) so long as your product using the code contains
at least one uPSD product (device).

LIMITATION OF LIABILITY:   NEITHER STMicroelectronics NOR ITS VENDORS OR 
AGENTS SHALL BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA,
INTERRUPTION OF BUSINESS, NOR FOR INDIRECT, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER THIS AGREEMENT OR
OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
------------------------------------------------------------------------------*/


#ifndef USB3400_USB_APP_H
#define USB3400_USB_APP_H


#define PASS 0
#define FAIL 1


// define USB Bulk Only Command Bulk stages
#define BS_CBW_PHASE       0                 // waiting for Command
#define BS_DATA_PHASE      1                 // command received, data phase
#define BS_CSW_PHASE       2                 // before Command Status Wrapper
#define BS_CSW_DONE_PHASE  3                 // CSW sent


// ATAPI Commands (mandatory)
#define OP_TEST_UNIT_READY 0x00
#define OP_REQUEST_SENSE   0x03
#define OP_INQUIRY         0x12
#define OP_MODE_SELECT6    0x15
#define OP_MODE_SENSE6     0x1A
#define OP_MODE_SELECT10   0x55
#define OP_MODE_SENSE10    0x5A
#define OP_MEDIA_REMOVEAL  0x1E
#define OP_READ_CAPACITY   0x25
#define OP_READ10          0x28
#define OP_WRITE10         0x2A
#define OP_VERIFY          0x2F
#define OP_START_STOP_UNIT 0x1B

#define OP_READ_FORMAT_CAPACITIES 0x23

#endif


/* *************************************************************************
  ***                                                                      ***
  **                         *** End of File ***                            **
  ***                                                                      ***
   *************************************************************************  */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -