00001 /* Copyright 2008 Fred Cooke 00002 00003 This file is part of the FreeEMS project. 00004 00005 FreeEMS software is free software: you can redistribute it and/or modify 00006 it under the terms of the GNU General Public License as published by 00007 the Free Software Foundation, either version 3 of the License, or 00008 (at your option) any later version. 00009 00010 FreeEMS software is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License 00016 along with any FreeEMS software. If not, see http://www.gnu.org/licenses/ 00017 00018 We ask that if you make any changes to this file you email them upstream to 00019 us at admin(at)diyefi(dot)org or, even better, fork the code on github.com! 00020 00021 Thank you for choosing FreeEMS to run your engine! */ 00022 00023 00029 /* Header file multiple inclusion protection courtesy eclipse Header Template */ 00030 /* and http://gcc.gnu.org/onlinedocs/gcc-3.1.1/cpp/ C pre processor manual */ 00031 #ifndef FILE_INJECTION_ISRS_H_SEEN 00032 #define FILE_INJECTION_ISRS_H_SEEN 00033 00034 00035 #ifdef EXTERN 00036 #warning "EXTERN already defined by another header, please sort it out!" 00037 #undef EXTERN /* If fail on warning is off, remove the definition such that we can redefine correctly. */ 00038 #endif 00039 00040 00041 #ifdef INJECTIONISRS_C 00042 #define EXTERN 00043 #else 00044 #define EXTERN extern 00045 #endif 00046 00047 00048 /* Staged injector channel bit masks and registers */ 00049 00050 /* Use port K for staged injector output */ 00051 #define STAGEDPORT PORTK 00052 00053 /* Masks for setting and checking stagedOn status var and turning the channel on */ 00054 #define STAGED1ON BIT0 00055 #define STAGED2ON BIT1 00056 #define STAGED3ON BIT2 00057 #define STAGED4ON BIT3 00058 #define STAGED5ON BIT4 00059 #define STAGED6ON BIT5 00060 00061 /* Masks for unsetting stagedOn status var and turning the channel off */ 00062 #define STAGED1OFF NBIT0 00063 #define STAGED2OFF NBIT1 00064 #define STAGED3OFF NBIT2 00065 #define STAGED4OFF NBIT3 00066 #define STAGED5OFF NBIT4 00067 #define STAGED6OFF NBIT5 00068 00069 /* Internal use to decide if staged is actually required or not based on pulsewidth etc */ 00070 unsigned char stagedRequired; 00071 00072 00073 #undef EXTERN 00074 00075 00076 #else 00077 /* let us know if we are being untidy with headers */ 00078 #warning "Header file INJECTION_ISRS_H seen before, sort it out!" 00079 /* end of the wrapper ifdef from the very top */ 00080 #endif