mshost.h

来自「MSTAR03的数码相框的代码」· C头文件 代码 · 共 32 行

H
32
字号
#ifndef _MS_HOST_H_
#define _MS_HOST_H_

#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)

void USB_EP0_Manager(void);
void usbParse_DRC_Int_Host(drcintitem_t *dP);
void usbEP0_Clear_Feature(__u16   feature);
void USB_Hub_Handle(void);
void HostUSBInitial(__u32 xdataaddr,__u8 Device_Mode_Type);

extern void Delay1msOtg(__u16 msec);//artemis for test use

#endif  /* _MS_HOST_H_ */

⌨️ 快捷键说明

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