msp430x14xC语言头文件

上传人:s9****2 文档编号:494917357 上传时间:2023-12-29 格式:DOC 页数:28 大小:173KB
返回 下载 相关 举报
msp430x14xC语言头文件_第1页
第1页 / 共28页
msp430x14xC语言头文件_第2页
第2页 / 共28页
msp430x14xC语言头文件_第3页
第3页 / 共28页
msp430x14xC语言头文件_第4页
第4页 / 共28页
msp430x14xC语言头文件_第5页
第5页 / 共28页
点击查看更多>>
资源描述

《msp430x14xC语言头文件》由会员分享,可在线阅读,更多相关《msp430x14xC语言头文件(28页珍藏版)》请在金锄头文库上搜索。

1、文档供参考,可复制、编制,期待您的好评与关注! /*/* Legacy Header File */* Not recommended for use in new projects. */* Please use the msp430.h file or the device specific header file */*/* Standard register and bit definitions for the Texas Instruments* MSP430 microcontroller.* This file supports assembler and C developm

2、ent for* MSP430x14x devices.* Texas Instruments, Version 2.4* Rev. 1.2, Additional Timer B bit definitions.* Renamed XTOFF to XT2OFF.* Rev. 1.3, Removed leading 0 to aviod interpretation as octal* values under C* Rev. 1.4, Corrected LPMx_EXIT to reference new intrinsic _BIC_SR_IRQ* Changed TAIV and

3、TBIV to be read-only* Rev. 1.5, Enclose all #define statements with parentheses* Rev. 1.6, Defined vectors for USART (in addition to UART)* Rev. 1.7, Added USART special function labels (UxME, UxIE, UxIFG)* Rev. 2.1, Alignment of defintions in Users Guide and of version numbers* Rev. 2.2, Fixed type

4、 in ADC12 bit definitions (replaced ADC10 with ADC12)* Rev. 2.3, Removed unused def of TASSEL2 / TBSSEL2* Rev. 2.4, added definitions for Interrupt Vectors xxIV*/#ifndef _msp430x14x#define _msp430x14x#define _MSP430_HEADER_VERSION_ 1065 /* Beta-Build-Tag: #0023 */#ifdef _IAR_SYSTEMS_ICC_#ifndef _SYS

5、TEM_BUILD#pragma system_include#endif#endif#if (_TID_ 8) & 0x7F) != 0x2b) /* 0x2b = 43 dec */#error msp430x14x.h file for use with ICC430/A430 only#endif#ifdef _IAR_SYSTEMS_ICC_#include in430.h#pragma language=extended#define DEFC(name, address) _no_init volatile unsigned char name address;#define D

6、EFW(name, address) _no_init volatile unsigned short name address;#define DEFXC volatile unsigned char#define DEFXW volatile unsigned short#endif /* _IAR_SYSTEMS_ICC_ */#ifdef _IAR_SYSTEMS_ASM_#define DEFC(name, address) sfrb name = address;#define DEFW(name, address) sfrw name = address;#endif /* _I

7、AR_SYSTEMS_ASM_*/#ifdef _cplusplus#define READ_ONLY#else#define READ_ONLY const#endif/* STANDARD BITS*/#define BIT0 (0x0001u)#define BIT1 (0x0002u)#define BIT2 (0x0004u)#define BIT3 (0x0008u)#define BIT4 (0x0010u)#define BIT5 (0x0020u)#define BIT6 (0x0040u)#define BIT7 (0x0080u)#define BIT8 (0x0100u

8、)#define BIT9 (0x0200u)#define BITA (0x0400u)#define BITB (0x0800u)#define BITC (0x1000u)#define BITD (0x2000u)#define BITE (0x4000u)#define BITF (0x8000u)/* STATUS REGISTER BITS*/#define C (0x0001u)#define Z (0x0002u)#define N (0x0004u)#define V (0x0100u)#define GIE (0x0008u)#define CPUOFF (0x0010u

9、)#define OSCOFF (0x0020u)#define SCG0 (0x0040u)#define SCG1 (0x0080u)/* Low Power Modes coded with Bits 4-7 in SR */#ifndef _IAR_SYSTEMS_ICC_ /* Begin #defines for assembler */#define LPM0 (CPUOFF)#define LPM1 (SCG0+CPUOFF)#define LPM2 (SCG1+CPUOFF)#define LPM3 (SCG1+SCG0+CPUOFF)#define LPM4 (SCG1+S

10、CG0+OSCOFF+CPUOFF)/* End #defines for assembler */#else /* Begin #defines for C */#define LPM0_bits (CPUOFF)#define LPM1_bits (SCG0+CPUOFF)#define LPM2_bits (SCG1+CPUOFF)#define LPM3_bits (SCG1+SCG0+CPUOFF)#define LPM4_bits (SCG1+SCG0+OSCOFF+CPUOFF)#include in430.h#define LPM0 _BIS_SR(LPM0_bits) /*

11、Enter Low Power Mode 0 */#define LPM0_EXIT _BIC_SR_IRQ(LPM0_bits) /* Exit Low Power Mode 0 */#define LPM1 _BIS_SR(LPM1_bits) /* Enter Low Power Mode 1 */#define LPM1_EXIT _BIC_SR_IRQ(LPM1_bits) /* Exit Low Power Mode 1 */#define LPM2 _BIS_SR(LPM2_bits) /* Enter Low Power Mode 2 */#define LPM2_EXIT _BIC_SR_IRQ(LPM2_bits) /* Exit Low Power Mode 2 */#define LPM3 _BIS_SR(LPM3_bits) /* Enter Low Power Mode 3 */#define LPM3_EXIT _BIC_SR_IRQ(LPM3_bits) /* Exit Low Power M

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 行业资料 > 国内外标准规范

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号