#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 | asyncDatalogOff 0x00 |
#define | asyncDatalogBasic 0x01 |
#define | asyncDatalogConfig 0x02 |
#define | asyncDatalogLogic 0x03 |
#define | asyncDatalogADC 0x04 |
#define | asyncDatalogCircBuf 0x05 |
#define | asyncDatalogCircCAS 0x06 |
#define | asyncDatalogTrigger 0x07 |
#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 | RPM0 |
EXTERN unsigned short | RPM1 |
unsigned short | tachoPeriod |
EXTERN unsigned char | portHDebounce |
unsigned char | asyncDatalogType |
EXTERN unsigned short | configuredBasicDatalogLength |
EXTERN void * | memdumpaddr |
EXTERN unsigned char | ShouldSendLog |
EXTERN Clock | Clocks |
EXTERN Counter | Counters |
EXTERN RuntimeVar | RuntimeVars |
EXTERN ISRLatencyVar | ISRLatencyVars |
EXTERN CoreVar * | CoreVars |
EXTERN CoreVar | CoreVars0 |
EXTERN DerivedVar * | DerivedVars |
EXTERN DerivedVar | DerivedVars0 |
EXTERN ADCArray * | ADCArrays |
EXTERN ADCArray * | ADCArraysRecord |
EXTERN ADCArray | ADCArrays0 |
EXTERN ADCArray | ADCArrays1 |
EXTERN ADCArray * | asyncADCArrays |
EXTERN ADCArray * | asyncADCArraysRecord |
EXTERN ADCArray | asyncADCArrays0 |
EXTERN ADCArray | asyncADCArrays1 |
EXTERN unsigned short * | mathSampleTimeStamp |
EXTERN unsigned short * | mathSampleTimeStampRecord |
EXTERN unsigned short * | RPM |
EXTERN unsigned short * | RPMRecord |
EXTERN unsigned short * | currentDwellMath |
EXTERN unsigned short * | currentDwellRealtime |
EXTERN unsigned short | currentDwell0 |
EXTERN unsigned short | currentDwell1 |
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 void * | VETableMainFlashLocation |
EXTERN void * | VETableMainFlash2Location |
EXTERN void * | VETableSecondaryFlashLocation |
EXTERN void * | VETableSecondaryFlash2Location |
EXTERN void * | VETableTertiaryFlashLocation |
EXTERN void * | VETableTertiaryFlash2Location |
EXTERN void * | LambdaTableFlashLocation |
EXTERN void * | LambdaTableFlash2Location |
EXTERN void * | IgnitionAdvanceTableMainFlashLocation |
EXTERN void * | IgnitionAdvanceTableMainFlash2Location |
EXTERN void * | IgnitionAdvanceTableSecondaryFlashLocation |
EXTERN void * | IgnitionAdvanceTableSecondaryFlash2Location |
EXTERN void * | InjectionAdvanceTableMainFlashLocation |
EXTERN void * | InjectionAdvanceTableMainFlash2Location |
EXTERN void * | InjectionAdvanceTableSecondaryFlashLocation |
EXTERN void * | InjectionAdvanceTableSecondaryFlash2Location |
EXTERN void * | SmallTablesAFlashLocation |
EXTERN void * | SmallTablesAFlash2Location |
EXTERN void * | SmallTablesBFlashLocation |
EXTERN void * | SmallTablesBFlash2Location |
EXTERN void * | SmallTablesCFlashLocation |
EXTERN void * | SmallTablesCFlash2Location |
EXTERN void * | SmallTablesDFlashLocation |
EXTERN void * | SmallTablesDFlash2Location |
EXTERN void * | IATTransferTableLocation |
EXTERN void * | CHTTransferTableLocation |
EXTERN void * | MAFTransferTableLocation |
EXTERN void * | TestTransferTableLocation |
unsigned short | masterPulseWidth |
* Pointers to SmallTablesB */ | |
EXTERN unsigned short | totalDwell |
unsigned short | totalAngleAfterReferenceInjection |
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 |
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 |
unsigned long | engineCyclePeriod |
EXTERN unsigned long | lastSecondaryOddTimeStamp |
EXTERN unsigned short | primaryTeethDroppedFromLackOfSync |
EXTERN unsigned char | dwellQueueLength |
EXTERN unsigned char | ignitionQueueLength |
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 * | injectorMainPulseWidthsMath |
EXTERN unsigned short * | injectorStagedPulseWidthsMath |
EXTERN unsigned short * | injectorMainPulseWidthsRealtime |
EXTERN unsigned short * | injectorStagedPulseWidthsRealtime |
EXTERN unsigned short | injectorMainPulseWidths0 [INJECTION_CHANNELS] |
EXTERN unsigned short | injectorMainPulseWidths1 [INJECTION_CHANNELS] |
EXTERN unsigned short | injectorStagedPulseWidths0 [INJECTION_CHANNELS] |
EXTERN unsigned short | injectorStagedPulseWidths1 [INJECTION_CHANNELS] |
EXTERN unsigned short | injectorCodeLatencies [INJECTION_CHANNELS] |
#define asyncDatalogBasic 0x01 |
#define asyncDatalogOff 0x00 |
#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 332 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 323 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), and InjectorXISR().
Definition at line 145 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), generateCoreVars(), initVariables(), main(), PrimaryRPMISR(), and sendDebugInternal().
EXTERN ADCArray ADCArrays0 |
EXTERN ADCArray ADCArrays1 |
EXTERN ADCArray* ADCArraysRecord |
EXTERN ADCArray* asyncADCArrays |
EXTERN ADCArray asyncADCArrays0 |
EXTERN ADCArray asyncADCArrays1 |
EXTERN ADCArray* asyncADCArraysRecord |
unsigned char asyncDatalogType |
EXTERN unsigned long bootFuelConst |
Definition at line 303 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), and initConfiguration().
EXTERN unsigned short bootTimeAAP |
EXTERN unsigned short boundedTPSADC |
EXTERN void* CHTTransferTableLocation |
Definition at line 251 of file freeEMS.h.
Referenced by initLookupAddresses(), and lookupBlockDetails().
EXTERN unsigned short configuredBasicDatalogLength |
Definition at line 92 of file freeEMS.h.
Referenced by decodePacketAndRespond(), initVariables(), main(), and sendDebugInternal().
EXTERN unsigned short coreStatusA |
Definition at line 313 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), InjectorXISR(), main(), PrimaryRPMISR(), resetToNonRunningState(), RTIISR(), and SecondaryRPMISR().
Definition at line 137 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), generateCoreVars(), generateDerivedVars(), initVariables(), and sendDebugInternal().
Definition at line 101 of file freeEMS.h.
Referenced by IRQISR(), LowVoltageISR(), main(), PortJISR(), PortPISR(), PrimaryRPMISR(), SCI0ISR(), SecondaryRPMISR(), sendDebugIfClear(), sendErrorIfClear(), UISR(), and XIRQISR().
EXTERN unsigned short currentDwell0 |
EXTERN unsigned short currentDwell1 |
EXTERN unsigned short* currentDwellMath |
Definition at line 159 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), initVariables(), and main().
EXTERN unsigned short* currentDwellRealtime |
EXTERN unsigned char currentFuelRPage |
EXTERN unsigned char currentTimeRPage |
EXTERN unsigned char currentTuneRPage |
EXTERN DerivedVar* DerivedVars |
Definition at line 141 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), generateDerivedVars(), initVariables(), and sendDebugInternal().
EXTERN DerivedVar DerivedVars0 |
EXTERN unsigned char dwellQueueLength |
unsigned long engineCyclePeriod |
Definition at line 54 of file staticInit.c.
Referenced by ModDownCtrISR(), PrimaryRPMISR(), resetToNonRunningState(), and SecondaryRPMISR().
EXTERN void* IATTransferTableLocation |
Definition at line 250 of file freeEMS.h.
Referenced by initLookupAddresses(), and lookupBlockDetails().
EXTERN unsigned short ignitionAdvances[IGNITION_CHANNELS *2] |
EXTERN void* IgnitionAdvanceTableMainFlash2Location |
Definition at line 233 of file freeEMS.h.
Referenced by initPagedRAMTime(), and lookupBlockDetails().
EXTERN void* IgnitionAdvanceTableMainFlashLocation |
Definition at line 232 of file freeEMS.h.
Referenced by initPagedRAMTime(), and lookupBlockDetails().
EXTERN void* IgnitionAdvanceTableSecondaryFlash2Location |
Definition at line 235 of file freeEMS.h.
Referenced by initPagedRAMTime(), and lookupBlockDetails().
EXTERN void* IgnitionAdvanceTableSecondaryFlashLocation |
Definition at line 234 of file freeEMS.h.
Referenced by initPagedRAMTime(), and lookupBlockDetails().
EXTERN unsigned char ignitionQueueLength |
EXTERN void* InjectionAdvanceTableMainFlash2Location |
Definition at line 237 of file freeEMS.h.
Referenced by initPagedRAMTime(), and lookupBlockDetails().
EXTERN void* InjectionAdvanceTableMainFlashLocation |
Definition at line 236 of file freeEMS.h.
Referenced by initPagedRAMTime(), and lookupBlockDetails().
EXTERN void* InjectionAdvanceTableSecondaryFlash2Location |
Definition at line 239 of file freeEMS.h.
Referenced by initPagedRAMTime(), and lookupBlockDetails().
EXTERN void* InjectionAdvanceTableSecondaryFlashLocation |
Definition at line 238 of file freeEMS.h.
Referenced by initPagedRAMTime(), and lookupBlockDetails().
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 389 of file freeEMS.h.
Referenced by initVariables(), InjectorXISR(), and PrimaryRPMISR().
EXTERN unsigned long injectorMainEndTimes[INJECTION_CHANNELS] |
EXTERN unsigned short injectorMainPulseWidths0[INJECTION_CHANNELS] |
EXTERN unsigned short injectorMainPulseWidths1[INJECTION_CHANNELS] |
EXTERN unsigned short* injectorMainPulseWidthsMath |
Definition at line 401 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), initVariables(), and main().
EXTERN unsigned short* injectorMainPulseWidthsRealtime |
Definition at line 403 of file freeEMS.h.
Referenced by initVariables(), InjectorXISR(), main(), and PrimaryRPMISR().
EXTERN unsigned short injectorMainStartTimesHolding[INJECTION_CHANNELS] |
EXTERN volatile unsigned short* volatile injectorMainTimeRegisters[INJECTION_CHANNELS] |
Definition at line 388 of file freeEMS.h.
Referenced by initVariables(), InjectorXISR(), and PrimaryRPMISR().
EXTERN unsigned short injectorStagedPulseWidths0[INJECTION_CHANNELS] |
EXTERN unsigned short injectorStagedPulseWidths1[INJECTION_CHANNELS] |
EXTERN unsigned short* injectorStagedPulseWidthsMath |
EXTERN unsigned short* injectorStagedPulseWidthsRealtime |
EXTERN ISRLatencyVar ISRLatencyVars |
Definition at line 103 of file freeEMS.h.
Referenced by initVariables(), main(), PrimaryRPMISR(), and SecondaryRPMISR().
EXTERN void* LambdaTableFlash2Location |
Definition at line 230 of file freeEMS.h.
Referenced by initPagedRAMFuel(), and lookupBlockDetails().
EXTERN void* LambdaTableFlashLocation |
Definition at line 229 of file freeEMS.h.
Referenced by initPagedRAMFuel(), and lookupBlockDetails().
EXTERN unsigned short lastPrimaryPulseTimeStamp |
EXTERN unsigned long lastSecondaryOddTimeStamp |
EXTERN void* MAFTransferTableLocation |
Definition at line 252 of file freeEMS.h.
Referenced by initLookupAddresses(), and lookupBlockDetails().
unsigned short masterPulseWidth |
* Pointers to SmallTablesB */
Definition at line 33 of file staticInit.c.
Referenced by calculateFuelAndIgnition(), and PrimaryRPMISR().
EXTERN unsigned short* mathSampleTimeStamp |
EXTERN unsigned short* mathSampleTimeStampRecord |
Definition at line 156 of file freeEMS.h.
Referenced by initVariables(), main(), and PrimaryRPMISR().
EXTERN void* memdumpaddr |
EXTERN unsigned char nextDwellChannel |
EXTERN unsigned char nextIgnitionChannel |
EXTERN unsigned char portHDebounce |
EXTERN unsigned short primaryLeadingEdgeTimeStamp |
EXTERN unsigned short primaryPulsesPerSecondaryPulse |
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 rescheduleFuelFlags |
EXTERN unsigned short* RPM |
Definition at line 157 of file freeEMS.h.
Referenced by generateCoreVars(), initVariables(), and main().
EXTERN unsigned short RPM0 |
Definition at line 77 of file freeEMS.h.
Referenced by initVariables(), main(), and resetToNonRunningState().
EXTERN unsigned short RPM1 |
Definition at line 78 of file freeEMS.h.
Referenced by initVariables(), main(), and resetToNonRunningState().
EXTERN unsigned short* RPMRecord |
Definition at line 158 of file freeEMS.h.
Referenced by initVariables(), main(), and PrimaryRPMISR().
EXTERN RuntimeVar RuntimeVars |
Definition at line 102 of file freeEMS.h.
Referenced by main(), PrimaryRPMISR(), RTIISR(), SCI0ISR(), and SecondaryRPMISR().
EXTERN unsigned char selfSetTimer |
EXTERN unsigned char ShouldSendLog |
EXTERN void* SmallTablesAFlash2Location |
Definition at line 242 of file freeEMS.h.
Referenced by initPagedRAMTune(), and lookupBlockDetails().
EXTERN void* SmallTablesAFlashLocation |
Definition at line 241 of file freeEMS.h.
Referenced by initPagedRAMTune(), and lookupBlockDetails().
EXTERN void* SmallTablesBFlash2Location |
Definition at line 244 of file freeEMS.h.
Referenced by initPagedRAMTune(), and lookupBlockDetails().
EXTERN void* SmallTablesBFlashLocation |
Definition at line 243 of file freeEMS.h.
Referenced by initPagedRAMTune(), and lookupBlockDetails().
EXTERN void* SmallTablesCFlash2Location |
Definition at line 246 of file freeEMS.h.
Referenced by initPagedRAMTune(), and lookupBlockDetails().
EXTERN void* SmallTablesCFlashLocation |
Definition at line 245 of file freeEMS.h.
Referenced by initPagedRAMTune(), and lookupBlockDetails().
EXTERN void* SmallTablesDFlash2Location |
Definition at line 248 of file freeEMS.h.
Referenced by initPagedRAMTune(), and lookupBlockDetails().
EXTERN void* SmallTablesDFlashLocation |
Definition at line 247 of file freeEMS.h.
Referenced by initPagedRAMTune(), and lookupBlockDetails().
EXTERN unsigned char stagedOn |
unsigned short tachoPeriod |
EXTERN void* TestTransferTableLocation |
Definition at line 253 of file freeEMS.h.
Referenced by initLookupAddresses(), and lookupBlockDetails().
EXTERN unsigned short timeBetweenSuccessivePrimaryPulses |
EXTERN unsigned short timeBetweenSuccessivePrimaryPulsesBuffer |
unsigned short timerExtensionClock |
Definition at line 340 of file freeEMS.h.
Referenced by InjectorXISR(), PrimaryRPMISR(), SecondaryRPMISR(), and TimerOverflow().
unsigned short totalAngleAfterReferenceIgnition |
Definition at line 34 of file staticInit.c.
unsigned short totalAngleAfterReferenceInjection |
Definition at line 35 of file staticInit.c.
Referenced by calculateFuelAndIgnition(), and PrimaryRPMISR().
EXTERN unsigned short totalDwell |
EXTERN unsigned short TPSADCRange |
Definition at line 305 of file freeEMS.h.
Referenced by generateCoreVars(), and initConfiguration().
EXTERN unsigned short TPSMAPRange |
Definition at line 304 of file freeEMS.h.
Referenced by generateCoreVars(), and initConfiguration().
EXTERN void* VETableMainFlash2Location |
Definition at line 224 of file freeEMS.h.
Referenced by initPagedRAMFuel(), and lookupBlockDetails().
EXTERN void* VETableMainFlashLocation |
Definition at line 223 of file freeEMS.h.
Referenced by initPagedRAMFuel(), and lookupBlockDetails().
EXTERN void* VETableSecondaryFlash2Location |
Definition at line 226 of file freeEMS.h.
Referenced by initPagedRAMFuel(), and lookupBlockDetails().
EXTERN void* VETableSecondaryFlashLocation |
Definition at line 225 of file freeEMS.h.
Referenced by initPagedRAMFuel(), and lookupBlockDetails().
EXTERN void* VETableTertiaryFlash2Location |
Definition at line 228 of file freeEMS.h.
Referenced by initPagedRAMFuel(), and lookupBlockDetails().
EXTERN void* VETableTertiaryFlashLocation |
Definition at line 227 of file freeEMS.h.
Referenced by initPagedRAMFuel(), and lookupBlockDetails().