您好,欢迎访问三七文档
当前位置:首页 > 电子/通信 > 综合/其它 > cc2530寄存器所有
/***************************************************************************************************-ioCC2530.h-**HeaderfilewithdefinitionsfortheTexasInstrumentsCC2530low-powerSystem-on-Chip:*an8051-basedMCUwith2.4GHzIEEE802.15.4RFtransceiver,andupto256kBFLASH.**ThisfilesupportstheIAREmbeddedWorkbenchfor8051.****************************************************************************************************/#ifndefIOCC2530_H#defineIOCC2530_H/*------------------------------------------------------------------------------------------------*CompilerAbstraction*------------------------------------------------------------------------------------------------*/#ifdef__IAR_SYSTEMS_ICC__#pragmalanguage=extended#defineSFR(name,addr)__sfr__no_initvolatileunsignedcharname@addr;#defineSFRBIT(name,addr,bit7,bit6,bit5,bit4,bit3,bit2,bit1,bit0)\__sfr__no_initvolatileunion\{\unsignedcharname;\struct{\unsignedcharbit0:1;\unsignedcharbit1:1;\unsignedcharbit2:1;\unsignedcharbit3:1;\unsignedcharbit4:1;\unsignedcharbit5:1;\unsignedcharbit6:1;\unsignedcharbit7:1;\};\}@addr;#defineSBIT(name,addr)/*notinuseforIARCCompiler*/#defineXREG(addr)((unsignedcharvolatile__xdata*)0)[addr]#definePXREG(addr)((unsignedcharvolatile__xdata*)addr)#defineVECT(num,addr)addr#elifdefined__IAR_SYSTEMS_ASM__#defineSFR(name,addr)nameDEFINEaddrSFRBITMACROMACROt,addr,bit7,bit6,bit5,bit4,bit3,bit2,bit1,bit0tDEFINEaddrbit7DEFINEaddr.7bit6DEFINEaddr.6bit5DEFINEaddr.5bit4DEFINEaddr.4;;NB:donotmodifyindentationofthismacrobit3DEFINEaddr.3bit2DEFINEaddr.2bit1DEFINEaddr.1bit0DEFINEaddr.0ENDM#defineSFRBIT(name,addr,bit7,bit6,bit5,bit4,bit3,bit2,bit1,bit0)\SFRBITMACROname,addr,bit7,bit6,bit5,bit4,bit3,bit2,bit1,bit0#defineSBIT(name,addr)nameDEFINEaddr#defineXREG(addr)addr#definePXREG(addr)addr#defineVECT(num,addr)addr/*IARassemblerusessomepredefinedregisters.Thefollowingpreventsnamecollisions.*/#defineSPSPx#defineACCACCx#defineBBx#definePSWPSWx#defineCYCYx#defineACACx#defineF0F0x#defineRS1RS1x#defineRS0RS0x#defineOVOVx#definePPx#else#errorUnrecognizedcompiler.#endif/*------------------------------------------------------------------------------------------------*InterruptVectors*------------------------------------------------------------------------------------------------*/#defineRFERR_VECTORVECT(0,0x03)/*RFTXFIFOUnderflowandRXFIFOOverflow*/#defineADC_VECTORVECT(1,0x0B)/*ADCEndofConversion*/#defineURX0_VECTORVECT(2,0x13)/*USART0RXComplete*/#defineURX1_VECTORVECT(3,0x1B)/*USART1RXComplete*/#defineENC_VECTORVECT(4,0x23)/*AESEncryption/DecryptionComplete*/#defineST_VECTORVECT(5,0x2B)/*SleepTimerCompare*/#defineP2INT_VECTORVECT(6,0x33)/*Port2Inputs*/#defineUTX0_VECTORVECT(7,0x3B)/*USART0TXComplete*/#defineDMA_VECTORVECT(8,0x43)/*DMATransferComplete*/#defineT1_VECTORVECT(9,0x4B)/*Timer1(16-bit)Capture/Compare/Overflow*/#defineT2_VECTORVECT(10,0x53)/*Timer2(MACTimer)*/#defineT3_VECTORVECT(11,0x5B)/*Timer3(8-bit)Capture/Compare/Overflow*/#defineT4_VECTORVECT(12,0x63)/*Timer4(8-bit)Capture/Compare/Overflow*/#defineP0INT_VECTORVECT(13,0x6B)/*Port0Inputs*/#defineUTX1_VECTORVECT(14,0x73)/*USART1TXComplete*/#defineP1INT_VECTORVECT(15,0x7B)/*Port1Inputs*/#defineRF_VECTORVECT(16,0x83)/*RFGeneralInterrupts*/#defineWDT_VECTORVECT(17,0x8B)/*WatchdogOverflowinTimerMode*//*------------------------------------------------------------------------------------------------*SFRs*------------------------------------------------------------------------------------------------*//**SFRswithanaddressendingwith0or8arebitaccessible.*TheyaredefinedwiththeSFRBIT()macrothatsetsthenameofeachbit.*//*Port0*/SFRBIT(P0,0x80,P0_7,P0_6,P0_5,P0_4,P0_3,P0_2,P0_1,P0_0)SFR(SP,0x81)/*StackPointer*/SFR(DPL0,0x82)/*DataPointer0LowByte*/SFR(DPH0,0x83)/*DataPointer0HighByte*/SFR(DPL1,0x84)/*DataPointer1LowByte*/SFR(DPH1,0x85)/*DataPointer1HighByte*/SFR(U0CSR,0x86)/*USART0ControlandStatus*/SFR(PCON,0x87)/*PowerModeControl*//*InterruptFlags*/SFRBIT(TCON,0x88,URX1IF,_TCON6,ADCIF,_TCON4,URX0IF,IT1,RFERRIF,IT0)SFR(P0IFG,0x89)/*Port0InterruptStatusFlag*/SFR(P1IFG,0x8A)/*Port1InterruptStatusFlag*/SFR(P2IFG,0x8B)/*Port2InterruptStatusFlag*/SFR(PICTL,0x8C)/*PortInterruptControl*/SFR(P1IEN,0x8D)/*Port1InterruptMask*/SFR(_SFR8E,0x8E)/*notused*/SFR(P0INP,0x8F)/*Port0InputMode*//*Port1*/SFRBIT(P1,0x90,P1_7,P1_6,P1_5,P1_4,P1_3,P1_2,P1_1,P1_0)SFR(RFIRQF1,0x91)/*RFInterruptFlagsMSB*/SFR(DPS,0x92)/*DataPointerSelect*/SFR(MPAGE,0x93)/*MemoryPageSelect*/SFR(T2CTRL,0x94)/*Timer2ControlRegister*/SFR(ST0,0x95)/*SleepTimer0*/SFR(ST1,0x96)/*SleepTimer1*/SFR(ST2,0x97)/*SleepTimer2*//*InterruptFlags2*/SFRBIT(S0CON,0x98,_S0CON7,_S0CON6,_S0CON5,_S0CON4,_S0CON3,_S0CON2,ENCIF_1,ENCIF_0)SFR(_SFR99,0x99)/*reserved*/SFR(IEN2,0x9A)/*InterruptEnable2*/SFR(S1CON,0x9B)/*InterruptFlags3*/SFR(T2CSPCFG,0x9C)/*Timer2CSPInterfaceConfiguration(legacyname)*/SFR(T2EVTCFG,0x9C)/*Timer2EventOutputConfiguration*/SFR(SLEEPSTA,0x9D)/*SleepStatus*/SFR(CLKCONSTA,0x9E)/*ClockControlStatus*/SFR(FMAP,0x9F)/*FlashBankMap*//*Port2*/SFRBIT(P2,0xA0,_P2
本文标题:cc2530寄存器所有
链接地址:https://www.777doc.com/doc-7489073 .html