staticInit.c

Go to the documentation of this file.
00001 /*      staticInit.c
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 
00025 #include "inc/freeEMS.h"
00026 
00027 //unsigned char asyncDatalogType = asyncDatalogBasic;
00028 unsigned char asyncDatalogType = asyncDatalogBasic;
00029 
00030 unsigned short tachoPeriod = 65535;     /* Lowest RPM at start up time. */
00031 
00032 // Values for testing
00033 unsigned short masterPulseWidth = 10;
00034 unsigned short totalAngleAfterReferenceIgnition = 540;
00035 unsigned short totalAngleAfterReferenceInjection = 180;
00036 
00037         /* Setup the pointers to the registers for fueling use, this does NOT work if done in global.c, I still don't know why. */
00038 //      injectorMainTimeRegisters[0] = TC2_ADDR;
00039 //      injectorMainTimeRegisters[1] = TC3_ADDR;
00040 //      injectorMainTimeRegisters[2] = TC4_ADDR;
00041 //      injectorMainTimeRegisters[3] = TC5_ADDR;
00042 //      injectorMainTimeRegisters[4] = TC6_ADDR;
00043 //      injectorMainTimeRegisters[5] = TC7_ADDR;
00044 //      injectorMainControlRegisters[0] = TCTL2_ADDR;
00045 //      injectorMainControlRegisters[1] = TCTL2_ADDR;
00046 //      injectorMainControlRegisters[2] = TCTL1_ADDR;
00047 //      injectorMainControlRegisters[3] = TCTL1_ADDR;
00048 //      injectorMainControlRegisters[4] = TCTL1_ADDR;
00049 //      injectorMainControlRegisters[5] = TCTL1_ADDR;
00050 
00051         // TODO perhaps read from the ds1302 once at start up and init the values or different ones with the actual time and date then update them in RTI
00052 
00053 /* Setup so that the tacho reads low when the engine isn't running */
00054 unsigned long engineCyclePeriod = ticksPerCycleAtOneRPM;

Generated on Mon Dec 22 21:29:18 2008 for freeems by  doxygen 1.5.2