Go to the documentation of this file. 17 #if !defined(_usb_h_) || defined(_max3421e_h_) 18 #error "Never include max3421e.h directly; include Usb.h instead" 37 #define rRCVFIFO 0x08 //1<<3 38 #define rSNDFIFO 0x10 //2<<3 39 #define rSUDFIFO 0x20 //4<<3 40 #define rRCVBC 0x30 //6<<3 41 #define rSNDBC 0x38 //7<<3 43 #define rUSBIRQ 0x68 //13<<3 45 #define bmVBUSIRQ 0x40 //b6 46 #define bmNOVBUSIRQ 0x20 //b5 47 #define bmOSCOKIRQ 0x01 //b0 49 #define rUSBIEN 0x70 //14<<3 51 #define bmVBUSIE 0x40 //b6 52 #define bmNOVBUSIE 0x20 //b5 53 #define bmOSCOKIE 0x01 //b0 55 #define rUSBCTL 0x78 //15<<3 57 #define bmCHIPRES 0x20 //b5 58 #define bmPWRDOWN 0x10 //b4 60 #define rCPUCTL 0x80 //16<<3 62 #define bmPUSLEWID1 0x80 //b7 63 #define bmPULSEWID0 0x40 //b6 64 #define bmIE 0x01 //b0 66 #define rPINCTL 0x88 //17<<3 68 #define bmFDUPSPI 0x10 //b4 69 #define bmINTLEVEL 0x08 //b3 70 #define bmPOSINT 0x04 //b2 71 #define bmGPXB 0x02 //b1 72 #define bmGPXA 0x01 //b0 74 #define GPX_OPERATE 0x00 75 #define GPX_VBDET 0x01 76 #define GPX_BUSACT 0x02 79 #define rREVISION 0x90 //18<<3 81 #define rIOPINS1 0xa0 //20<<3 93 #define rIOPINS2 0xa8 //21<<3 104 #define rGPINIRQ 0xb0 //22<<3 106 #define bmGPINIRQ0 0x01 107 #define bmGPINIRQ1 0x02 108 #define bmGPINIRQ2 0x04 109 #define bmGPINIRQ3 0x08 110 #define bmGPINIRQ4 0x10 111 #define bmGPINIRQ5 0x20 112 #define bmGPINIRQ6 0x40 113 #define bmGPINIRQ7 0x80 115 #define rGPINIEN 0xb8 //23<<3 117 #define bmGPINIEN0 0x01 118 #define bmGPINIEN1 0x02 119 #define bmGPINIEN2 0x04 120 #define bmGPINIEN3 0x08 121 #define bmGPINIEN4 0x10 122 #define bmGPINIEN5 0x20 123 #define bmGPINIEN6 0x40 124 #define bmGPINIEN7 0x80 126 #define rGPINPOL 0xc0 //24<<3 128 #define bmGPINPOL0 0x01 129 #define bmGPINPOL1 0x02 130 #define bmGPINPOL2 0x04 131 #define bmGPINPOL3 0x08 132 #define bmGPINPOL4 0x10 133 #define bmGPINPOL5 0x20 134 #define bmGPINPOL6 0x40 135 #define bmGPINPOL7 0x80 137 #define rHIRQ 0xc8 //25<<3 139 #define bmBUSEVENTIRQ 0x01 // indicates BUS Reset Done or BUS Resume 140 #define bmRWUIRQ 0x02 141 #define bmRCVDAVIRQ 0x04 142 #define bmSNDBAVIRQ 0x08 143 #define bmSUSDNIRQ 0x10 144 #define bmCONDETIRQ 0x20 145 #define bmFRAMEIRQ 0x40 146 #define bmHXFRDNIRQ 0x80 148 #define rHIEN 0xd0 //26<<3 151 #define bmBUSEVENTIE 0x01 153 #define bmRCVDAVIE 0x04 154 #define bmSNDBAVIE 0x08 155 #define bmSUSDNIE 0x10 156 #define bmCONDETIE 0x20 157 #define bmFRAMEIE 0x40 158 #define bmHXFRDNIE 0x80 160 #define rMODE 0xd8 //27<<3 164 #define bmLOWSPEED 0x02 165 #define bmHUBPRE 0x04 166 #define bmSOFKAENAB 0x08 167 #define bmSEPIRQ 0x10 168 #define bmDELAYISO 0x20 169 #define bmDMPULLDN 0x40 170 #define bmDPPULLDN 0x80 172 #define rPERADDR 0xe0 //28<<3 174 #define rHCTL 0xe8 //29<<3 176 #define bmBUSRST 0x01 177 #define bmFRMRST 0x02 178 #define bmSAMPLEBUS 0x04 179 #define bmSIGRSM 0x08 180 #define bmRCVTOG0 0x10 181 #define bmRCVTOG1 0x20 182 #define bmSNDTOG0 0x40 183 #define bmSNDTOG1 0x80 185 #define rHXFR 0xf0 //30<<3 188 #define tokSETUP 0x10 // HS=0, ISO=0, OUTNIN=0, SETUP=1 189 #define tokIN 0x00 // HS=0, ISO=0, OUTNIN=0, SETUP=0 190 #define tokOUT 0x20 // HS=0, ISO=0, OUTNIN=1, SETUP=0 191 #define tokINHS 0x80 // HS=1, ISO=0, OUTNIN=0, SETUP=0 192 #define tokOUTHS 0xA0 // HS=1, ISO=0, OUTNIN=1, SETUP=0 193 #define tokISOIN 0x40 // HS=0, ISO=1, OUTNIN=0, SETUP=0 194 #define tokISOOUT 0x60 // HS=0, ISO=1, OUTNIN=1, SETUP=0 196 #define rHRSL 0xf8 //31<<3 199 #define bmRCVTOGRD 0x10 200 #define bmSNDTOGRD 0x20 201 #define bmKSTATUS 0x40 202 #define bmJSTATUS 0x80 203 #define bmSE0 0x00 //SE0 - disconnect state 204 #define bmSE1 0xc0 //SE1 - illegal state 207 #define hrSUCCESS 0x00 209 #define hrBADREQ 0x02 213 #define hrTOGERR 0x06 214 #define hrWRONGPID 0x07 216 #define hrPIDERR 0x09 217 #define hrPKTERR 0x0A 218 #define hrCRCERR 0x0B 221 #define hrTIMEOUT 0x0E 222 #define hrBABBLE 0x0F 224 #define MODE_FS_HOST (bmDPPULLDN|bmDMPULLDN|bmHOST|bmSOFKAENAB) 225 #define MODE_LS_HOST (bmDPPULLDN|bmDMPULLDN|bmHOST|bmLOWSPEED|bmSOFKAENAB) 228 #endif //_max3421e_h_