#include "memory.h"
#include "9S12XDP512.h"
#include "errorDefines.h"
#include "globalDefines.h"
#include "structs.h"
#include "tunables.h"
#include "globalConstants.h"
#include "flashGlobals.h"
Include dependency graph for freeEMS.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Data Structures | |
union | Tables1 |
union | Tables2 |
union | Tables3 |
union | Tables4 |
union | LongTime |
Defines | |
#define | EXTERN extern |
#define | COREA01 BIT1_16 |
#define | PRIMARY_SYNC BIT2_16 |
#define | SECONDARY_SYNC BIT3_16 |
#define | ENGINE_PHASE BIT4_16 |
#define | FUEL_CUT BIT5_16 |
#define | HARD_SPARK_CUT BIT6_16 |
#define | SOFT_SPARK_CUT BIT7_16 |
#define | SPARK_RETARD BIT8_16 |
#define | STAGED_REQUIRED BIT9_16 |
#define | CALC_FUEL_IGN BIT10_16 |
#define | FORCE_READING BIT11_16 |
#define | COREA12 BIT12_16 |
#define | COREA13 BIT13_16 |
#define | COREA14 BIT14_16 |
#define | COREA15 BIT15_16 |
#define | COREA16 BIT16_16 |
#define | CLEAR_PRIMARY_SYNC NBIT2_16 |
#define | STAGED_NOT_REQUIRED NBIT9_16 |
#define | CLEAR_CALC_FUEL_IGN NBIT10_16 |
#define | CLEAR_FORCE_READING NBIT11_16 |
Variables | |
EXTERN unsigned short | RPM [IN_OUT_BANKS] |
unsigned char | portHDebounce |
unsigned short | tachoPeriod |
EXTERN Clock | Clocks |
EXTERN Counter | Counters |
EXTERN RuntimeVar | RuntimeVars |
EXTERN ISRLatencyVar | ISRLatencyVars |
EXTERN CoreVar | CoreVars |
EXTERN DerivedVar | DerivedVars |
EXTERN ADCArray | ADCArrays |
EXTERN ADCArray | asyncADCArrays |
EXTERN unsigned char TXBuffer[TX_BUFFER_SIZE] | TXBUF |
EXTERN unsigned char RXBuffer[RX_BUFFER_SIZE] | RXBUF |
EXTERN Tables1 TablesA | RWINDOW |
EXTERN Tables2 TablesB | RWINDOW |
EXTERN Tables3 TablesC | RWINDOW |
EXTERN Tables4 TablesD | RWINDOW |
EXTERN unsigned char | currentFuelRPage |
EXTERN unsigned char | currentTuneRPage |
EXTERN unsigned char | currentTimeRPage |
EXTERN unsigned short | masterPulseWidth |
EXTERN unsigned short | totalDwell |
EXTERN unsigned short | totalAngleAfterReferenceInjection |
EXTERN unsigned short | totalAngleAfterReferenceIgnition |
EXTERN unsigned long | bootFuelConst |
EXTERN unsigned short | TPSMAPRange |
EXTERN unsigned short | TPSADCRange |
EXTERN unsigned short | boundedTPSADC |
EXTERN unsigned short | bootTimeAAP |
EXTERN unsigned short | coreStatusA |
EXTERN unsigned char | recordADCBank |
EXTERN unsigned char | mathInputBank |
EXTERN unsigned char | mathInternalBank |
EXTERN unsigned char | mathInternalInjectionOffset |
EXTERN unsigned char | mathInternalIgnitionOffset |
EXTERN unsigned char | realTimeUseBank |
EXTERN unsigned char | realTimeUseInjectionOffset |
EXTERN unsigned char | realTimeUseIgnitionOffset |
unsigned short | timerExtensionClock |
EXTERN unsigned char | mainOn |
EXTERN unsigned short | dwellOn |
EXTERN unsigned char | stagedOn |
EXTERN unsigned char | selfSetTimer |
EXTERN unsigned char | rescheduleFuelFlags |
EXTERN unsigned short | primaryPulsesPerSecondaryPulse |
EXTERN unsigned short | primaryPulsesPerSecondaryPulseBuffer |
EXTERN unsigned short | primaryLeadingEdgeTimeStamp |
EXTERN unsigned short | primaryTrailingEdgeTimeStamp |
EXTERN unsigned short | timeBetweenSuccessivePrimaryPulses |
EXTERN unsigned short | timeBetweenSuccessivePrimaryPulsesBuffer |
EXTERN unsigned short | lastPrimaryPulseTimeStamp |
EXTERN unsigned long | engineCyclePeriod |
EXTERN unsigned long | lastSecondaryOddTimeStamp |
EXTERN unsigned short | primaryTeethDroppedFromLackOfSync |
EXTERN unsigned char | dwellQueueLength |
EXTERN unsigned char | ignitionQueueLength |
EXTERN unsigned short | currentDwell [IN_OUT_BANKS] |
EXTERN unsigned char | nextDwellChannel |
EXTERN unsigned char | nextIgnitionChannel |
EXTERN unsigned short | ignitionAdvances [IGNITION_CHANNELS *2] |
EXTERN unsigned short | queuedDwellOffsets [IGNITION_CHANNELS] |
EXTERN unsigned short | queuedIgnitionOffsets [IGNITION_CHANNELS] |
EXTERN volatile unsigned short *volatile | injectorMainTimeRegisters [INJECTION_CHANNELS] |
EXTERN volatile unsigned char *volatile | injectorMainControlRegisters [INJECTION_CHANNELS] |
EXTERN unsigned short | injectorMainStartTimesHolding [INJECTION_CHANNELS] |
EXTERN unsigned long | injectorMainEndTimes [INJECTION_CHANNELS] |
EXTERN unsigned short | injectorCodeOpenRuntimes [INJECTION_CHANNELS] |
EXTERN unsigned short | injectorCodeCloseRuntimes [INJECTION_CHANNELS] |
EXTERN unsigned short | injectorMainPulseWidths [INJECTION_CHANNELS *2] |
EXTERN unsigned short | injectorStagedPulseWidths [INJECTION_CHANNELS *2] |
EXTERN unsigned short | injectorCodeLatencies [INJECTION_CHANNELS] |
#define CALC_FUEL_IGN BIT10_16 |
#define CLEAR_CALC_FUEL_IGN NBIT10_16 |
#define CLEAR_FORCE_READING NBIT11_16 |
#define CLEAR_PRIMARY_SYNC NBIT2_16 |
Definition at line 210 of file freeEMS.h.
Referenced by PrimaryRPMISR(), resetToNonRunningState(), and SecondaryRPMISR().
#define FORCE_READING BIT11_16 |
#define PRIMARY_SYNC BIT2_16 |
#define STAGED_NOT_REQUIRED NBIT9_16 |
#define STAGED_REQUIRED BIT9_16 |
Definition at line 201 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), and InjectorXISR().
Definition at line 91 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), generateCoreVars(), main(), and PrimaryRPMISR().
EXTERN ADCArray asyncADCArrays |
EXTERN unsigned long bootFuelConst |
Definition at line 181 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), and initConfiguration().
EXTERN unsigned short bootTimeAAP |
EXTERN unsigned short boundedTPSADC |
Definition at line 83 of file freeEMS.h.
Referenced by initStats(), main(), PrimaryRPMISR(), and RTIISR().
EXTERN unsigned short coreStatusA |
Definition at line 191 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), initVariables(), InjectorXISR(), main(), PrimaryRPMISR(), resetToNonRunningState(), RTIISR(), and SecondaryRPMISR().
Definition at line 88 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), generateCoreVars(), and generateDerivedVars().
Definition at line 84 of file freeEMS.h.
Referenced by initStats(), IRQISR(), LowVoltageISR(), main(), PortJISR(), PortPISR(), PrimaryRPMISR(), SCI0ISR(), SecondaryRPMISR(), UISR(), and XIRQISR().
EXTERN unsigned short currentDwell[IN_OUT_BANKS] |
EXTERN unsigned char currentFuelRPage |
Definition at line 153 of file freeEMS.h.
Referenced by decodePacketAndBuildResponse(), generateDerivedVars(), and setupPagedRAM().
EXTERN unsigned char currentTimeRPage |
EXTERN unsigned char currentTuneRPage |
EXTERN DerivedVar DerivedVars |
Definition at line 89 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), and generateDerivedVars().
EXTERN unsigned short dwellOn |
EXTERN unsigned char dwellQueueLength |
Definition at line 281 of file freeEMS.h.
Referenced by IgnitionDwellISR(), initVariables(), and PrimaryRPMISR().
EXTERN unsigned long engineCyclePeriod |
Definition at line 274 of file freeEMS.h.
Referenced by initVariables(), ModDownCtrISR(), PrimaryRPMISR(), resetToNonRunningState(), and SecondaryRPMISR().
EXTERN unsigned short ignitionAdvances[IGNITION_CHANNELS *2] |
EXTERN unsigned char ignitionQueueLength |
Definition at line 282 of file freeEMS.h.
Referenced by IgnitionFireISR(), initVariables(), and PrimaryRPMISR().
EXTERN unsigned short injectorCodeCloseRuntimes[INJECTION_CHANNELS] |
EXTERN unsigned short injectorCodeLatencies[INJECTION_CHANNELS] |
EXTERN unsigned short injectorCodeOpenRuntimes[INJECTION_CHANNELS] |
EXTERN volatile unsigned char* volatile injectorMainControlRegisters[INJECTION_CHANNELS] |
Definition at line 295 of file freeEMS.h.
Referenced by initVariables(), InjectorXISR(), and PrimaryRPMISR().
EXTERN unsigned long injectorMainEndTimes[INJECTION_CHANNELS] |
EXTERN unsigned short injectorMainPulseWidths[INJECTION_CHANNELS *2] |
Definition at line 307 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), InjectorXISR(), and PrimaryRPMISR().
EXTERN unsigned short injectorMainStartTimesHolding[INJECTION_CHANNELS] |
EXTERN volatile unsigned short* volatile injectorMainTimeRegisters[INJECTION_CHANNELS] |
Definition at line 294 of file freeEMS.h.
Referenced by initVariables(), InjectorXISR(), and PrimaryRPMISR().
EXTERN unsigned short injectorStagedPulseWidths[INJECTION_CHANNELS *2] |
EXTERN ISRLatencyVar ISRLatencyVars |
Definition at line 86 of file freeEMS.h.
Referenced by main(), PrimaryRPMISR(), and SecondaryRPMISR().
EXTERN unsigned short lastPrimaryPulseTimeStamp |
EXTERN unsigned long lastSecondaryOddTimeStamp |
EXTERN unsigned char mainOn |
EXTERN unsigned short masterPulseWidth |
Definition at line 176 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), initVariables(), and PrimaryRPMISR().
EXTERN unsigned char mathInputBank |
Definition at line 228 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), generateCoreVars(), initVariables(), and main().
EXTERN unsigned char mathInternalBank |
Definition at line 233 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), generateCoreVars(), generateDerivedVars(), initVariables(), and main().
EXTERN unsigned char mathInternalIgnitionOffset |
Definition at line 235 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), initVariables(), and main().
EXTERN unsigned char mathInternalInjectionOffset |
Definition at line 234 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), initVariables(), and main().
EXTERN unsigned char nextDwellChannel |
EXTERN unsigned char nextIgnitionChannel |
unsigned char portHDebounce |
EXTERN unsigned short primaryLeadingEdgeTimeStamp |
EXTERN unsigned short primaryPulsesPerSecondaryPulse |
Definition at line 267 of file freeEMS.h.
Referenced by initVariables(), PrimaryRPMISR(), and SecondaryRPMISR().
EXTERN unsigned short primaryPulsesPerSecondaryPulseBuffer |
EXTERN unsigned short primaryTeethDroppedFromLackOfSync |
EXTERN unsigned short primaryTrailingEdgeTimeStamp |
EXTERN unsigned short queuedDwellOffsets[IGNITION_CHANNELS] |
EXTERN unsigned short queuedIgnitionOffsets[IGNITION_CHANNELS] |
EXTERN unsigned char realTimeUseBank |
EXTERN unsigned char realTimeUseIgnitionOffset |
EXTERN unsigned char realTimeUseInjectionOffset |
Definition at line 239 of file freeEMS.h.
Referenced by initVariables(), InjectorXISR(), and main().
EXTERN unsigned char recordADCBank |
Definition at line 227 of file freeEMS.h.
Referenced by initVariables(), main(), PrimaryRPMISR(), resetToNonRunningState(), sampleEachADC(), and sampleLoopADC().
EXTERN unsigned char rescheduleFuelFlags |
EXTERN unsigned short RPM[IN_OUT_BANKS] |
Definition at line 77 of file freeEMS.h.
Referenced by generateCoreVars(), PrimaryRPMISR(), and resetToNonRunningState().
EXTERN RuntimeVar RuntimeVars |
Definition at line 85 of file freeEMS.h.
Referenced by main(), PrimaryRPMISR(), RTIISR(), SCI0ISR(), and SecondaryRPMISR().
EXTERN unsigned char selfSetTimer |
Definition at line 260 of file freeEMS.h.
Referenced by initVariables(), InjectorXISR(), and PrimaryRPMISR().
EXTERN unsigned char stagedOn |
unsigned short tachoPeriod |
EXTERN unsigned short timeBetweenSuccessivePrimaryPulses |
EXTERN unsigned short timeBetweenSuccessivePrimaryPulsesBuffer |
unsigned short timerExtensionClock |
Definition at line 245 of file freeEMS.h.
Referenced by InjectorXISR(), PrimaryRPMISR(), SecondaryRPMISR(), and TimerOverflow().
EXTERN unsigned short totalAngleAfterReferenceIgnition |
EXTERN unsigned short totalAngleAfterReferenceInjection |
Definition at line 178 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), initVariables(), and PrimaryRPMISR().
EXTERN unsigned short totalDwell |
EXTERN unsigned short TPSADCRange |
Definition at line 183 of file freeEMS.h.
Referenced by generateCoreVars(), and initConfiguration().
EXTERN unsigned short TPSMAPRange |
Definition at line 182 of file freeEMS.h.
Referenced by generateCoreVars(), and initConfiguration().