1 /* FreeEMS - the open source engine management system
3 * Copyright 2008-2012 Fred Cooke
5 * This file is part of the FreeEMS project.
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.
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.
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/
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!
23 * Thank you for choosing FreeEMS to run your engine!
29 * @brief Static initialisation of non-zero variables
31 * This file contains static initialisations for fields that require a non-zero
32 * initial value after reset. Zero fields are taken care of by GCC and doing
33 * this here means less init time and init code, both good things. Variables
34 * initialised here are placed together by the compiler in flash and copied up
35 * to RAM as a linear block before the main method runs. This is significantly
36 * more efficient than doing them one-by-one in an init routine.
40 #include "inc/freeEMS.h"
44 unsigned short masterPulseWidth
= 10;
46 /* Setup the pointers to the registers for fueling use, this does NOT work if done in global.c, I still don't know why. */
47 // injectorMainTimeRegisters[0] = TC2_ADDR;
48 // injectorMainTimeRegisters[1] = TC3_ADDR;
49 // injectorMainTimeRegisters[2] = TC4_ADDR;
50 // injectorMainTimeRegisters[3] = TC5_ADDR;
51 // injectorMainTimeRegisters[4] = TC6_ADDR;
52 // injectorMainTimeRegisters[5] = TC7_ADDR;
53 // injectorMainControlRegisters[0] = TCTL2_ADDR;
54 // injectorMainControlRegisters[1] = TCTL2_ADDR;
55 // injectorMainControlRegisters[2] = TCTL1_ADDR;
56 // injectorMainControlRegisters[3] = TCTL1_ADDR;
57 // injectorMainControlRegisters[4] = TCTL1_ADDR;
58 // injectorMainControlRegisters[5] = TCTL1_ADDR;
61 #include "xgateGlobals.c"