📄 msfunction.h
字号:
#ifndef __MSFUNCTION_H_
#define __MSFUNCTION_H_
/* MSD BOT Functional Characteristics */
#define MSDFN_BOT_RESET 0xFF
#define MSDFN_BOT_GET_MAXLUN 0xFE
/* MSD BOT Functional Characteristics */
#define CANCEL_OP_REQUEST 0x64
#define STILL_IMAGE_RESET 0x66
#define STILL_IMAGE_GET_DEVSTS 0x67
#define STILL_STSTUS_OK 0x2001
#define STILL_STSTUS_BUSY 0x2019
#define STILL_STSTUS_CANSELED 0x201F
/*
* USB Set Features
*/
#define ENDPOINT_HALT 0x00
#define DEVICE_REMOTE_WAKEUP 0x01
#define USB_TEST_MODE 0x02
#define USB_SUCCESS 0x00
#define USB_FAILURE -1
#define DEV_DESC_EP0_SIZE_OFFSET 8 /* where to find max ep0 in dscrptor*/
#define SETLSB(x,y) (x) = (((x) & 0xff00) | ((y) & 0xff))
#define SETMSB(x,y) (x) = (((x) & 0xff) | (((y) & 0xff) << 8))
#define GETLSB(x) ((x) & 0xff)
#define GETMSB(x) GETLSB((x)>>8)
#define FILL_SETUP(a,b,c,d,e,f) \
do {\
(a).bmRequestType = b; \
(a).bRequest = c; \
(a).wValue = d; \
(a).wIndex = e; \
(a).wLength = f; \
} while(0)
typedef __u8 pipe_t;
#define SETURB_BUFFER(u,b,l) \
do {\
(u)->transfer_buffer = (b);\
(u)->transfer_buffer_length = (l);\
} while (0)
void usbParse_DRC_Int_Peripheral(drcintitem_t *dP);
extern __u32 volatile usbStillImageSts;
extern __u8 volatile usbSetFaddr;
extern __u8 volatile usbClearedEP;
extern __u8 volatile usbMyDeviceHNPSupport;
void usbDesInit(void);
#if 1
void otgFIFO_Test(void);
#endif
#endif /* __MSFUNCTION_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -