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