FreeEMS  0.2.0-SNAPSHOT-285-g028e24c
9S12XDP512flags.h
Go to the documentation of this file.
1 /* FreeEMS - the open source engine management system
2  *
3  * Copyright 2013 Fred Cooke
4  *
5  * This file is part of the FreeEMS project.
6  *
7  * FreeEMS software is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * FreeEMS software is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with any FreeEMS software. If not, see http://www.gnu.org/licenses/
19  *
20  * We ask that if you make any changes to this file you email them upstream to
21  * us at admin(at)diyefi(dot)org or, even better, fork the code on github.com!
22  *
23  * Thank you for choosing FreeEMS to run your engine!
24  */
25 
26 
27 /** @file
28  *
29  * @ingroup allHeaders
30  * @ingroup globalHeaders
31  *
32  * @brief MC9S12XDP512 flag definitions
33  *
34  * This is the flag header for the FreeScale MC9S12XDP512 MCU. It contains
35  * a unified set of masks to be used with configuration registers.
36  *
37  * These are taken from MC9S12XDP512V2.pdf Appendix G, note some are shared across multiple registers.
38  */
39 
40 
41 /* see if we've seen this, if not, mark seen and process */
42 #ifndef FILE_9S12XDP512_FLAGS_H_SEEN
43 #define FILE_9S12XDP512_FLAGS_H_SEEN
44 
45 
46 // CRGFLG
47 #define RTIF BIT7 // Mask for clearing the Real Time Interrupt flag
48 #define PORF BIT6 // Mask for checking to see whether this was a fresh start, or not
49 #define LVRF BIT5 // Mask for checking to see whether this was a post-low-Voltage start, or not
50 #define PLLLOCKIF BIT4 // Mask for clearing the PLL Lock Interrupt flag
51 #define PLLLOCK BIT3 // Mask for checking to see when the PLL is locked onto its target
52 #define PLLTRACK BIT2 // Mask for checking to see when the PLL is tracking its target
53 #define SCMIF BIT1 // Mask for clearing the Self Clock Mode Interrupt flag
54 #define SCM BIT0 // Mask for checking to see whether we're in Self Clock Mode, or not
55 
56 // CRGINT
57 #define RTIE BIT7 // TODO
58 #define ILAF BIT6 // TODO
59 //#define 0 BIT5 // Reserved
60 #define PLLLOCKIE BIT4 // TODO
61 //#define 0 BIT3 // Reserved
62 //#define 0 BIT2 // Reserved
63 #define SCMIE BIT1 // TODO
64 //#define 0 BIT0 // Reserved
65 
66 // CLKSEL
67 #define PLLSEL BIT7 // Mask for selecting internally multiplied PLL clock mode
68 #define PSTP BIT6 // TODO
69 //#define 0 BIT5 // Reserved
70 //#define 0 BIT4 // Reserved
71 #define PLLWAI BIT3 // TODO
72 //#define 0 BIT2 // Reserved
73 #define RTIWAI BIT1 // TODO
74 #define COPWAI BIT0 // TODO
75 
76 // PLLCTL
77 #define CME BIT7 // TODO
78 #define PLLON BIT6 // Mask for turning PLL circuitry on
79 #define PLLAUTO BIT5 // TODO
80 #define ACQ BIT4 // TODO
81 #define FSTWKP BIT3 // TODO
82 #define PRE BIT2 // TODO
83 #define PCE BIT1 // TODO
84 #define SCME BIT0 // TODO
85 
86 // RAMWPC
87 #define RPWE BIT7 // TODO
88 //#define 0 BIT6 // Reserved
89 //#define 0 BIT5 // Reserved
90 //#define 0 BIT4 // Reserved
91 //#define 0 BIT3 // Reserved
92 //#define 0 BIT2 // Reserved
93 #define AVIE BIT1 // TODO
94 #define AVIF BIT0 // TODO
95 
96 // XGMCTL
97 #define XGEM BIT15_16 // TODO
98 #define XGFRZM BIT14_16 // TODO
99 #define XGDBGM BIT13_16 // TODO
100 #define XGSSM BIT12_16 // TODO
101 #define XGFACTM BIT11_16 // TODO
102 //#define 0 BIT10_16 // Reserved
103 #define XGSWEIFM BIT9_16 // TODO
104 #define XGIEM BIT8_16 // TODO
105 #define XGE BIT7_16 // TODO
106 #define XGFRZ BIT6_16 // TODO
107 #define XGDBG BIT5_16 // TODO
108 #define XGSS BIT4_16 // TODO
109 #define XGFACT BIT3_16 // TODO
110 //#define 0 BIT2_16 // Reserved
111 #define XGSWEIF BIT1_16 // TODO
112 #define XGIE BIT0_16 // TODO
113 
114 
115 #else
116  /* let us know if we are being untidy with headers */
117  #warning "Header file 9S12XDP512_FLAGS_H seen before, sort it out!"
118 /* end of the wrapper ifdef from the very top */
119 #endif