📄 bot.h
字号:
/*************************************************************************
*
* Used with ICCARM and AARM.
*
* (c) Copyright IAR Systems 2005
*
* File name : bot.h
* Description : Define USB Mass storage device bulk-only transport module
*
* History :
* 1. Date : September 8, 2005
* Author : Stanimir Bonev
* Description : Create
*
* $Revision: 14946 $
**************************************************************************/
#include "includes.h"
#ifndef __BOT_H
#define __BOT_H
#define CbwSignature 0x43425355
#define CswSignature 0x53425355
typedef enum
{
BotWaitCbw = 0, BotEpDataOut, BotEpDataIn, BotSendCsw, BotFatalError,
} BotState_t;
typedef enum
{
UsbBotInterfaceGetMaxLun = 0xFE,
MassStorageClassReqReset ,
} MassStorageClassRequest_t;
typedef enum
{
BotPass = 0, BotError, BotNotReady, BotNotAlignment
} BotToUserStatus_t;
typedef enum
{
CswPassed = 0, CswFailed, CswPhaseError
} CSWStatus_t;
typedef enum
{
BotDataFormHostToDev = 0,BotDataFormDevToHost,
} BotDataDir_t;
typedef union
{
Int8U Data;
struct
{
Int8U : 7;
Int8U Dir : 1;
};
} CbwFlags_t;
#pragma pack(1)
typedef union
{
Int8U Data[31];
struct
{
Int32U dCBWSignature;
Int32U dCBWTag;
Int32U dCBWDataTransferLength;
CbwFlags_t bmCBWFlags;
Int8U bCBWLUN;
Int8U bCBWCBLength;
Int8U CBWCB[16];
};
} Cbw_t, * pCbw_t;
typedef union
{
Int8U Data[13];
struct
{
Int32U dCSWSignature;
Int32U dCSWTag;
Int32U dCSWDataResidue;
Int8U bCSWStatus;
};
} Csw_t, * pCsw_t;
typedef union
{
Int8U Flags;
struct
{
Int8U PhaseError : 1;
Int8U CmdFault : 1;
Int8U BotStatus : 1;
Int8U DataComplete: 1;
Int8U ShortPacket : 1;
};
} BotStatus_t;
#define bPhaseErrorMask_t 0x01
#define bCmdFaultMask_t 0x02
#define bBotStatusMask_t 0x04
#define bBotDataCompleteMask_t 0x10
#pragma pack()
#endif //__BOT_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -