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

📄 msmsd.h

📁 MSTAR03的数码相框的代码
💻 H
字号:
#ifndef _ms_MSD_H_
#define _ms_MSD_H_

#define MSD_DRIVE_SECTOR_SIZE    0x0200

#define  MSD_BOT_CBW_DATA_DIR_IN   0x80
#define  MSD_BOT_CBW_DATA_DIR_OUT  0x00
#define  MSD_BOT_CBW_SIGNATURE     0x43425355L /* CBW signature little enian */
#define  MSD_BOT_CBW_TAG           0xAABBCCDDL  /* little enian */

#define  MSD_BOT_CSW_SIGNATURE     0x53425355L/* CSW signature little enian */
#define  MSD_BOT_CSW_LENGTH        0x0D       /* CSW length*/

#define  MSD_BOT_CSW_CMD_PASSED    0x00 /* Command has executed successfully */
#define  MSD_BOT_CSW_CMD_FAILED    0x01 /* Command failed */  
#define  MSD_BOT_CSW_PHASE_ERROR   0x02 /* Phase Error    */

#define  MSD_BOT_CSW_OK            0x00 /* CSW valid and meaning full*/
#define  MSD_BOT_CSW_BAD           0x01 /* CSW is not valid or not meaning full */

#define  MSD_BOT_RESET_REQUEST        0xff /* Bulk Only Transport Reset */

#define  MSD_BOT_GET_MAX_LUN_REQUEST  0xfe /* Get maximum Logical units in */
typedef struct 
{
    //void   *cmd_P;         /* The subClass specific command      */
    void   *data_buf_P;      /* Data in/out buffer                 */
    __u32  buf_length;     /* data buffer length                 */
    __u8   direction;      /* data transfer direction IN/OUT:1/0 */
    __u8   cmd_length;     /* command length                     */
    __u8   lun;
    __u32 signature;    /* Helps in identifying CBW value is 
                           43425355(little enian)   */ 
    __u32 tag; 	
}MSD_CB;

__s8 usbMSD_BOT_Get_Max_LUN(void);
__s8 usbMSD_BOT_Transport(MSD_CB cmd_blk);

#endif  /* _ms_MSD_H_ */

⌨️ 快捷键说明

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