📄 s12xgatev3.h
字号:
/******************************************************************************
COPYRIGHT (c) FREESCALE 2005
File Name : $RCSfile: S12XGATEV3.h,v $
Current Revision : $Revision: 1.1 $
PURPOSE: header file for S12X XGATE register block
DESCRIPTION: Defines the Interrupt register block as a datastructure
of type tXGATE.
UPDATE HISTORY
REV AUTHOR DATE DESCRIPTION OF CHANGE
--- ------ -------- ---------------------
1.0 r32151 01/09/05 Initial coding based on S12XGATEV3.h
1.1 r32151 14/10/05 Fixed XGIPSEL details
*******************************************************************
* File created by: Freescale East Kilbride MCD Applications Group *
*******************************************************************
******************************************************************************/
/*===========================================================================*/
/* Freescale reserves the right to make changes without further notice to any*/
/* product herein to improve reliability, function, or design. Freescale does*/
/* not assume any liability arising out of the application or use of any */
/* product, circuit, or software described herein; neither does it convey */
/* any license under its patent rights nor the rights of others. Freescale*/
/* products are not designed, intended, or authorized for use as components */
/* in systems intended for surgical implant into the body, or other */
/* applications intended to support life, or for any other application in */
/* which the failure of the Freescale product could create a situation where*/
/* personal injury or death may occur. Should Buyer purchase or use Freescale*/
/* products for any such intended or unauthorized application, Buyer shall */
/* indemnify and hold Freescale and its officers, employees, subsidiaries,*/
/* affiliates, and distributors harmless against all claims costs, damages, */
/* and expenses, and reasonable attorney fees arising out of, directly or */
/* indirectly, any claim of personal injury or death associated with such */
/* unintended or unauthorized use, even if such claim alleges that Freescale*/
/* was negligent regarding the design or manufacture of the part. Freescale*/
/* and the Freescale logo* are registered trademarks of Freescale Ltd. */
/*****************************************************************************/
#ifndef S12XGATEV3_H /*prevent duplicated includes */
#define S12XGATEV3_H
#include "S12_COMMON.h"
/*bit masks for XGMCTL */
#define XGIE 0x01
#define XGSWEF 0x02
#define XGFACT 0x08
#define XGSS 0x10
#define XGDBG 0x20
#define XGFRZ 0x40
#define XGE 0x80
#define XGIEM 0x0100
#define XGSWEFM 0x0200
#define XGFACTM 0x0800
#define XGSSM 0x1000
#define XGDBGM 0x2000
#define XGFRZM 0x4000
#define XGEM 0x8000
typedef union uXGCHPL
{
tU08 byte;
struct
{
tU08 xgchpl :3; /* XGATE channel priority level */
tU08 :5; /* not used */
}bit;
}tXGCHPL;
typedef union uXGISPSEL
{
tU08 byte;
struct
{
tU08 xgispsel :2; /* XGATE initial stack pointer select */
tU08 :6; /* not used */
}bit;
}tXGISPSEL;
/*bit masks for XGIPSEL */
#define VBR_SEL 0
#define STACK_LO_SEL 1
#define STACK_HI_SEL 2
typedef union uXGIF
{
volatile tU16 word[7];
volatile tU08 byte[15];
volatile struct {
struct {
tU08 XGIF_78 :1; /* Channel 120 (Hex78) corresponds to HCS12X Vector 7 at 0xFFF0 */
tU08 XGIF_79 :1; /* Channel 121 (Hex79) corresponds to HCS12X Vector 6 at 0xFFF2 */
tU08 XGIF_7A :1; /* Channel 122 (Hex7A) corresponds to HCS12X Vector 5 at 0xFFF4 */
tU08 XGIF_7B :1; /* Channel 123 (Hex7B) corresponds to HCS12X Vector 4 at 0xFFF6 */
tU08 XGIF_7C :1; /* Channel 124 (Hex7C) corresponds to HCS12X Vector 3 at 0xFFF8 */
tU08 XGIF_7D :1; /* Channel 125 (Hex7D) corresponds to HCS12X Vector 2 at 0xFFFA */
tU08 XGIF_7E :1; /* Channel 126 (Hex7E) corresponds to HCS12X Vector 1 at 0xFFFC */
tU08 XGIF_7F :1; /* Channel 127 (Hex7F) corresponds to HCS12X Vector 0 at 0xFFFE */
} bits_78_7F;
struct {
tU08 XGIF_70 :1; /* Channel 112 (Hex70) corresponds to HCS12X Vector 15 at 0xFFE0 */
tU08 XGIF_71 :1; /* Channel 113 (Hex71) corresponds to HCS12X Vector 14 at 0xFFE2 */
tU08 XGIF_72 :1; /* Channel 114 (Hex72) corresponds to HCS12X Vector 13 at 0xFFE4 */
tU08 XGIF_73 :1; /* Channel 115 (Hex73) corresponds to HCS12X Vector 12 at 0xFFE6 */
tU08 XGIF_74 :1; /* Channel 116 (Hex74) corresponds to HCS12X Vector 11 at 0xFFE8 */
tU08 XGIF_75 :1; /* Channel 117 (Hex75) corresponds to HCS12X Vector 10 at 0xFFEA */
tU08 XGIF_76 :1; /* Channel 118 (Hex76) corresponds to HCS12X Vector 9 at 0xFFEC */
tU08 XGIF_77 :1; /* Channel 119 (Hex77) corresponds to HCS12X Vector 8 at 0xFFEE */
} bits_70_77;
struct {
tU08 XGIF_68 :1; /* Channel 104 (Hex68) corresponds to HCS12X Vector 23 at 0xFFD0 */
tU08 XGIF_69 :1; /* Channel 105 (Hex69) corresponds to HCS12X Vector 22 at 0xFFD2 */
tU08 XGIF_6A :1; /* Channel 106 (Hex6A) corresponds to HCS12X Vector 21 at 0xFFD4 */
tU08 XGIF_6B :1; /* Channel 107 (Hex6B) corresponds to HCS12X Vector 20 at 0xFFD6 */
tU08 XGIF_6C :1; /* Channel 108 (Hex6C) corresponds to HCS12X Vector 19 at 0xFFD8 */
tU08 XGIF_6D :1; /* Channel 109 (Hex6D) corresponds to HCS12X Vector 18 at 0xFFDA */
tU08 XGIF_6E :1; /* Channel 110 (Hex6E) corresponds to HCS12X Vector 17 at 0xFFDC */
tU08 XGIF_6F :1; /* Channel 111 (Hex6F) corresponds to HCS12X Vector 16 at 0xFFDE */
} bits_68_6F;
struct {
tU08 XGIF_60 :1; /* Channel 96 (Hex60) corresponds to HCS12X Vector 31 at 0xFFC0 */
tU08 XGIF_61 :1; /* Channel 97 (Hex61) corresponds to HCS12X Vector 30 at 0xFFC2 */
tU08 XGIF_62 :1; /* Channel 98 (Hex62) corresponds to HCS12X Vector 29 at 0xFFC4 */
tU08 XGIF_63 :1; /* Channel 99 (Hex63) corresponds to HCS12X Vector 28 at 0xFFC6 */
tU08 XGIF_64 :1; /* Channel 100 (Hex64) corresponds to HCS12X Vector 27 at 0xFFC8 */
tU08 XGIF_65 :1; /* Channel 101 (Hex65) corresponds to HCS12X Vector 26 at 0xFFCA */
tU08 XGIF_66 :1; /* Channel 102 (Hex66) corresponds to HCS12X Vector 25 at 0xFFCC */
tU08 XGIF_67 :1; /* Channel 103 (Hex67) corresponds to HCS12X Vector 24 at 0xFFCE */
} bits_60_67;
struct {
tU08 XGIF_58 :1; /* Channel 88 (Hex58) corresponds to HCS12X Vector 39 at 0xFFB0 */
tU08 XGIF_59 :1; /* Channel 89 (Hex59) corresponds to HCS12X Vector 38 at 0xFFB2 */
tU08 XGIF_5A :1; /* Channel 90 (Hex5A) corresponds to HCS12X Vector 37 at 0xFFB4 */
tU08 XGIF_5B :1; /* Channel 91 (Hex5B) corresponds to HCS12X Vector 36 at 0xFFB6 */
tU08 XGIF_5C :1; /* Channel 92 (Hex5C) corresponds to HCS12X Vector 35 at 0xFFB8 */
tU08 XGIF_5D :1; /* Channel 93 (Hex5D) corresponds to HCS12X Vector 34 at 0xFFBA */
tU08 XGIF_5E :1; /* Channel 94 (Hex5E) corresponds to HCS12X Vector 33 at 0xFFBC */
tU08 XGIF_5F :1; /* Channel 95 (Hex5F) corresponds to HCS12X Vector 32 at 0xFFBE */
} bits_58_5F;
struct {
tU08 XGIF_50 :1; /* Channel 80 (Hex50) corresponds to HCS12X Vector 47 at 0xFFA0 */
tU08 XGIF_51 :1; /* Channel 81 (Hex51) corresponds to HCS12X Vector 46 at 0xFFA2 */
tU08 XGIF_52 :1; /* Channel 82 (Hex52) corresponds to HCS12X Vector 45 at 0xFFA4 */
tU08 XGIF_53 :1; /* Channel 83 (Hex53) corresponds to HCS12X Vector 44 at 0xFFA6 */
tU08 XGIF_54 :1; /* Channel 84 (Hex54) corresponds to HCS12X Vector 43 at 0xFFA8 */
tU08 XGIF_55 :1; /* Channel 85 (Hex55) corresponds to HCS12X Vector 42 at 0xFFAA */
tU08 XGIF_56 :1; /* Channel 86 (Hex56) corresponds to HCS12X Vector 41 at 0xFFAC */
tU08 XGIF_57 :1; /* Channel 87 (Hex57) corresponds to HCS12X Vector 40 at 0xFFAE */
} bits_50_57;
struct {
tU08 XGIF_48 :1; /* Channel 72 (Hex48) corresponds to HCS12X Vector 55 at 0xFF90 */
tU08 XGIF_49 :1; /* Channel 73 (Hex49) corresponds to HCS12X Vector 54 at 0xFF92 */
tU08 XGIF_4A :1; /* Channel 74 (Hex4A) corresponds to HCS12X Vector 53 at 0xFF94 */
tU08 XGIF_4B :1; /* Channel 75 (Hex4B) corresponds to HCS12X Vector 52 at 0xFF96 */
tU08 XGIF_4C :1; /* Channel 76 (Hex4C) corresponds to HCS12X Vector 51 at 0xFF98 */
tU08 XGIF_4D :1; /* Channel 77 (Hex4D) corresponds to HCS12X Vector 50 at 0xFF9A */
tU08 XGIF_4E :1; /* Channel 78 (Hex4E) corresponds to HCS12X Vector 49 at 0xFF9C */
tU08 XGIF_4F :1; /* Channel 79 (Hex4F) corresponds to HCS12X Vector 48 at 0xFF9E */
} bits_48_4F;
struct {
tU08 XGIF_40 :1; /* Channel 64 (Hex40) corresponds to HCS12X Vector 63 at 0xFF80 */
tU08 XGIF_41 :1; /* Channel 65 (Hex41) corresponds to HCS12X Vector 62 at 0xFF82 */
tU08 XGIF_42 :1; /* Channel 66 (Hex42) corresponds to HCS12X Vector 61 at 0xFF84 */
tU08 XGIF_43 :1; /* Channel 67 (Hex43) corresponds to HCS12X Vector 60 at 0xFF86 */
tU08 XGIF_44 :1; /* Channel 68 (Hex44) corresponds to HCS12X Vector 59 at 0xFF88 */
tU08 XGIF_45 :1; /* Channel 69 (Hex45) corresponds to HCS12X Vector 58 at 0xFF8A */
tU08 XGIF_46 :1; /* Channel 70 (Hex46) corresponds to HCS12X Vector 57 at 0xFF8C */
tU08 XGIF_47 :1; /* Channel 71 (Hex47) corresponds to HCS12X Vector 56 at 0xFF8E */
} bits_40_47;
struct {
tU08 XGIF_38 :1; /* Channel 56 (Hex38) corresponds to HCS12X Vector 71 at 0xFF70 */
tU08 XGIF_39 :1; /* Channel 57 (Hex39) corresponds to HCS12X Vector 70 at 0xFF72 */
tU08 XGIF_3A :1; /* Channel 58 (Hex3A) corresponds to HCS12X Vector 69 at 0xFF74 */
tU08 XGIF_3B :1; /* Channel 59 (Hex3B) corresponds to HCS12X Vector 68 at 0xFF76 */
tU08 XGIF_3C :1; /* Channel 60 (Hex3C) corresponds to HCS12X Vector 67 at 0xFF78 */
tU08 XGIF_3D :1; /* Channel 61 (Hex3D) corresponds to HCS12X Vector 66 at 0xFF7A */
tU08 XGIF_3E :1; /* Channel 62 (Hex3E) corresponds to HCS12X Vector 65 at 0xFF7C */
tU08 XGIF_3F :1; /* Channel 63 (Hex3F) corresponds to HCS12X Vector 64 at 0xFF7E */
} bits_38_3F;
struct {
tU08 XGIF_30 :1; /* Channel 48 (Hex30) corresponds to HCS12X Vector 79 at 0xFF60 */
tU08 XGIF_31 :1; /* Channel 49 (Hex31) corresponds to HCS12X Vector 78 at 0xFF62 */
tU08 XGIF_32 :1; /* Channel 50 (Hex32) corresponds to HCS12X Vector 77 at 0xFF64 */
tU08 XGIF_33 :1; /* Channel 51 (Hex33) corresponds to HCS12X Vector 76 at 0xFF66 */
tU08 XGIF_34 :1; /* Channel 52 (Hex34) corresponds to HCS12X Vector 75 at 0xFF68 */
tU08 XGIF_35 :1; /* Channel 53 (Hex35) corresponds to HCS12X Vector 74 at 0xFF6A */
tU08 XGIF_36 :1; /* Channel 54 (Hex36) corresponds to HCS12X Vector 73 at 0xFF6C */
tU08 XGIF_37 :1; /* Channel 55 (Hex37) corresponds to HCS12X Vector 72 at 0xFF6E */
} bits_30_37;
struct {
tU08 XGIF_28 :1; /* Channel 40 (Hex28) corresponds to HCS12X Vector 87 at 0xFF50 */
tU08 XGIF_29 :1; /* Channel 41 (Hex29) corresponds to HCS12X Vector 86 at 0xFF52 */
tU08 XGIF_2A :1; /* Channel 42 (Hex2A) corresponds to HCS12X Vector 85 at 0xFF54 */
tU08 XGIF_2B :1; /* Channel 43 (Hex2B) corresponds to HCS12X Vector 84 at 0xFF56 */
tU08 XGIF_2C :1; /* Channel 44 (Hex2C) corresponds to HCS12X Vector 83 at 0xFF58 */
tU08 XGIF_2D :1; /* Channel 45 (Hex2D) corresponds to HCS12X Vector 82 at 0xFF5A */
tU08 XGIF_2E :1; /* Channel 46 (Hex2E) corresponds to HCS12X Vector 81 at 0xFF5C */
tU08 XGIF_2F :1; /* Channel 47 (Hex2F) corresponds to HCS12X Vector 80 at 0xFF5E */
} bits_28_2F;
struct {
tU08 XGIF_20 :1; /* Channel 32 (Hex20) corresponds to HCS12X Vector 95 at 0xFF40 */
tU08 XGIF_21 :1; /* Channel 33 (Hex21) corresponds to HCS12X Vector 94 at 0xFF42 */
tU08 XGIF_22 :1; /* Channel 34 (Hex22) corresponds to HCS12X Vector 93 at 0xFF44 */
tU08 XGIF_23 :1; /* Channel 35 (Hex23) corresponds to HCS12X Vector 92 at 0xFF46 */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -