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

📄 usb9.i

📁 使用PIC芯片通过SPI-MODE读写SD存储卡,通过测试.
💻 I
📖 第 1 页 / 共 4 页
字号:
#line 1204 "C:/mcc18/h/p18f4550.h"
 
#line 1206 "C:/mcc18/h/p18f4550.h"
#line 1207 "C:/mcc18/h/p18f4550.h"
#line 1208 "C:/mcc18/h/p18f4550.h"
#line 1209 "C:/mcc18/h/p18f4550.h"

#line 1211 "C:/mcc18/h/p18f4550.h"
#line 1212 "C:/mcc18/h/p18f4550.h"
#line 1213 "C:/mcc18/h/p18f4550.h"
#line 1214 "C:/mcc18/h/p18f4550.h"
#line 1215 "C:/mcc18/h/p18f4550.h"


#line 1219 "C:/mcc18/h/p18f4550.h"
 
#line 1221 "C:/mcc18/h/p18f4550.h"


#line 1224 "C:/mcc18/h/p18f4550.h"
#line 139 "C:/mcc18/h/p18cxxx.h"

#line 141 "C:/mcc18/h/p18cxxx.h"
#line 143 "C:/mcc18/h/p18cxxx.h"
#line 145 "C:/mcc18/h/p18cxxx.h"
#line 147 "C:/mcc18/h/p18cxxx.h"
#line 149 "C:/mcc18/h/p18cxxx.h"
#line 151 "C:/mcc18/h/p18cxxx.h"
#line 153 "C:/mcc18/h/p18cxxx.h"
#line 155 "C:/mcc18/h/p18cxxx.h"
#line 157 "C:/mcc18/h/p18cxxx.h"
#line 159 "C:/mcc18/h/p18cxxx.h"
#line 161 "C:/mcc18/h/p18cxxx.h"
#line 163 "C:/mcc18/h/p18cxxx.h"
#line 165 "C:/mcc18/h/p18cxxx.h"
#line 167 "C:/mcc18/h/p18cxxx.h"
#line 169 "C:/mcc18/h/p18cxxx.h"
#line 171 "C:/mcc18/h/p18cxxx.h"
#line 173 "C:/mcc18/h/p18cxxx.h"
#line 175 "C:/mcc18/h/p18cxxx.h"
#line 177 "C:/mcc18/h/p18cxxx.h"
#line 179 "C:/mcc18/h/p18cxxx.h"
#line 181 "C:/mcc18/h/p18cxxx.h"
#line 183 "C:/mcc18/h/p18cxxx.h"
#line 185 "C:/mcc18/h/p18cxxx.h"
#line 187 "C:/mcc18/h/p18cxxx.h"
#line 189 "C:/mcc18/h/p18cxxx.h"
#line 191 "C:/mcc18/h/p18cxxx.h"
#line 193 "C:/mcc18/h/p18cxxx.h"
#line 195 "C:/mcc18/h/p18cxxx.h"
#line 197 "C:/mcc18/h/p18cxxx.h"
#line 199 "C:/mcc18/h/p18cxxx.h"

#line 201 "C:/mcc18/h/p18cxxx.h"
#line 38 "usb9.c"

#line 1 "./system\typedefs.h"

#line 35 "./system\typedefs.h"
 


#line 39 "./system\typedefs.h"

typedef unsigned char   byte;           
typedef unsigned int    word;           
typedef unsigned long   dword;          

typedef union _BYTE
{
    byte _byte;
    struct
    {
        unsigned b0:1;
        unsigned b1:1;
        unsigned b2:1;
        unsigned b3:1;
        unsigned b4:1;
        unsigned b5:1;
        unsigned b6:1;
        unsigned b7:1;
    };
} BYTE;

typedef union _WORD
{
    word _word;
    struct
    {
        byte byte0;
        byte byte1;
    };
    struct
    {
        BYTE Byte0;
        BYTE Byte1;
    };
    struct
    {
        BYTE LowB;
        BYTE HighB;
    };
    struct
    {
        byte v[2];
    };
} WORD;
#line 84 "./system\typedefs.h"
#line 85 "./system\typedefs.h"

typedef union _DWORD
{
    dword _dword;
    struct
    {
        byte byte0;
        byte byte1;
        byte byte2;
        byte byte3;
    };
    struct
    {
        word word0;
        word word1;
    };
    struct
    {
        BYTE Byte0;
        BYTE Byte1;
        BYTE Byte2;
        BYTE Byte3;
    };
    struct
    {
        WORD Word0;
        WORD Word1;
    };
    struct
    {
        byte v[4];
    };
} DWORD;
#line 119 "./system\typedefs.h"
#line 120 "./system\typedefs.h"
#line 121 "./system\typedefs.h"
#line 122 "./system\typedefs.h"

typedef void(*pFunc)(void);

typedef union _POINTER
{
    struct
    {
        byte bLow;
        byte bHigh;
        
    };
    word _word;                         
    
    

    byte* bRam;                         
                                        
    word* wRam;                         
                                        

    rom byte* bRom;                     
    rom word* wRom;
    
    
    
    
} POINTER;

typedef enum _BOOL { FALSE = 0, TRUE } BOOL;

#line 153 "./system\typedefs.h"
#line 154 "./system\typedefs.h"

#line 156 "./system\typedefs.h"
#line 39 "usb9.c"

#line 1 "./system\usb\usb.h"

#line 35 "./system\usb\usb.h"
 

#line 38 "./system\usb\usb.h"


#line 45 "./system\usb\usb.h"
 

#line 1 "./autofiles\usbcfg.h"

#line 32 "./autofiles\usbcfg.h"
 


#line 36 "./autofiles\usbcfg.h"

 
#line 39 "./autofiles\usbcfg.h"
#line 40 "./autofiles\usbcfg.h"

 
#line 43 "./autofiles\usbcfg.h"
#line 44 "./autofiles\usbcfg.h"

#line 46 "./autofiles\usbcfg.h"
#line 47 "./autofiles\usbcfg.h"

 
#line 50 "./autofiles\usbcfg.h"


#line 55 "./autofiles\usbcfg.h"
 
#line 57 "./autofiles\usbcfg.h"
#line 58 "./autofiles\usbcfg.h"
#line 59 "./autofiles\usbcfg.h"
#line 60 "./autofiles\usbcfg.h"
#line 61 "./autofiles\usbcfg.h"

 

#line 65 "./autofiles\usbcfg.h"
 
 
 
#line 69 "./autofiles\usbcfg.h"
#line 70 "./autofiles\usbcfg.h"
#line 71 "./autofiles\usbcfg.h"
#line 72 "./autofiles\usbcfg.h"
#line 73 "./autofiles\usbcfg.h"
#line 74 "./autofiles\usbcfg.h"
#line 75 "./autofiles\usbcfg.h"


 

#line 87 "./autofiles\usbcfg.h"
 
 


#line 94 "./autofiles\usbcfg.h"
#line 95 "./autofiles\usbcfg.h"


#line 101 "./autofiles\usbcfg.h"

#line 107 "./autofiles\usbcfg.h"

#line 108 "./autofiles\usbcfg.h"
 

#line 111 "./autofiles\usbcfg.h"

#line 113 "./autofiles\usbcfg.h"
#line 47 "./system\usb\usb.h"

#line 1 "./system\usb\usbdefs\usbdefs_std_dsc.h"

#line 35 "./system\usb\usbdefs\usbdefs_std_dsc.h"
 


#line 39 "./system\usb\usbdefs\usbdefs_std_dsc.h"
 

#line 42 "./system\usb\usbdefs\usbdefs_std_dsc.h"

 
#line 1 "./system\typedefs.h"

#line 35 "./system\typedefs.h"
 

#line 156 "./system\typedefs.h"
#line 44 "./system\usb\usbdefs\usbdefs_std_dsc.h"


 

 
#line 50 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 51 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 52 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 53 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 54 "./system\usb\usbdefs\usbdefs_std_dsc.h"


#line 62 "./system\usb\usbdefs\usbdefs_std_dsc.h"
 
#line 64 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 65 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 66 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 67 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 68 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 69 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 70 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 71 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 72 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 73 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 74 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 75 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 76 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 77 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 78 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 79 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 80 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 81 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 82 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 83 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 84 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 85 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 86 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 87 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 88 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 89 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 90 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 91 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 92 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 93 "./system\usb\usbdefs\usbdefs_std_dsc.h"

 
#line 96 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 97 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 98 "./system\usb\usbdefs\usbdefs_std_dsc.h"

 
#line 101 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 102 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 103 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 104 "./system\usb\usbdefs\usbdefs_std_dsc.h"

 
#line 107 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 108 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 109 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 110 "./system\usb\usbdefs\usbdefs_std_dsc.h"

 
#line 113 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 114 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 115 "./system\usb\usbdefs\usbdefs_std_dsc.h"


 


#line 121 "./system\usb\usbdefs\usbdefs_std_dsc.h"
 
typedef struct _USB_DEV_DSC
{
    byte bLength;       byte bDscType;      word bcdUSB;
    byte bDevCls;       byte bDevSubCls;    byte bDevProtocol;
    byte bMaxPktSize0;  word idVendor;      word idProduct;
    word bcdDevice;     byte iMFR;          byte iProduct;
    byte iSerialNum;    byte bNumCfg;
} USB_DEV_DSC;


#line 133 "./system\usb\usbdefs\usbdefs_std_dsc.h"
 
typedef struct _USB_CFG_DSC
{
    byte bLength;       byte bDscType;      word wTotalLength;
    byte bNumIntf;      byte bCfgValue;     byte iCfg;
    byte bmAttributes;  byte bMaxPower;
} USB_CFG_DSC;


#line 143 "./system\usb\usbdefs\usbdefs_std_dsc.h"
 
typedef struct _USB_INTF_DSC
{
    byte bLength;       byte bDscType;      byte bIntfNum;
    byte bAltSetting;   byte bNumEPs;       byte bIntfCls;
    byte bIntfSubCls;   byte bIntfProtocol; byte iIntf;
} USB_INTF_DSC;


#line 153 "./system\usb\usbdefs\usbdefs_std_dsc.h"
 
typedef struct _USB_EP_DSC
{
    byte bLength;       byte bDscType;      byte bEPAdr;
    byte bmAttributes;  word wMaxPktSize;   byte bInterval;
} USB_EP_DSC;

#line 161 "./system\usb\usbdefs\usbdefs_std_dsc.h"
#line 48 "./system\usb\usb.h"

#line 1 "./autofiles\usbdsc.h"

#line 32 "./autofiles\usbdsc.h"
 


#line 37 "./autofiles\usbdsc.h"
 


#line 41 "./autofiles\usbdsc.h"

 
#line 1 "./system\typedefs.h"

#line 35 "./system\typedefs.h"
 

#line 156 "./system\typedefs.h"
#line 43 "./autofiles\usbdsc.h"

#line 1 "./autofiles\usbcfg.h"

#line 32 "./autofiles\usbcfg.h"
 


#line 55 "./autofiles\usbcfg.h"

#line 65 "./autofiles\usbcfg.h"

#line 87 "./autofiles\usbcfg.h"

#line 94 "./autofiles\usbcfg.h"

#line 101 "./autofiles\usbcfg.h"

#line 107 "./autofiles\usbcfg.h"

#line 108 "./autofiles\usbcfg.h"
#line 113 "./autofiles\usbcfg.h"
#line 44 "./autofiles\usbdsc.h"


#line 47 "./autofiles\usbdsc.h"
#line 49 "./autofiles\usbdsc.h"

#line 51 "./autofiles\usbdsc.h"

#line 53 "./autofiles\usbdsc.h"

#line 1 "./system\usb\usb.h"

#line 35 "./system\usb\usb.h"
 

#line 45 "./system\usb\usb.h"
#line 59 "./system\usb\usb.h"
#line 61 "./system\usb\usb.h"
#line 62 "./system\usb\usb.h"
#line 64 "./system\usb\usb.h"
#line 65 "./system\usb\usb.h"
#line 54 "./autofiles\usbdsc.h"


 

#line 62 "./autofiles\usbdsc.h"
#line 63 "./autofiles\usbdsc.h"

 
extern rom USB_DEV_DSC device_dsc;
extern rom struct { USB_CFG_DSC cd01; USB_INTF_DSC i00a00; USB_MSD_DSC msd_i00a00; USB_EP_DSC ep01i_i00a00; } cfg01 ;
extern rom const unsigned char *rom USB_CD_Ptr[];
extern rom const unsigned char *rom USB_SD_Ptr[];


extern rom pFunc ClassReqHandler[1];

#line 74 "./autofiles\usbdsc.h"
#line 49 "./system\usb\usb.h"


#line 1 "./system\usb\usbdefs\usbdefs_ep0_buff.h"

#line 35 "./system\usb\usbdefs\usbdefs_ep0_buff.h"
 


#line 39 "./system\usb\usbdefs\usbdefs_ep0_buff.h"
 

#line 42 "./system\usb\usbdefs\usbdefs_ep0_buff.h"

 
#line 1 "./system\typedefs.h"

#line 35 "./system\typedefs.h"
 

#line 156 "./system\typedefs.h"
#line 44 "./system\usb\usbdefs\usbdefs_ep0_buff.h"

#line 1 "./autofiles\usbcfg.h"

#line 32 "./autofiles\usbcfg.h"
 


#line 55 "./autofiles\usbcfg.h"

#line 65 "./autofiles\usbcfg.h"

#line 87 "./autofiles\usbcfg.h"

#line 94 "./autofiles\usbcfg.h"

#line 101 "./autofiles\usbcfg.h"

#line 107 "./autofiles\usbcfg.h"

#line 108 "./autofiles\usbcfg.h"
#line 113 "./autofiles\usbcfg.h"
#line 45 "./system\usb\usbdefs\usbdefs_ep0_buff.h"
       


#line 58 "./system\usb\usbdefs\usbdefs_ep0_buff.h"
 
typedef union _CTRL_TRF_SETUP
{
     
    struct
    {
        byte _byte[8 ];
    };
    
     
    struct
    {
        byte bmRequestType;
        byte bRequest;    
        word wValue;
        word wIndex;
        word wLength;
    };
    struct
    {
        unsigned :8;
        unsigned :8;
        WORD W_Value;
        WORD W_Index;
        WORD W_Length;
    };
    struct
    {
        unsigned Recipient:5;           
        unsigned RequestType:2;         
        unsigned DataDir:1;             
        unsigned :8;
        byte bFeature;                  
        unsigned :8;
        unsigned :8;
        unsigned :8;
        unsigned :8;
        unsigned :8;
    };
    struct
    {
        unsigned :8;
        unsigned :8;
        byte bDscIndex;                 
        byte bDscType;                  
        word wLangID;                   
        unsigned :8;
        unsigned :8;
    };
    struct
    {
        unsigned :8;
        unsigned :8;
        BYTE bDevADR;                   
        byte bDevADRH;                  
        unsigned :8;
        unsigned :8;
        unsigned :8;
        unsigned :8;
    };
    struct
    {
        unsigned :8;
        unsigned :8;
        byte bCfgValue;                 
        byte bCfgRSD;                   
        unsigned :8;
        unsigned :8;
        unsigned :8;
        unsigned :8;
    };
    struct
    {
        unsigned :8;
        unsigned :8;
        byte bAltID;                    
        byte bAltID_H;                  
        byte bIntfID;                   
        byte bIntfID_H;                 
        unsigned :8;
        unsigned :8;
    };
    struct
    {
        unsigned :8;
        unsigned :8;
        unsigned :8;
        unsigned :8;
        byte bEPID;                     
        byte bEPID_H;                   
        unsigned :8;
        unsigned :8;
    };
    struct
    {
        unsigned :8;
        unsigned :8;
        unsigned :8;
        unsigned :8;
        unsigned EPNum:4;               
        unsigned :3;
        unsigned EPDir:1;               
        unsigned :8;
        unsigned :8;
        unsigned :8;
    };
     
    
} CTRL_TRF_SETUP;


#line 178 "./system\usb\usbdefs\usbdefs_ep0_buff.h"
 
typedef union _CTRL_TRF_DATA
{
     

⌨️ 快捷键说明

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