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

📄 s12_ect.h

📁 source code for a sample alarm control panel system using Freescale MC9S12DP256 . The project was im
💻 H
字号:
//=============================================================================
// File: S12_ECT.H - V1.00
// Rem.: The ACPRD Project Page on the Web -> http://hc12web.de/acprd
//=============================================================================

#ifndef __S12_ECT_H
#define __S12_ECT_H

//-- ECT Bit Mask Definitions -------------------------------------------------

// Bits in TSCR1:
#define BM_TEN		0x80
#define BM_TSWAI	0x40
#define BM_TSFRZ	0x20
#define BM_TFFCA	0x10

// Bits in TCTL1:
#define BM_OM7		0x80
#define BM_OL7		0x40
#define BM_OM6		0x20
#define BM_OL6		0x10
#define BM_OM5		0x08
#define BM_OL5		0x04
#define BM_OM4		0x02
#define BM_OL4		0x01

// Bits in TCTL2:
#define BM_OM3		0x80
#define BM_OL3		0x40
#define BM_OM2		0x20
#define BM_OL2		0x10
#define BM_OM1		0x08
#define BM_OL1		0x04
#define BM_OM0		0x02
#define BM_OL0		0x01

// Bits in TCTL3:
#define BM_EDG7B	0x80
#define BM_EDG7A	0x40
#define BM_EDG6B	0x20
#define BM_EDG6A	0x10
#define BM_EDG5B	0x08
#define BM_EDG5A	0x04
#define BM_EDG4B	0x02
#define BM_EDG4A	0x01

// Bits in TCTL4:
#define BM_EDG3B	0x80
#define BM_EDG3A	0x40
#define BM_EDG2B	0x20
#define BM_EDG2A	0x10
#define BM_EDG1B	0x08
#define BM_EDG1A	0x04
#define BM_EDG0B	0x02
#define BM_EDG0A	0x01

// Bits in TSCR2:
#define BM_TOI		0x80
//#define reserved	0x40
//#define reserved	0x20
//#define reserved	0x10
#define BM_TCRE		0x08
#define BM_PR2		0x04
#define BM_PR1		0x02
#define BM_PR0		0x01

// Bits in TFLG2:
#define BM_TOF		0x80

// Bits in PACTL:
//#define reserved	0x80
#define BM_PAEN		0x40
#define BM_PAMOD	0x20
#define BM_PEDGE	0x10
#define BM_CLK1		0x08
#define BM_CLK0		0x04
#define BM_PAOVI	0x02
#define BM_PAI		0x01

// Bits in PAFLG:
#define BM_PAOVF	0x02
#define BM_PAIF		0x01

// Bits in MCCTL:
#define BM_MCZI		0x80
#define BM_MODMC	0x40
#define BM_RDMCL	0x20
#define BM_ICLAT	0x10
#define BM_FLMC		0x08
#define BM_MCEN		0x04
#define BM_MCPR1	0x02
#define BM_MCPR0	0x01

// Bits in MCFLG:
#define BM_MCZF		0x80
//#define reserved	0x40
//#define reserved	0x20
//#define reserved	0x10
#define BM_POLF3	0x08
#define BM_POLF2	0x04
#define BM_POLF1	0x02
#define BM_POLF0	0x01

// Bits in ICSYS:
#define BM_SH37		0x80
#define BM_SH26		0x40
#define BM_SH15		0x20
#define BM_SH04		0x10
#define BM_TFMOD	0x08
#define BM_PACMX	0x04
#define BM_BUFEN	0x02
#define BM_LATQ		0x01

// Bits in PBCTL:
//#define reserved	0x80
#define BM_PBEN		0x40
//#define reserved	0x20
//#define reserved	0x10
//#define reserved	0x08
//#define reserved	0x04
#define BM_PBOVI	0x02
//#define reserved	0x01

// Bits in PBFLG:
#define BM_PBOVF	0x02
//#define reserved	0x01

//-- Function Prototypes ------------------------------------------------------


#endif //__S12_ECT_H ==========================================================

⌨️ 快捷键说明

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