Removed an empty header file, documented all header files that required it, added...
[freeems-vanilla.git] / src / inc / injectionISRs.h
blob278e8e1aa632954c28f738917d7fae13caae0e69
1 /* Copyright 2008 Fred Cooke
3 This file is part of the FreeEMS project.
5 FreeEMS software is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 FreeEMS software is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with any FreeEMS software. If not, see http://www.gnu.org/licenses/
18 We ask that if you make any changes to this file you email them upstream to
19 us at admin(at)diyefi(dot)org or, even better, fork the code on github.com!
21 Thank you for choosing FreeEMS to run your engine! */
24 /** @file injectionISRs.h
25 * @ingroup allHeaders
29 /* Header file multiple inclusion protection courtesy eclipse Header Template */
30 /* and http://gcc.gnu.org/onlinedocs/gcc-3.1.1/cpp/ C pre processor manual */
31 #ifndef FILE_INJECTION_ISRS_H_SEEN
32 #define FILE_INJECTION_ISRS_H_SEEN
35 #ifdef EXTERN
36 #warning "EXTERN already defined by another header, please sort it out!"
37 #undef EXTERN /* If fail on warning is off, remove the definition such that we can redefine correctly. */
38 #endif
41 #ifdef INJECTIONISRS_C
42 #define EXTERN
43 #else
44 #define EXTERN extern
45 #endif
48 /* Staged injector channel bit masks and registers */
50 /* Use port K for staged injector output */
51 #define STAGEDPORT PORTK
53 /* Masks for setting and checking stagedOn status var and turning the channel on */
54 #define STAGED1ON BIT0
55 #define STAGED2ON BIT1
56 #define STAGED3ON BIT2
57 #define STAGED4ON BIT3
58 #define STAGED5ON BIT4
59 #define STAGED6ON BIT5
61 /* Masks for unsetting stagedOn status var and turning the channel off */
62 #define STAGED1OFF NBIT0
63 #define STAGED2OFF NBIT1
64 #define STAGED3OFF NBIT2
65 #define STAGED4OFF NBIT3
66 #define STAGED5OFF NBIT4
67 #define STAGED6OFF NBIT5
69 /* Internal use to decide if staged is actually required or not based on pulsewidth etc */
70 unsigned char stagedRequired;
73 #undef EXTERN
76 #else
77 /* let us know if we are being untidy with headers */
78 #warning "Header file INJECTION_ISRS_H seen before, sort it out!"
79 /* end of the wrapper ifdef from the very top */
80 #endif