IAR430头文件Word文件下载.docx
- 文档编号:20182428
- 上传时间:2023-01-17
- 格式:DOCX
- 页数:33
- 大小:23.71KB
IAR430头文件Word文件下载.docx
《IAR430头文件Word文件下载.docx》由会员分享,可在线阅读,更多相关《IAR430头文件Word文件下载.docx(33页珍藏版)》请在冰豆网上搜索。
*Rev.2.3,RemovedunuseddefofTASSEL2/TBSSEL2
********************************************************************/
#ifndef__msp430x14x
#define__msp430x14x
#ifdef__IAR_SYSTEMS_ICC__
#ifndef_SYSTEM_BUILD
#pragmasystem_include
#endif
#if(((__TID__>
>
8)&
0x7F)!
=0x2b)/*0x2b=43dec*/
#errorMSP430X44X.HfileforusewithICC430/A430only
#include<
in430.h>
#pragmalanguage=extended
#defineDEFC(name,address)__no_initvolatileunsignedcharname@address;
#defineDEFW(name,address)__no_initvolatileunsignedshortname@address;
#endif/*__IAR_SYSTEMS_ICC__*/
#ifdef__IAR_SYSTEMS_ASM__
#defineDEFC(name,address)sfrbname=address;
#defineDEFW(name,address)sfrwname=address;
#endif/*__IAR_SYSTEMS_ASM__*/
#ifdef__cplusplus
#defineREAD_ONLY
#else
#defineREAD_ONLYconst
/************************************************************
*STANDARDBITS
************************************************************/
#defineBIT0(0x0001)
#defineBIT1(0x0002)
#defineBIT2(0x0004)
#defineBIT3(0x0008)
#defineBIT4(0x0010)
#defineBIT5(0x0020)
#defineBIT6(0x0040)
#defineBIT7(0x0080)
#defineBIT8(0x0100)
#defineBIT9(0x0200)
#defineBITA(0x0400)
#defineBITB(0x0800)
#defineBITC(0x1000)
#defineBITD(0x2000)
#defineBITE(0x4000)
#defineBITF(0x8000)
*STATUSREGISTERBITS
#defineC(0x0001)
#defineZ(0x0002)
#defineN(0x0004)
#defineV(0x0100)
#defineGIE(0x0008)
#defineCPUOFF(0x0010)
#defineOSCOFF(0x0020)
#defineSCG0(0x0040)
#defineSCG1(0x0080)
/*LowPowerModescodedwithBits4-7inSR*/
#ifndef__IAR_SYSTEMS_ICC/*Begin#definesforassembler*/
#defineLPM0(CPUOFF)
#defineLPM1(SCG0+CPUOFF)
#defineLPM2(SCG1+CPUOFF)
#defineLPM3(SCG1+SCG0+CPUOFF)
#defineLPM4(SCG1+SCG0+OSCOFF+CPUOFF)
/*End#definesforassembler*/
#else/*Begin#definesforC*/
#defineLPM0_bits(CPUOFF)//进入低功耗模式0之后,CPU被关闭,MCLK关闭
#defineLPM1_bits(SCG0+CPUOFF)//进入低功耗模式1之后,CPU被关闭,MCLK关闭,直流发生器被禁止
#defineLPM2_bits(SCG1+CPUOFF)//进入低功耗模式2之后,CPU被关闭,MCLK关闭,SCLK被禁止
#defineLPM3_bits(SCG1+SCG0+CPUOFF)//进入低功耗模式3之后,CPU被关闭,MCLK关闭,直流发生器被禁止,SCLK也被禁止
#defineLPM4_bits(SCG1+SCG0+OSCOFF+CPUOFF)//进入低功耗模式4之后,CPU被关闭,MCLK关闭,直流发生器被禁止,SCLK也被禁止,LFXT也被禁止
#defineLPM0_BIS_SR(LPM0_bits)/*EnterLowPowerMode0*/
#defineLPM0_EXIT_BIC_SR_IRQ(LPM0_bits)/*ExitLowPowerMode0*/
#defineLPM1_BIS_SR(LPM1_bits)/*EnterLowPowerMode1*/
#defineLPM1_EXIT_BIC_SR_IRQ(LPM1_bits)/*ExitLowPowerMode1*/
#defineLPM2_BIS_SR(LPM2_bits)/*EnterLowPowerMode2*/
#defineLPM2_EXIT_BIC_SR_IRQ(LPM2_bits)/*ExitLowPowerMode2*/
#defineLPM3_BIS_SR(LPM3_bits)/*EnterLowPowerMode3*/
#defineLPM3_EXIT_BIC_SR_IRQ(LPM3_bits)/*ExitLowPowerMode3*/
#defineLPM4_BIS_SR(LPM4_bits)/*EnterLowPowerMode4*/
#defineLPM4_EXIT_BIC_SR_IRQ(LPM4_bits)/*ExitLowPowerMode4*/
#endif/*End#definesforC*/
*PERIPHERALFILEMAP
*SPECIALFUNCTIONREGISTERADDRESSES+CONTROLBITS
#defineIE1_(0x0000)/*InterruptEnable1*/
DEFC(IE1,IE1_)
#defineU0IEIE1/*UART0InterruptEnableRegister*/
#defineWDTIE(0x01)
#defineOFIE(0x02)
#defineNMIIE(0x10)
#defineACCVIE(0x20)
#defineURXIE0(0x40)
#defineUTXIE0(0x80)
#defineIFG1_(0x0002)/*InterruptFlag1*/
DEFC(IFG1,IFG1_)
#defineU0IFGIFG1/*UART0InterruptFlagRegister*/
#defineWDTIFG(0x01)
#defineOFIFG(0x02)
#defineNMIIFG(0x10)
#defineURXIFG0(0x40)
#defineUTXIFG0(0x80)
#defineME1_(0x0004)/*ModuleEnable1*/
DEFC(ME1,ME1_)
#defineU0MEME1/*UART0ModuleEnableRegister*/
#defineURXE0(0x40)
#defineUTXE0(0x80)
#defineUSPIE0(0x40)
#defineIE2_(0x0001)/*InterruptEnable2*/
DEFC(IE2,IE2_)
#defineU1IEIE2/*UART1InterruptEnableRegister*/
#defineURXIE1(0x10)
#defineUTXIE1(0x20)
#defineIFG2_(0x0003)/*InterruptFlag2*/
DEFC(IFG2,IFG2_)
#defineU1IFGIFG2/*UART1InterruptFlagRegister*/
#defineURXIFG1(0x10)
#defineUTXIFG1(0x20)
#defineME2_(0x0005)/*ModuleEnable2*/
DEFC(ME2,ME2_)
#defineU1MEME2/*UART1ModuleEnableRegister*/
#defineURXE1(0x10)
#defineUTXE1(0x20)
#defineUSPIE1(0x10)
*WATCHDOGTIMER
#define__MSP430_HAS_WDT__/*DefinitiontoshowthatModuleisavailable*/
#defineWDTCTL_(0x0120)/*WatchdogTimerControl*/
DEFW(WDTCTL,WDTCTL_)
/*Thebitnameshavebeenprefixedwith"
WDT"
*/
#defineWDTIS0(0x0001)
#defineWDTIS1(0x0002)
#defineWDTSSEL(0x0004)
#defineWDTCNTCL(0x0008)
#defineWDTTMSEL(0x0010)
#defineWDTNMI(0x0020)
#defineWDTNMIES(0x0040)
#defineWDTHOLD(0x0080)
#defineWDTPW(0x5A00)
/*WDT-intervaltimes[1ms]codedwithBits0-2*/
/*WDTisclockedbyfSMCLK(assumed1MHz)*/
#defineWDT_MDLY_32(WDTPW+WDTTMSEL+WDTCNTCL)/*32msinterval(default)*/
#defineWDT_MDLY_8(WDTPW+WDTTMSEL+WDTCNTCL+WDTIS0)/*8ms"
#defineWDT_MDLY_0_5(WDTPW+WDTTMSEL+WDTCNTCL+WDTIS1)/*0.5ms"
#defineWDT_MDLY_0_064(WDTPW+WDTTMSEL+WDTCNTCL+WDTIS1+WDTIS0)/*0.064ms"
/*WDTisclockedbyfACLK(assumed32KHz)*/
#defineWDT_ADLY_1000(WDTPW+WDTTMSEL+WDTCNTCL+WDTSSEL)/*1000ms"
#defineWDT_ADLY_250(WDTPW+WDTTMSEL+WDTCNTCL+WDTSSEL+WDTIS0)/*250ms"
#defineWDT_ADLY_16(WDTPW+WDTTMSEL+WDTCNTCL+WDTSSEL+WDTIS1)/*16ms"
#defineWDT_ADLY_1_9(WDTPW+WDTTMSEL+WDTCNTCL+WDTSSEL+WDTIS1+WDTIS0)/*1.9ms"
/*Watchdogmode->
resetafterexpiredtime*/
#defineWDT_MRST_32(WDTPW+WDTCNTCL)/*32msinterval(default)*/
#defineWDT_MRST_8(WDTPW+WDTCNTCL+WDTIS0)/*8ms"
#defineWDT_MRST_0_5(WDTPW+WDTCNTCL+WDTIS1)/*0.5ms"
#defineWDT_MRST_0_064(WDTPW+WDTCNTCL+WDTIS1+WDTIS0)/*0.064ms"
#defineWDT_ARST_1000(WDTPW+WDTCNTCL+WDTSSEL)/*1000ms"
#defineWDT_ARST_250(WDTPW+WDTCNTCL+WDTSSEL+WDTIS0)/*250ms"
#defineWDT_ARST_16(WDTPW+WDTCNTCL+WDTSSEL+WDTIS1)/*16ms"
#defineWDT_ARST_1_9(WDTPW+WDTCNTCL+WDTSSEL+WDTIS1+WDTIS0)/*1.9ms"
/*INTERRUPTCONTROL*/
/*ThesetwobitsaredefinedintheSpecialFunctionRegisters*/
/*#defineWDTIE0x01*/
/*#defineWDTIFG0x01*/
*HARDWAREMULTIPLIER
#define__MSP430_HAS_MPY__/*DefinitiontoshowthatModuleisavailable*/
#defineMPY_(0x0130)/*MultiplyUnsigned/Operand1*/
DEFW(MPY,MPY_)
#defineMPYS_(0x0132)/*MultiplySigned/Operand1*/
DEFW(MPYS,MPYS_)
#defineMAC_(0x0134)/*MultiplyUnsignedandAccumulate/Operand1*/
DEFW(MAC,MAC_)
#defineMACS_(0x0136)/*MultiplySignedandAccumulate/Operand1*/
DEFW(MACS,MACS_)
#defineOP2_(0x0138)/*Operand2*/
DEFW(OP2,OP2_)
#defineRESLO_(0x013A)/*ResultLowWord*/
DEFW(RESLO,RESLO_)
#defineRESHI_(0x013C)/*ResultHighWord*/
DEFW(RESHI,RESHI_)
#defineSUMEXT_(0x013E)/*SumExtend*/
READ_ONLYDEFW(SUMEXT,SUMEXT_)
*DIGITALI/OPort1/2
#define__MSP430_HAS_PORT1__/*DefinitiontoshowthatModuleisavailable*/
#define__MSP430_HAS_PORT2__/*DefinitiontoshowthatModuleisavailable*/
#defineP1IN_(0x0020)/*Port1Input*/
READ_ONLYDEFC(P1IN,P1IN_)
#defineP1OUT_(0x0021)/*Port1Output*/
DEFC(P1OUT,P1OUT_)
#defineP1DIR_(0x0022)/*Port1Direction*/
DEFC(P1DIR,P1DIR_)
#defineP1IFG_(0x0023)/*Port1InterruptFlag*/
DEFC(P1IFG,P1IFG_)
#defineP1IES_(0x0024)/*Port1InterruptEdgeSelect*/
DEFC(P1IES,P1IES_)
#defineP1IE_(0x0025)/*Port1InterruptEnable*/
DEFC(P1IE,P1IE_)
#defineP1SEL_(0x0026)/*Port1Selection*/
DEFC(P1SEL,P1SEL_)
#defineP2IN_(0x0028)/*Port2Input*/
READ_ONLYDEFC(P2IN,P2IN_)
#defineP2OUT_(0x0029)/*Port2Output*/
DEFC(P2OUT,P2OUT_)
#defineP2DIR_(0x002A)/*Port2Direction*/
DEFC(P2DIR,P2DIR_)
#defineP2IFG_(0x002B)/*Port2InterruptFlag*/
DEFC(P2IFG,P2IFG_)
#defineP2IES_(0x002C)/*Port2InterruptEdgeSelect*/
DEFC(P2IES,P2IES_)
#defineP2IE_(0x002D)/*Port2InterruptEnable*/
DEFC(P2IE,P2IE_)
#defineP2SEL_(0x002E)/*Port2Selection*/
D
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- IAR430 文件