📄 fx2regs1.h
字号:
sbit at 0xD0+0 P; sbit at 0xD0+1 FL; sbit at 0xD0+2 OV; sbit at 0xD0+3 RS0; sbit at 0xD0+4 RS1; sbit at 0xD0+5 F0; sbit at 0xD0+6 AC; sbit at 0xD0+7 CY;sfr at 0xD8 EICON; // Was WDCON in DS80C320 EICON; Bit Values differ from Reg320 /* EICON */ sbit at 0xD8+3 INT6; sbit at 0xD8+4 RESI; sbit at 0xD8+5 ERESI; sbit at 0xD8+7 SMOD1;sfr at 0xE0 ACC;sfr at 0xE8 EIE; // EIE Bit Values differ from Reg320 /* EIE */ sbit at 0xE8+0 EIUSB; sbit at 0xE8+1 EI2C; sbit at 0xE8+2 EIEX4; sbit at 0xE8+3 EIEX5; sbit at 0xE8+4 EIEX6;sfr at 0xF0 B;sfr at 0xF8 EIP; // EIP Bit Values differ from Reg320 /* EIP */ sbit at 0xF8+0 PUSB; sbit at 0xF8+1 PI2C; sbit at 0xF8+2 EIPX4; sbit at 0xF8+3 EIPX5; sbit at 0xF8+4 EIPX6;/*----------------------------------------------------------------------------- Bit Masks-----------------------------------------------------------------------------*/#define bmBIT0 1#define bmBIT1 2#define bmBIT2 4#define bmBIT3 8#define bmBIT4 16#define bmBIT5 32#define bmBIT6 64#define bmBIT7 128/* CPU Control & Status Register (CPUCS) */#define bmPRTCSTB bmBIT5#define bmCLKSPD (bmBIT4 | bmBIT3)#define bmCLKSPD1 bmBIT4#define bmCLKSPD0 bmBIT3#define bmCLKINV bmBIT2#define bmCLKOE bmBIT1#define bm8051RES bmBIT0/* Port Alternate Configuration Registers *//* Port A (PORTACFG) */#define bmFLAGD bmBIT7#define bmINT1 bmBIT1#define bmINT0 bmBIT0/* Port C (PORTCCFG) */#define bmGPIFA7 bmBIT7#define bmGPIFA6 bmBIT6#define bmGPIFA5 bmBIT5#define bmGPIFA4 bmBIT4#define bmGPIFA3 bmBIT3#define bmGPIFA2 bmBIT2#define bmGPIFA1 bmBIT1#define bmGPIFA0 bmBIT0/* Port E (PORTECFG) */#define bmGPIFA8 bmBIT7#define bmT2EX bmBIT6#define bmINT6 bmBIT5#define bmRXD1OUT bmBIT4#define bmRXD0OUT bmBIT3#define bmT2OUT bmBIT2#define bmT1OUT bmBIT1#define bmT0OUT bmBIT0/* I2C Control & Status Register (I2CS) */#define bmSTART bmBIT7#define bmSTOP bmBIT6#define bmLASTRD bmBIT5#define bmID (bmBIT4 | bmBIT3)#define bmBERR bmBIT2#define bmACK bmBIT1#define bmDONE bmBIT0/* I2C Control Register (I2CTL) */#define bmSTOPIE bmBIT1#define bm400KHZ bmBIT0/* Interrupt 2 (USB) Autovector Register (INT2IVEC) */#define bmIV4 bmBIT6#define bmIV3 bmBIT5#define bmIV2 bmBIT4#define bmIV1 bmBIT3#define bmIV0 bmBIT2/* USB Interrupt Request & Enable Registers (USBIE/USBIRQ) */#define bmEP0ACK bmBIT6#define bmHSGRANT bmBIT5#define bmURES bmBIT4#define bmSUSP bmBIT3#define bmSUTOK bmBIT2#define bmSOF bmBIT1#define bmSUDAV bmBIT0/* Breakpoint register (BREAKPT) */#define bmBREAK bmBIT3#define bmBPPULSE bmBIT2#define bmBPEN bmBIT1/* Interrupt 2 & 4 Setup (INTSETUP) */#define bmAV2EN bmBIT3#define bmINT4IN bmBIT1#define bmAV4EN bmBIT0/* USB Control & Status Register (USBCS) */#define bmHSM bmBIT7#define bmDISCON bmBIT3#define bmNOSYNSOF bmBIT2#define bmRENUM bmBIT1#define bmSIGRESUME bmBIT0/* Wakeup Control and Status Register (WAKEUPCS) */#define bmWU2 bmBIT7#define bmWU bmBIT6#define bmWU2POL bmBIT5#define bmWUPOL bmBIT4#define bmDPEN bmBIT2#define bmWU2EN bmBIT1#define bmWUEN bmBIT0/* End Point 0 Control & Status Register (EP0CS) */#define bmHSNAK bmBIT7/* End Point 0-1 Control & Status Registers (EP0CS/EP1OUTCS/EP1INCS) */#define bmEPBUSY bmBIT1#define bmEPSTALL bmBIT0/* End Point 2-8 Control & Status Registers (EP2CS/EP4CS/EP6CS/EP8CS) */#define bmNPAK (bmBIT6 | bmBIT5 | bmBIT4)#define bmEPFULL bmBIT3#define bmEPEMPTY bmBIT2/* Endpoint Status (EP2468STAT) SFR bits */#define bmEP8FULL bmBIT7#define bmEP8EMPTY bmBIT6#define bmEP6FULL bmBIT5#define bmEP6EMPTY bmBIT4#define bmEP4FULL bmBIT3#define bmEP4EMPTY bmBIT2#define bmEP2FULL bmBIT1#define bmEP2EMPTY bmBIT0/* SETUP Data Pointer Auto Mode (SUDPTRCTL) */#define bmSDPAUTO bmBIT0/* Endpoint Data Toggle Control (TOGCTL) */#define bmQUERYTOGGLE bmBIT7#define bmSETTOGGLE bmBIT6#define bmRESETTOGGLE bmBIT5#define bmTOGCTLEPMASK bmBIT3 | bmBIT2 | bmBIT1 | bmBIT0/* IBN (In Bulk Nak) enable and request bits (IBNIE/IBNIRQ) */#define bmEP8IBN bmBIT5#define bmEP6IBN bmBIT4#define bmEP4IBN bmBIT3#define bmEP2IBN bmBIT2#define bmEP1IBN bmBIT1#define bmEP0IBN bmBIT0/* PING-NAK enable and request bits (NAKIE/NAKIRQ) */#define bmEP8PING bmBIT7#define bmEP6PING bmBIT6#define bmEP4PING bmBIT5#define bmEP2PING bmBIT4#define bmEP1PING bmBIT3#define bmEP0PING bmBIT2#define bmIBN bmBIT0/* Interface Configuration bits (IFCONFIG) */#define bmIFCLKSRC bmBIT7 // set == INTERNAL#define bm3048MHZ bmBIT6 // set == 48 MHz#define bmIFCLKOE bmBIT5#define bmIFCLKPOL bmBIT4#define bmASYNC bmBIT3#define bmGSTATE bmBIT2#define bmIFCFG1 bmBIT1#define bmIFCFG0 bmBIT0#define bmIFCFGMASK (bmIFCFG0 | bmIFCFG1)#define bmIFGPIF bmIFCFG1/* EP 2468 FIFO Configuration bits (EP2FIFOCFG,EP4FIFOCFG,EP6FIFOCFG,EP8FIFOCFG) */#define bmINFM bmBIT6#define bmOEP bmBIT5#define bmAUTOOUT bmBIT4#define bmAUTOIN bmBIT3#define bmZEROLENIN bmBIT2// must be zero bmBIT1#define bmWORDWIDE bmBIT0/* * Chip Revision Control Bits (REVCTL) - used to ebable/disable revision specific features */ #define bmNOAUTOARM bmBIT1 // these don't match the docs#define bmSKIPCOMMIT bmBIT0 // these don't match the docs#define bmDYN_OUT bmBIT1 // these do...#define bmENH_PKT bmBIT0/* Fifo Reset bits (FIFORESET) */#define bmNAKALL bmBIT7/* Endpoint Configuration (EPxCFG) */#define bmVALID bmBIT7#define bmIN bmBIT6#define bmTYPE1 bmBIT5#define bmTYPE0 bmBIT4#define bmISOCHRONOUS bmTYPE0#define bmBULK bmTYPE1#define bmINTERRUPT (bmTYPE1 | bmTYPE0)#define bm1KBUF bmBIT3#define bmBUF1 bmBIT1#define bmBUF0 bmBIT0#define bmQUADBUF 0#define bmINVALIDBUF bmBUF0#define bmDOUBLEBUF bmBUF1#define bmTRIPLEBUF (bmBUF1 | bmBUF0)/* OUTPKTEND */#define bmSKIP bmBIT7 // low 4 bits specify which end point/* GPIFTRIG defs */#define bmGPIF_IDLE bmBIT7 // status bit#define bmGPIF_EP2_START 0#define bmGPIF_EP4_START 1#define bmGPIF_EP6_START 2#define bmGPIF_EP8_START 3#define bmGPIF_READ bmBIT2#define bmGPIF_WRITE 0/* EXIF bits */#define bmEXIF_USBINT bmBIT4#define bmEXIF_I2CINT bmBIT5#define bmEXIF_IE4 bmBIT6#define bmEXIF_IE5 bmBIT7#endif /* FX2REGS_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -