msp430头文件解释说明.docx
- 文档编号:6509062
- 上传时间:2023-01-07
- 格式:DOCX
- 页数:33
- 大小:25.10KB
msp430头文件解释说明.docx
《msp430头文件解释说明.docx》由会员分享,可在线阅读,更多相关《msp430头文件解释说明.docx(33页珍藏版)》请在冰豆网上搜索。
msp430头文件解释说明
msp430Í·Îļþ½âÊÍ˵Ã÷.txt°®¿Õ¿ÕÇé¿Õ¿Õ£¬×Ô¼ºÁ÷ÀËÔÚ½ÖÖУ»ÈË¿Õ¿ÕÇ®¿Õ¿Õ£¬µ¥Éí¿àÃüÔÚ´ò¹¤£»Ê¿տÕÒµ¿Õ¿Õ£¬ÏëÀ´ÏëÈ¥¾Í·¢·è£»Íë¿Õ¿ÕÅè¿Õ¿Õ£¬Éú»îËùÆȲ»ÇáËÉ¡£×ÜÖ®£¬ËÄ´ó½Ô¿Õ£¡//1
MSP430F149Ïé½â
¶ÔÍ·Îļþ×öÁ˱ȽÏÏêϸµÄ×¢ÊÍ£¬¼Ç²»Çå¼Ä´æÆ÷µÄÈË¿ÉÒÔ¿´¿´
#ifndef__msp430x14x
#define__msp430x14x
/************************************************************
*STANDARDBITS
************************************************************/
#defineBIT00x0001
#defineBIT10x0002
#defineBIT20x0004
#defineBIT30x0008
#defineBIT40x0010
#defineBIT50x0020
#defineBIT60x0040
#defineBIT70x0080
#defineBIT80x0100
#defineBIT90x0200
#defineBITA0x0400
#defineBITB0x0800
#defineBITC0x1000
#defineBITD0x2000
#defineBITE0x4000
#defineBITF0x8000
/************************************************************
*STATUSREGISTERBITS
************************************************************/
#defineC0x0001
#defineZ0x0002
#defineN0x0004
#defineV0x0100
#defineGIE0x0008
#defineCPUOFF0x0010
#defineOSCOFF0x0020
#defineSCG00x0040
#defineSCG10x0080
/*LowPowerModescodedwithBits4-7inSR*/
#ifndef__IAR_SYSTEMS_ICC/*Begin#definesforassembler*/
#defineLPM0CPUOFF
#defineLPM1SCG0+CPUOFF
#defineLPM2SCG1+CPUOFF
#defineLPM3SCG1+SCG0+CPUOFF
#defineLPM4SCG1+SCG0+OSCOFF+CPUOFF
/*End#definesforassembler*/
#else/*Begin#definesforC*/
#defineLPM0_bitsCPUOFF
#defineLPM1_bitsSCG0+CPUOFF
#defineLPM2_bitsSCG1+CPUOFF
#defineLPM3_bitsSCG1+SCG0+CPUOFF
#defineLPM4_bitsSCG1+SCG0+OSCOFF+CPUOFF
#include
#defineLPM0_BIS_SR(LPM0_bits)/*EnterLowPowerMode0*/
#defineLPM0_EXIT_BIC_SR(LPM0_bits)/*ExitLowPowerMode0*/
#defineLPM1_BIS_SR(LPM1_bits)/*EnterLowPowerMode1*/
#defineLPM1_EXIT_BIC_SR(LPM1_bits)/*ExitLowPowerMode1*/
#defineLPM2_BIS_SR(LPM2_bits)/*EnterLowPowerMode2*/
#defineLPM2_EXIT_BIC_SR(LPM2_bits)/*ExitLowPowerMode2*/
#defineLPM3_BIS_SR(LPM3_bits)/*EnterLowPowerMode3*/
#defineLPM3_EXIT_BIC_SR(LPM3_bits)/*ExitLowPowerMode3*/
#defineLPM4_BIS_SR(LPM4_bits)/*EnterLowPowerMode4*/
#defineLPM4_EXIT_BIC_SR(LPM4_bits)/*ExitLowPowerMode4*/
#endif/*End#definesforC*/
/************************************************************
*PERIPHERALFILEMAP
************************************************************/
/************************************************************
*ÌØÊ⹦ÄܼĴæÆ÷µØÖ·ºÍ¿ØÖÆλ
************************************************************/
/*ÖжÏʹÄÜ1*/
#defineIE1_0x0000
sfrbIE1=IE1_;
#defineWDTIE0x01/*¿´ÃŹ·ÖжÏʹÄÜ*/
#defineOFIE0x02/*Íⲿ¾§Õñ¹ÊÕÏÖжÏʹÄÜ*/
#defineNMIIE0x10/*·ÇÆÁ±ÎÖжÏʹÄÜ*/
#defineACCVIE0x20/*¿ÉÆÁ±ÎÖжÏʹÄÜ/flashдÖжϴíÎó*/
#defineURXIE00x40/*´®¿Ú0½ÓÊÕÖжÏʹÄÜ*/
#defineUTXIE00x80/*´®¿Ú0·¢ËÍÖжÏʹÄÜ*/
/*ÖжϱêÖ¾1*/
#defineIFG1_0x0002
sfrbIFG1=IFG1_;
#defineWDTIFG0x01/*¿´ÃŹ·ÖжϱêÖ¾*/
#defineOFIFG0x02/*Íⲿ¾§Õñ¹ÊÕÏÖжϱêÖ¾*/
#defineNMIIFG0x10/*·ÇÆÁ±ÎÖжϱêÖ¾*/
#defineURXIFG00x40/*´®¿Ú0½ÓÊÕÖжϱêÖ¾*/
#defineUTXIFG00x80/*´®¿Ú0·¢ËÍÖжϱêÖ¾*/
/*ÖжÏģʽʹÄÜ1*/
#defineME1_0x0004
sfrbME1=ME1_;
#defineURXE00x40/*´®¿Ú0½ÓÊÕÖжÏģʽʹÄÜ*/
#defineUSPIE00x40/*ͬ²½ÖжÏģʽʹÄÜ*/
#defineUTXE00x80/*´®¿Ú0·¢ËÍÖжÏģʽʹÄÜ*/
/*ÖжÏʹÄÜ2*/
#defineIE2_0x0001
sfrbIE2=IE2_;
#defineURXIE10x10/*´®¿Ú1½ÓÊÕÖжÏʹÄÜ*/
#defineUTXIE10x20/*´®¿Ú1·¢ËÍÖжÏʹÄÜ*/
/*ÖжϱêÖ¾2*/
#defineIFG2_0x0003
sfrbIFG2=IFG2_;
#defineURXIFG10x10/*´®¿Ú1½ÓÊÕÖжϱêÖ¾*/
#defineUTXIFG10x20/*´®¿Ú1·¢ËÍÖжϱêÖ¾*/
/*ÖжÏģʽʹÄÜ2*/
#defineME2_0x0005
sfrbME2=ME2_;
#defineURXE10x10/*´®¿Ú1½ÓÊÕÖжÏģʽʹÄÜ*/
#defineUSPIE10x10/*ͬ²½ÖжÏģʽʹÄÜ*/
#defineUTXE10x20/*´®¿Ú1·¢ËÍÖжÏģʽʹÄÜ*/
/************************************************************
*¿´ÃŹ·¶¨Ê±Æ÷µÄ¼Ä´æÆ÷¶¨Òå
************************************************************/
#defineWDTCTL_0x0120
sfrwWDTCTL=WDTCTL_;
#defineWDTIS00x0001/*Ñ¡ÔñWDTCNTµÄËĸöÊä³ö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"*/
#defineWDT_ADLY_16WDTPW+WDTTMSEL+WDTCNTCL+WDTSSEL+WDTIS1/*TACLK*2POWER9=16ms"*/
#defineWDT_ADLY_1_9WDTPW+WDTTMSEL+WDTCNTCL+WDTSSEL+WDTIS1+WDTIS0/*TACLK*2POWER6=1.9ms"*/
/*SMCLK=1MHz¿´ÃŹ·Ä£Ê½*/
#defineWDT_MRST_32WDTPW+WDTCNTCL/*TSMCLK*2POWER15=32ms¸´Î»×´Ì¬*/
#defineWDT_MRST_8WDTPW+WDTCNTCL+WDTIS0/*TSMCLK*2POWER13=8.192ms"*/
#defineWDT_MRST_0_5WDTPW+WDTCNTCL+WDTIS1/*TSMCLK*2POWER9=0.512ms"*/
#defineWDT_MRST_0_064WDTPW+WDTCNTCL+WDTIS1+WDTIS0/*TSMCLK*2POWER6=0.512ms"*/
/*ACLK=32KHz¿´ÃŹ·Ä£Ê½*/
#defineWDT_ARST_1000WDTPW+WDTCNTCL+WDTSSEL/*TACLK*2POWER15=1000ms"*/
#defineWDT_ARST_250WDTPW+WDTCNTCL+WDTSSEL+WDTIS0/*TACLK*2POWER13=250ms"*/
#defineWDT_ARST_16WDTPW+WDTCNTCL+WDTSSEL+WDTIS1/*TACLK*2POWER9=16ms"*/
#defineWDT_ARST_1_9WDTPW+WDTCNTCL+WDTSSEL+WDTIS1+WDTIS0/*TACLK*2POWER6=1.9ms"*/
/************************************************************
Ó²¼þ³Ë·¨Æ÷µÄ¼Ä´æÆ÷¶¨Òå
************************************************************/
#defineMPY_0x0130/*ÎÞ·ûºÅ³Ë·¨*/
sfrwMPY=MPY_;
#defineMPYS_0x0132/*ÓзûºÅ³Ë·¨*/
sfrwMPYS=MPYS_;
#defineMAC_0x0134/*ÎÞ·ûºÅ³Ë¼Ó*/
sfrwMAC=MAC_;
#defineMACS_0x0136/*ÓзûºÅ³Ë¼Ó*/
sfrwMACS=MACS_;
#defineOP2_0x0138/*µÚ¶þ³ËÊý*/
sfrwOP2=OP2_;
#defineRESLO_0x013A/*µÍ6λ½á¹û¼Ä´æÆ÷*/
sfrwRESLO=RESLO_;
#defineRESHI_0x013C/*¸ß6λ½á¹û¼Ä´æÆ÷*/
sfrwRESHI=RESHI_;
#defineSUMEXT_0x013E/*½á¹ûÀ©Õ¹¼Ä´æÆ÷*/
constsfrwSUMEXT=SUMEXT_;
/************************************************************
*DIGITALI/OPort1/2¼Ä´æÆ÷¶¨ÒåÓÐÖжϹ¦ÄÜ
************************************************************/
#defineP1IN_0x0020/*P1ÊäÈë¼Ä´æÆ÷*/
constsfrbP1IN=P1IN_;
#defineP1OUT_0x0021/*P1Êä³ö¼Ä´æÆ÷*/
sfrbP1OUT=P1OUT_;
#defineP1DIR_0x0022/*P1·½ÏòÑ¡Ôñ¼Ä´æÆ÷*/
sfrbP1DIR=P1DIR_;
#defineP1IFG_0x0023/*P1ÖжϱêÖ¾¼Ä´æÆ÷*/
sfrbP1IFG=P1IFG_;
#defineP1IES_0x0024/*P1ÖжϱßÑØÑ¡Ôñ¼Ä´æÆ÷*/
sfrbP1IES=P1IES_;
#defineP1IE_0x0025/*P1ÖжÏʹÄܼĴæÆ÷*/
sfrbP1IE=P1IE_;
#defineP1SEL_0x0026/*P1¹¦ÄÜÑ¡Ôñ¼Ä´æÆ÷*/
sfrbP1SEL=P1SEL_;
#defineP2IN_0x0028/*P2ÊäÈë¼Ä´æÆ÷*/
constsfrbP2IN=P2IN_;
#defineP2OUT_0x0029/*P2Êä³ö¼Ä´æÆ÷*/
sfrbP2OUT=P2OUT_;
#defineP2DIR_0x002A/*P2·½ÏòÑ¡Ôñ¼Ä´æÆ÷*/
sfrbP2DIR=P2DIR_;
#defineP2IFG_0x002B/*P2ÖжϱêÖ¾¼Ä´æÆ÷*/
sfrbP2IFG=P2IFG_;
#defineP2IES_0x002C/*P2ÖжϱßÑØÑ¡Ôñ¼Ä´æÆ÷*/
sfrbP2IES=P2IES_;
#defineP2IE_0x002D/*P2ÖжÏʹÄܼĴæÆ÷*/
sfrbP2IE=P2IE_;
#defineP2SEL_0x002E/*P2¹¦ÄÜÑ¡Ôñ¼Ä´æÆ÷*/
sfrbP2SEL=P2SEL_;
/************************************************************
*DIGITALI/OPort3/4¼Ä´æÆ÷¶¨ÒåÎÞÖжϹ¦ÄÜ
************************************************************/
#defineP3IN_0x0018/*P3ÊäÈë¼Ä´æÆ÷*/
constsfrbP3IN=P3IN_;
#defineP3OUT_0x0019/*P3Êä³ö¼Ä´æÆ÷*/
sfrbP3OUT=P3OUT_;
#defineP3DIR_0x001A/*P3·½ÏòÑ¡Ôñ¼Ä´æÆ÷*/
sfrbP3DIR=P3DIR_;
#defineP3SEL_0x001B/*P3¹¦ÄÜÑ¡Ôñ¼Ä´æÆ÷*/
sfrbP3SEL=P3SEL_;
#defineP4IN_0x001C/*P4ÊäÈë¼Ä´æÆ÷*/
constsfrbP4IN=P4IN_;
#defineP4OUT_0x001D/*P4Êä³ö¼Ä´æÆ÷*/
sfrbP4OUT=P4OUT_;
#defineP4DIR_0x001E/*P4·½ÏòÑ¡Ôñ¼Ä´æÆ÷*/
sfrbP4DIR=P4DIR_;
#defineP4SEL_0x001F/*P4¹¦ÄÜÑ¡Ôñ¼Ä´æÆ÷*/
sfrbP4SEL=P4SEL_;
/************************************************************
*DIGITALI/OPort5/6I/O¿Ú¼Ä´æÆ÷¶¨ÒåPORT5ºÍ6ÎÞÖжϹ¦ÄÜ
************************************************************/
#defineP5IN_0x0030/*P5ÊäÈë¼Ä´æÆ÷*/
constsfrbP5IN=P5IN_;
#defineP5OUT_0x0031/*P5Êä³ö¼Ä´æÆ÷*/
sfrbP5OUT=P5OUT_;
#defineP5DIR_0x0032/*P5·½ÏòÑ¡Ôñ¼Ä´æÆ÷*/
sfrbP5DIR=P5DIR_;
#defineP5SEL_0x0033/*P5¹¦ÄÜÑ¡Ôñ¼Ä´æÆ÷*/
sfrbP5SEL=P5SEL_;
#defineP6IN_0x0034/*P6ÊäÈë¼Ä´æÆ÷*/
constsfrbP6IN=P6IN_;
#defineP6OUT_0x0035/*P6Êä³ö¼Ä´æÆ÷*/
sfrbP6OUT=P6OUT_;
#defineP6DIR_0x0036/*P6·½ÏòÑ¡Ôñ¼Ä´æÆ÷*/
sfrbP6DIR=P6DIR_;
#defineP6SEL_0x0037/*P6¹¦ÄÜÑ¡Ôñ¼Ä´æÆ÷*/
sfrbP6SEL=P6SEL_;
//2
/************************************************************
*USART´®¿Ú¼Ä´æÆ÷"UCTL","UTCTL","URCTL"¶¨ÒåµÄ¸÷¸öλ¿É´®¿Ú1´®¿Ú2¹«ÓÃ
************************************************************/
/*UCTL´®¿Ú¿ØÖƼĴæÆ÷*/
#definePENA0x80/*УÑéÔÊÐíλ*/
#definePEV0x40/*żУÑéΪ0ʱΪÆæУÑé*/
#defineSPB0x20/*ֹͣλΪ2Ϊ0ʱֹͣλΪ1*/
#defineCHAR0x10/*Êý¾ÝλΪ8λΪ0ʱÊý¾ÝλΪ7λ*/
#defineLISTEN0x08/*×Ô»·Ä£Ê½(·¢Êý¾ÝͬʱÔÚ°Ñ·¢µÄÊý¾Ý½ÓÊÕ»ØÀ´)*/
#defineSYNC0x04/*ͬ²½Ä£Ê½Îª0Ò첽ģʽ*/
#defineMM0x02/*Ϊ1ʱµØַλ¶à»úÐÒé(Òì²½)Ö÷»úģʽ(ͬ²½);Ϊ0ʱÏß·¿ÕÏжà»úÐÒé(Òì²½)´Ó»úģʽ(ͬ²½)*/
#defineSWRST0x01/*¿ØÖÆλ*/
/*UTCTL´®¿Ú·¢ËÍ¿ØÖƼĴæÆ÷*/
#defineCKPH0x80/*ʱÖÓÏàλ¿ØÖÆλ(ֻͬ²½·½Ê½ÓÃ)Ϊ1
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- msp430 文件 解释 说明