discoverpixy
Classes | Macros | Typedefs | Enumerations | Functions | Variables
usbh_msc_scsi.h File Reference

Header file for usbh_msc_scsi.c. More...

#include "usbh_stdreq.h"
Include dependency graph for usbh_msc_scsi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  __MassStorageParameter
 

Macros

#define OPCODE_TEST_UNIT_READY   0X00
 
#define OPCODE_READ_CAPACITY10   0x25
 
#define OPCODE_MODE_SENSE6   0x1A
 
#define OPCODE_READ10   0x28
 
#define OPCODE_WRITE10   0x2A
 
#define OPCODE_REQUEST_SENSE   0x03
 
#define DESC_REQUEST_SENSE   0X00
 
#define ALLOCATION_LENGTH_REQUEST_SENSE   63
 
#define XFER_LEN_READ_CAPACITY10   8
 
#define XFER_LEN_MODE_SENSE6   63
 
#define MASK_MODE_SENSE_WRITE_PROTECT   0x80
 
#define MODE_SENSE_PAGE_CONTROL_FIELD   0x00
 
#define MODE_SENSE_PAGE_CODE   0x3F
 
#define DISK_WRITE_PROTECTED   0x01
 

Typedefs

typedef struct __MassStorageParameter MassStorageParameter_TypeDef
 

Enumerations

enum  USBH_MSC_Status_TypeDef { USBH_MSC_OK = 0, USBH_MSC_FAIL = 1, USBH_MSC_PHASE_ERROR = 2, USBH_MSC_BUSY = 3 }
 
enum  CMD_STATES_TypeDef { CMD_UNINITIALIZED_STATE =0, CMD_SEND_STATE, CMD_WAIT_STATUS }
 

Functions

uint8_t USBH_MSC_TestUnitReady (USB_OTG_CORE_HANDLE *pdev)
 USBH_MSC_TestUnitReady Issues 'Test unit ready' command to the device. Once the response received, it updates the status to upper layer. More...
 
uint8_t USBH_MSC_ReadCapacity10 (USB_OTG_CORE_HANDLE *pdev)
 USBH_MSC_ReadCapacity10 Issue the read capacity command to the device. Once the response received, it updates the status to upper layer. More...
 
uint8_t USBH_MSC_ModeSense6 (USB_OTG_CORE_HANDLE *pdev)
 USBH_MSC_ModeSense6 Issue the Mode Sense6 Command to the device. This function is used for reading the WriteProtect Status of the Mass-Storage device. More...
 
uint8_t USBH_MSC_RequestSense (USB_OTG_CORE_HANDLE *pdev)
 USBH_MSC_RequestSense Issues the Request Sense command to the device. Once the response received, it updates the status to upper layer. More...
 
uint8_t USBH_MSC_Write10 (USB_OTG_CORE_HANDLE *pdev, uint8_t *, uint32_t, uint32_t)
 USBH_MSC_Write10 Issue the write command to the device. Once the response received, it updates the status to upper layer. More...
 
uint8_t USBH_MSC_Read10 (USB_OTG_CORE_HANDLE *pdev, uint8_t *, uint32_t, uint32_t)
 USBH_MSC_Read10 Issue the read command to the device. Once the response received, it updates the status to upper layer. More...
 
void USBH_MSC_StateMachine (USB_OTG_CORE_HANDLE *pdev)
 

Variables

MassStorageParameter_TypeDef USBH_MSC_Param
 

Detailed Description

Header file for usbh_msc_scsi.c.

Author
MCD Application Team
Version
V2.0.0
Date
22-July-2011
Attention

THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

© COPYRIGHT 2011 STMicroelectronics