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

📄 f2812reg.h

📁 自己编写的几个小程序,大家看看,希望能对大家有帮助.
💻 H
📖 第 1 页 / 共 2 页
字号:
#define GPGSET      *((volatile int *)0x70f9)
#define GPGCLEAR    *((volatile int *)0x70fa)
#define GPGTOGGLE   *((volatile int *)0x70fb)
/*--------------ADC REGUSTER---------------------*/
#define ADCTRL1     *((volatile int *)0x7100)
#define ADCTRL2     *((volatile int *)0x7101)
#define ADCMAXCONV  *((volatile int *)0x7102)
#define ADCCHSELSEQ1  *((volatile int *)0x7103)
#define ADCCHSELSEQ2  *((volatile int *)0x7104)
#define ADCCHSELSEQ3  *((volatile int *)0x7105)
#define ADCCHSELSEQ4  *((volatile int *)0x7106)
#define ADCASEQSR   *((volatile int *)0x7107)
#define ADCRESULT0  *((volatile int *)0x7108)
#define ADCRESULT1  *((volatile int *)0x7109)
#define ADCRESULT2  *((volatile int *)0x710a)
#define ADCRESULT3  *((volatile int *)0x710b)
#define ADCRESULT4  *((volatile int *)0x710c)
#define ADCRESULT5  *((volatile int *)0x710d)
#define ADCRESULT6  *((volatile int *)0x710e)
#define ADCRESULT7  *((volatile int *)0x710f)
#define ADCRESULT8  *((volatile int *)0x7110)
#define ADCRESULT9  *((volatile int *)0x7111)
#define ADCRESULT10 *((volatile int *)0x7112)
#define ADCRESULT11 *((volatile int *)0x7113)
#define ADCRESULT12 *((volatile int *)0x7114)
#define ADCRESULT13 *((volatile int *)0x7115)
#define ADCRESULT14 *((volatile int *)0x7116)
#define ADCRESULT15 *((volatile int *)0x7117)
#define ADCTRL3     *((volatile int *)0x7118)
#define ADCST       *((volatile int *)0x7119)
/*-----------------SCI MODULE REGISTER-----------*/
/*-----------------SCIA--------------------------*/
#define SCICCRA      *((volatile int *)0x7050)
#define SCICTL1A     *((volatile int *)0x7051)
#define SCIHBAUDA    *((volatile int *)0x7052)
#define SCILBAUDA    *((volatile int *)0x7053)
#define SCICTL2A     *((volatile int *)0x7054)
#define SCIRXSTA     *((volatile int *)0x7055)
#define SCIRXEMUA    *((volatile int *)0x7056)
#define SCIRXBUFA    *((volatile int *)0x7057)
#define SCITXBUFA    *((volatile int *)0x7059)
#define SCIFFTXA     *((volatile int *)0x705a)
#define SCIFFRXA     *((volatile int *)0x705b)
#define SCIFFCTA     *((volatile int *)0x705c)
#define SCIPRIA      *((volatile int *)0x705f)
/*-----------------SCIB--------------------------*/
#define SCICCRB      *((volatile int *)0x7750)
#define SCICTL1B     *((volatile int *)0x7751)
#define SCIHBAUDB    *((volatile int *)0x7752)
#define SCILBAUDB    *((volatile int *)0x7753)
#define SCICTL2B     *((volatile int *)0x7754)
#define SCIRXSTB     *((volatile int *)0x7755)
#define SCIRXEMUB    *((volatile int *)0x7756)
#define SCIRXBUFB    *((volatile int *)0x7757)
#define SCITXBUFB    *((volatile int *)0x7759)
#define SCIFFTXB     *((volatile int *)0x775a)
#define SCIFFRXB     *((volatile int *)0x775b)
#define SCIFFCTB     *((volatile int *)0x775c)
#define SCIPRIB      *((volatile int *)0x775f)
/*-----------------ECAN REGISTER-------------------------*/
#define CANME        *((volatile long *)0x6000)  /*  Mailbox enable                             */ 
#define CANMD        *((volatile long *)0x6002)  /*  Mailbox direction                          */ 
#define CANTRS       *((volatile long *)0x6004)  /*  Transmit request set                       */ 
#define CANTRR       *((volatile long *)0x6006)  /*  Transmit request reset                     */ 
#define CANTA        *((volatile long *)0x6008)  /*  Transmission acknowledge                   */ 
#define CANAA        *((volatile long *)0x600A)  /*  Abort acknowledge                          */ 
#define CANRMP       *((volatile long *)0x600C)  /*  Receive message pending                    */ 
#define CANRML       *((volatile long *)0x600E)  /*  Receive message lost                       */ 
#define CANRFP       *((volatile long *)0x6010)  /*  Remote frame pending                       */ 
#define CANGAM       *((volatile long *)0x6012)  /*  Global acceptance mask                     */ 
#define CANMC        *((volatile long *)0x6014)  /*  Master control                             */ 
#define CANBTC       *((volatile long *)0x6016)  /*  Bit-timing configuration                   */ 
#define CANES        *((volatile long *)0x6018)  /*  Error and status                           */ 
#define CANTEC       *((volatile long *)0x601A)  /*  Transmit error counter                     */ 
#define CANREC       *((volatile long *)0x601C)  /*  Receive error counter                      */ 
#define CANGIF0      *((volatile long *)0x601E)  /*  Global interrupt flag 0                    */ 
#define CANGIM       *((volatile long *)0x6020)  /*  Global interrupt mask                      */ 
#define CANGIF1      *((volatile long *)0x6022)  /*  Global interrupt flag 1                    */ 
#define CANMIM       *((volatile long *)0x6024)  /*  Mailbox interrupt mask                     */ 
#define CANMIL       *((volatile long *)0x6026)  /*  Mailbox interrupt level                    */ 
#define CANOPC       *((volatile long *)0x6028)  /*  Overwrite protection control               */
#define CANTIOC      *((volatile long *)0x602A)  /*  TX I/O control                             */
#define CANRIOC      *((volatile long *)0x602C)  /*  RX I/O control                             */
#define CANTSC       *((volatile long *)0x602E)  /*  Time stamp counter (Reserved in SCC mode)  */
#define CANTOC       *((volatile long *)0x6030)  /*  Time-out control (Reserved in SCC mode)    */
#define CANTOS       *((volatile long *)0x6032)  /*  Time-out status (Reserved in SCC mode)     */
/*-----------------SPI REGISTER-------------------------*/
#define SPICCR       *((volatile int *)0x7040    /*  SPI Configuration Control Register    */
#define	SPICTL  	 *((volatile int *)0x7041	 /*  SPI Operation Control Register        */
#define	SPISTS  	 *((volatile int *)0x7042	 /*  SPI Status Register                   */
#define	SPIBRR  	 *((volatile int *)0x7044	 /*  SPI Baud Rate Register                */
#define	SPIRXEMU	 *((volatile int *)0x7046	 /*  SPI Receive Emulation Buffer Register */
#define	SPIRXBUF	 *((volatile int *)0x7047	 /*  SPI Serial Input Buffer Register      */
#define	SPITXBUF	 *((volatile int *)0x7048	 /*  SPI Serial Output Buffer Register     */
#define	SPIDAT  	 *((volatile int *)0x7049	 /*  SPI Serial Data Register              */
#define	SPIFFTX 	 *((volatile int *)0x704A	 /*  SPI FIFO Transmit Register            */
#define	SPIFFRX 	 *((volatile int *)0x704B	 /*  SPI FIFO Receive Register             */
#define	SPIFFCT 	 *((volatile int *)0x704C	 /*  SPI FIFO Control Register             */
#define	SPIPRI  	 *((volatile int *)0x704F	 /*  SPI Priority Control Register         */
/*-----------------XINTF REGISTER-------------------------*/
#define XTIMING0     *((volatile long *)0x0b20)
#define XTIMING1     *((volatile long *)0x0b22)
#define XTIMING2     *((volatile long *)0x0b24)
#define XTIMING6     *((volatile long *)0x0b2c)
#define XTIMING7     *((volatile long *)0x0b2e)
#define XINTCNF2     *((volatile long *)0x0b34)
#define XBANK        *((volatile long *)0x0b38)
#define XREVISION    *((volatile long *)0x0b3a)
/*-----------------FLASH REGISTER-------------------------*/
#define FOPT         *((volatile int *)0x0a80)
#define FPWR         *((volatile int *)0x0a82)
#define FSTATUS      *((volatile int *)0x0a83)
#define FSTDBYWAIT   *((volatile int *)0x0a84)
#define FACTIVEWAIT  *((volatile int *)0x0a85)
#define FBANKWAIT    *((volatile int *)0x0a86)
#define FOPTWAIT     *((volatile int *)0x0a87)
/*-----------------  DA(Zone 0) -------------------------*/
#define DAF          *((volatile int *)0x2ff0)
#define DAH          *((volatile int *)0x3ff0)
/*--------------External Interrupt REGISTER---------------*/
#define XINT1CR      *((volatile int *)0x7070)
#define XINT2CR      *((volatile int *)0x7071)
#define XNMICR       *((volatile int *)0x7077)
#define XINT1CTR     *((volatile int *)0x7078)
#define XINT2CTR     *((volatile int *)0x7079)
#define XNMICTR      *((volatile int *)0x707f)

/*------- Common CPU Definitions:----------------*/
extern cregister volatile unsigned int IFR;
extern cregister volatile unsigned int IER;

#define  EINT   asm(" clrc INTM")
#define  DINT   asm(" setc INTM")
#define  ERTM   asm(" clrc DBGM")
#define  DRTM   asm(" setc DBGM")
#define  EALLOW asm(" EALLOW")
#define  EDIS   asm(" EDIS")
#define  ESTOP0 asm(" ESTOP0")
#define  NOP    asm(" NOP")
/*-----------------Bit---------------------------*/
#define BIT0    0x0001
#define BIT1    0x0002
#define BIT2    0x0004
#define BIT3    0x0008
#define BIT4    0x0010
#define BIT5    0x0020
#define BIT6    0x0040
#define BIT7    0x0080
#define BIT8    0x0100
#define BIT9    0x0200
#define BIT10   0x0400
#define BIT11   0x0800
#define BIT12   0x1000
#define BIT13   0x2000
#define BIT14   0x4000
#define BIT15   0x8000
/*-----------------------------------------------*/

/*EOF*/

⌨️ 快捷键说明

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