FreeEMS
0.2.0-SNAPSHOT-285-g028e24c
|
The main project header file. More...
#include "memory.h"
#include "9S12XDP512.h"
#include "flashGlobals.h"
#include "systemConfig.h"
#include "errorDefines.h"
#include "globalDefines.h"
#include "scalerDefines.h"
#include "constantsLibrary.h"
#include "9S12XDP512flags.h"
#include "generalTypes.h"
#include "counterTypes.h"
#include "containerTypes.h"
#include "tableTypes.h"
#include "FixedConfigs.h"
#include "TunableConfigs.h"
#include "typeChecks.h"
#include "globalConstants.h"
Go to the source code of this file.
Data Structures | |
union | Tables1 |
main adc storage area for syncronous sampling in the engine position ISR or injection ISR or ignition ISR etc. More... | |
union | Tables2 |
union | Tables3 |
union | Tables4 |
union | LongTime |
Macros | |
#define | EXTERN extern |
include "registerMasks.h | |
#define | FUEL_PUMP_PRIME BIT0 /* 0 */ |
#define | STAGED_REQUIRED BIT1 /* 1 Fire the staged injectors */ |
#define | CALC_FUEL_IGN BIT2 /* 2 Fuel and ignition require calculation (i.e. variables have been updated) */ |
#define | FORCE_READING BIT3 /* 3 Flag to force ADC sampling at low rpm/stall */ |
#define | BENCH_TEST_ON BIT4 /* 4 Bench test running TEMPORARY */ |
#define | COREA05 BIT5 /* 5 */ |
#define | COREA06 BIT6 /* 6 */ |
#define | COREA07 BIT7 /* 7 */ |
#define | CLEAR_FUEL_PUMP_PRIME NBIT0 /* */ |
#define | STAGED_NOT_REQUIRED NBIT1 /* 9 Do not fire the staged injectors */ |
#define | CLEAR_CALC_FUEL_IGN NBIT2 /* 10 Fuel and ignition don't require calculation */ |
#define | CLEAR_FORCE_READING NBIT3 /* 11 Clear flag to force ADC sampling at low rpm/stall */ |
#define | CLEAR_BENCH_TEST_ON NBIT4 |
#define | DECODER_BENCHMARKS FALSE |
#define | DEBUG_TURN_PIN_ON(BENCHMARK_ENABLED, PIN_ON_MASK, PORT_ADDRESS) |
This macro turns a pin ON based on an enable flag, a port address and a pin mask for that port. | |
#define | DEBUG_TURN_PIN_OFF(BENCHMARK_ENABLED, PIN_OFF_MASK, PORT_ADDRESS) |
This macro turns a pin OFF based on an enable flag, a port address and a pin mask for that port. |
Variables | |
EXTERN unsigned char | portHDebounce |
EXTERN Clock | Clocks |
Timer Clocks for various functions. | |
EXTERN Counter | Counters |
Execution count for various blocks of code. | |
EXTERN KeyUserDebug | KeyUserDebugs |
Formalised key logging vars in one place. | |
EXTERN Flaggable | Flaggables |
The single instance of our flaggable struct. | |
EXTERN Flaggable2 | Flaggables2 |
The single instance of our flaggable2 struct. | |
EXTERN CoreVar * | CoreVars |
EXTERN CoreVar | CoreVars0 |
Pointer to the core running variables. | |
EXTERN DerivedVar * | DerivedVars |
Bank 0 core running variables. | |
EXTERN DerivedVar | DerivedVars0 |
Pointer to the secondary running variables. | |
EXTERN ADCBuffer * | ADCBuffers |
Bank 0 secondary running variables. | |
EXTERN ADCBuffer * | ADCBuffersRecord |
main adc storage area for syncronous sampling in the engine position ISR or injection ISR or ignition ISR etc. | |
EXTERN ADCBuffer | ADCBuffers0 |
main adc storage area for syncronous sampling in the engine position ISR or injection ISR or ignition ISR etc. | |
EXTERN ADCBuffer | ADCBuffers1 |
main adc storage area for syncronous sampling in the engine position ISR or injection ISR or ignition ISR etc. | |
EXTERN unsigned char TXBuffer[TX_BUFFER_SIZE] | TXBUF |
EXTERN unsigned char RXBuffer[RX_BUFFER_SIZE] | RXBUF |
EXTERN Tables1 TablesA | RWINDOW |
EXTERN unsigned char | currentFuelRPage |
EXTERN unsigned char | currentTuneRPage |
EXTERN unsigned char | currentTimeRPage |
unsigned short | masterPulseWidth |
EXTERN unsigned long | bootFuelConst |
EXTERN unsigned short | TPSADCRange |
EXTERN unsigned char | coreStatusA |
unsigned short | timerExtensionClock |
The main project header file.
The central header for all source files to include. This pulls in the device header, all other shared headers, all global defines, all global constant declarations, all type definitions and all global variables. Other variables that are actually in global space but only shared between a few select files should be placed in the header for the main file that uses them.
Definition in file freeEMS.h.
#define EXTERN extern |
#define FUEL_PUMP_PRIME BIT0 /* 0 */ |
Definition at line 267 of file freeEMS.h.
Referenced by initVariables(), and RTIISR().
#define STAGED_REQUIRED BIT1 /* 1 Fire the staged injectors */ |
#define CALC_FUEL_IGN BIT2 /* 2 Fuel and ignition require calculation (i.e. variables have been updated) */ |
Definition at line 269 of file freeEMS.h.
Referenced by main(), PrimaryRPMISR(), and SecondaryRPMISR().
#define FORCE_READING BIT3 /* 3 Flag to force ADC sampling at low rpm/stall */ |
#define BENCH_TEST_ON BIT4 /* 4 Bench test running TEMPORARY */ |
Definition at line 271 of file freeEMS.h.
Referenced by decodePacketAndRespond().
#define CLEAR_FUEL_PUMP_PRIME NBIT0 /* */ |
#define STAGED_NOT_REQUIRED NBIT1 /* 9 Do not fire the staged injectors */ |
#define CLEAR_CALC_FUEL_IGN NBIT2 /* 10 Fuel and ignition don't require calculation */ |
#define CLEAR_FORCE_READING NBIT3 /* 11 Clear flag to force ADC sampling at low rpm/stall */ |
#define CLEAR_BENCH_TEST_ON NBIT4 |
Definition at line 281 of file freeEMS.h.
Referenced by PrimaryRPMISR().
#define DECODER_BENCHMARKS FALSE |
Definition at line 291 of file freeEMS.h.
Referenced by InjectorXISR(), IRQISR(), LowVoltageISR(), PLLLockISR(), PortHISR(), PortJISR(), PortPISR(), PrimaryRPMISR(), RAMViolationISR(), RTIISR(), SCI0ISR(), SecondaryRPMISR(), SelfClockISR(), SpuriousISR(), TimerOverflow(), UISR(), UnimplOpcodeISR(), XGATEErrorISR(), and XIRQISR().
#define DEBUG_TURN_PIN_ON | ( | BENCHMARK_ENABLED, | |
PIN_ON_MASK, | |||
PORT_ADDRESS | |||
) |
This macro turns a pin ON based on an enable flag, a port address and a pin mask for that port.
It is used to keep the code clean and free from ifdefs whilst allowing a developer to turn on benchmarking outputs very easily. Note that it gets optimised out due to the constant literal conditional required.
Definition at line 303 of file freeEMS.h.
Referenced by InjectorXISR(), IRQISR(), LowVoltageISR(), PLLLockISR(), PortHISR(), PortJISR(), PortPISR(), PrimaryRPMISR(), RAMViolationISR(), RTIISR(), SCI0ISR(), SecondaryRPMISR(), SelfClockISR(), SpuriousISR(), TimerOverflow(), UISR(), UnimplOpcodeISR(), XGATEErrorISR(), and XIRQISR().
#define DEBUG_TURN_PIN_OFF | ( | BENCHMARK_ENABLED, | |
PIN_OFF_MASK, | |||
PORT_ADDRESS | |||
) |
This macro turns a pin OFF based on an enable flag, a port address and a pin mask for that port.
It is used to keep the code clean and free from ifdefs whilst allowing a developer to turn on benchmarking outputs very easily. Note that it gets optimised out due to the constant literal conditional required.
Definition at line 314 of file freeEMS.h.
Referenced by InjectorXISR(), IRQISR(), LowVoltageISR(), PLLLockISR(), PortHISR(), PortJISR(), PortPISR(), PrimaryRPMISR(), RAMViolationISR(), RTIISR(), SCI0ISR(), SecondaryRPMISR(), SelfClockISR(), SpuriousISR(), TimerOverflow(), UISR(), UnimplOpcodeISR(), XGATEErrorISR(), and XIRQISR().
EXTERN unsigned char portHDebounce |
Definition at line 115 of file freeEMS.h.
Referenced by PortHISR(), and RTIISR().
Timer Clocks for various functions.
Definition at line 119 of file freeEMS.h.
Referenced by decodePacketAndRespond(), lookupBlockDetails(), populateBasicDatalog(), PrimaryRPMISR(), RTIISR(), and SecondaryRPMISR().
Execution count for various blocks of code.
Definition at line 120 of file freeEMS.h.
Referenced by decodePacketAndRespond(), InjectorXISR(), lookupBlockDetails(), main(), PrimaryRPMISR(), scheduleOutputs(), schedulePortTPin(), and SecondaryRPMISR().
EXTERN KeyUserDebug KeyUserDebugs |
Formalised key logging vars in one place.
Definition at line 121 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), decodePacketAndRespond(), lookupBlockDetails(), PLLLockISR(), populateBasicDatalog(), PrimaryRPMISR(), resetToNonRunningState(), scheduleOutputs(), SCI0ISR(), SecondaryRPMISR(), and SelfClockISR().
The single instance of our flaggable struct.
Definition at line 122 of file freeEMS.h.
Referenced by decodePacketAndRespond(), and lookupBlockDetails().
EXTERN Flaggable2 Flaggables2 |
The single instance of our flaggable2 struct.
Definition at line 123 of file freeEMS.h.
Referenced by decodePacketAndRespond(), and lookupBlockDetails().
Definition at line 158 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), decodePacketAndRespond(), generateCoreVars(), generateDerivedVars(), initVariables(), lookupBlockDetails(), main(), PrimaryRPMISR(), RTIISR(), and scheduleOutputs().
Pointer to the core running variables.
Definition at line 159 of file freeEMS.h.
Referenced by initVariables().
EXTERN DerivedVar* DerivedVars |
Bank 0 core running variables.
Definition at line 162 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), decodePacketAndRespond(), generateDerivedVars(), initVariables(), lookupBlockDetails(), main(), and scheduleOutputs().
EXTERN DerivedVar DerivedVars0 |
Pointer to the secondary running variables.
Definition at line 163 of file freeEMS.h.
Referenced by initVariables().
Bank 0 secondary running variables.
Definition at line 166 of file freeEMS.h.
Referenced by generateCoreVars(), initVariables(), lookupBlockDetails(), main(), PrimaryRPMISR(), and SecondaryRPMISR().
main adc storage area for syncronous sampling in the engine position ISR or injection ISR or ignition ISR etc.
Definition at line 167 of file freeEMS.h.
Referenced by initVariables(), and main().
main adc storage area for syncronous sampling in the engine position ISR or injection ISR or ignition ISR etc.
Definition at line 168 of file freeEMS.h.
Referenced by initVariables(), and main().
main adc storage area for syncronous sampling in the engine position ISR or injection ISR or ignition ISR etc.
Definition at line 169 of file freeEMS.h.
Referenced by initVariables(), and main().
EXTERN unsigned char TXBuffer [TX_BUFFER_SIZE] TXBUF |
EXTERN unsigned char RXBuffer [RX_BUFFER_SIZE] RXBUF |
EXTERN unsigned char currentFuelRPage |
Definition at line 225 of file freeEMS.h.
Referenced by setupPagedRAM().
EXTERN unsigned char currentTuneRPage |
Definition at line 226 of file freeEMS.h.
Referenced by setupPagedRAM().
EXTERN unsigned char currentTimeRPage |
Definition at line 227 of file freeEMS.h.
Referenced by setupPagedRAM().
unsigned short masterPulseWidth |
Definition at line 44 of file staticInit.c.
Referenced by calculateFuelAndIgnition(), and scheduleOutputs().
EXTERN unsigned long bootFuelConst |
Definition at line 258 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), and initConfiguration().
EXTERN unsigned short TPSADCRange |
Definition at line 259 of file freeEMS.h.
Referenced by generateCoreVars(), and initConfiguration().
EXTERN unsigned char coreStatusA |
Definition at line 265 of file freeEMS.h.
Referenced by decodePacketAndRespond(), initVariables(), main(), populateBasicDatalog(), PrimaryRPMISR(), RTIISR(), SCI0ISR(), and SecondaryRPMISR().
unsigned short timerExtensionClock |
Definition at line 285 of file freeEMS.h.
Referenced by InjectorXISR(), main(), PrimaryRPMISR(), SecondaryRPMISR(), and TimerOverflow().