The main project header file. More...
#include "memory.h"
Go to the source code of this file.
Data Structures | |
union | Tables1 |
union | Tables2 |
union | Tables3 |
union | Tables4 |
union | LongTime |
Defines | |
#define | EXTERN extern |
include "registerMasks.h | |
#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 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 * | 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 unsigned char | currentFuelRPage |
EXTERN unsigned char | currentTuneRPage |
EXTERN unsigned char | currentTimeRPage |
unsigned short | masterPulseWidth |
* Pointers to main tables to aid readability */ | |
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 long | primaryLeadingEdgeTimeStamp |
EXTERN unsigned long | primaryTrailingEdgeTimeStamp |
EXTERN unsigned long | timeBetweenSuccessivePrimaryPulses |
EXTERN unsigned long | lastPrimaryPulseTimeStamp |
EXTERN unsigned long | lengthOfSecondaryLowPulses |
EXTERN unsigned long | lastSecondaryPulseLeadingTimeStamp |
EXTERN unsigned long | lastSecondaryPulseTrailingTimeStamp |
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] |
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 CALC_FUEL_IGN BIT10_16 |
Definition at line 319 of file freeEMS.h.
Referenced by main(), and PrimaryRPMISR().
#define CLEAR_CALC_FUEL_IGN NBIT10_16 |
#define CLEAR_FORCE_READING NBIT11_16 |
#define CLEAR_PRIMARY_SYNC NBIT2_16 |
Definition at line 327 of file freeEMS.h.
Referenced by PrimaryRPMISR(), resetToNonRunningState(), and SecondaryRPMISR().
#define EXTERN extern |
#define FORCE_READING BIT11_16 |
#define PRIMARY_SYNC BIT2_16 |
Definition at line 311 of file freeEMS.h.
Referenced by PrimaryRPMISR(), and SecondaryRPMISR().
#define STAGED_NOT_REQUIRED NBIT9_16 |
Definition at line 328 of file freeEMS.h.
Referenced by calculateFuelAndIgnition().
#define STAGED_REQUIRED BIT9_16 |
Definition at line 318 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), and InjectorXISR().
Bank 0 secondary running variables
Definition at line 176 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), generateCoreVars(), initVariables(), main(), populateBasicDatalog(), and PrimaryRPMISR().
EXTERN ADCArray ADCArrays0 |
main adc storage area for syncronous sampling in the engine position ISR or injection ISR or ignition ISR etc.
Definition at line 178 of file freeEMS.h.
Referenced by initVariables(), and main().
EXTERN ADCArray ADCArrays1 |
main adc storage area for syncronous sampling in the engine position ISR or injection ISR or ignition ISR etc.
Definition at line 179 of file freeEMS.h.
Referenced by initVariables(), and main().
EXTERN ADCArray* ADCArraysRecord |
main adc storage area for syncronous sampling in the engine position ISR or injection ISR or ignition ISR etc.
Definition at line 177 of file freeEMS.h.
Referenced by initVariables(), and main().
EXTERN ADCArray* asyncADCArrays |
main adc storage area for syncronous sampling in the engine position ISR or injection ISR or ignition ISR etc.
Definition at line 181 of file freeEMS.h.
Referenced by initVariables().
EXTERN ADCArray asyncADCArrays0 |
secondary adc storage area for asynchronously sampling in the RTC/RTI ISR
Definition at line 183 of file freeEMS.h.
Referenced by initVariables().
EXTERN ADCArray asyncADCArrays1 |
secondary adc storage area for asynchronously sampling in the RTC/RTI ISR
Definition at line 184 of file freeEMS.h.
Referenced by initVariables().
EXTERN ADCArray* asyncADCArraysRecord |
secondary adc storage area for asynchronously sampling in the RTC/RTI ISR
Definition at line 182 of file freeEMS.h.
Referenced by initVariables().
unsigned char asyncDatalogType |
Definition at line 46 of file staticInit.c.
Referenced by decodePacketAndRespond(), and main().
EXTERN unsigned long bootFuelConst |
Definition at line 297 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), and initConfiguration().
EXTERN unsigned short bootTimeAAP |
Definition at line 302 of file freeEMS.h.
Referenced by generateCoreVars().
EXTERN unsigned short boundedTPSADC |
Definition at line 300 of file freeEMS.h.
Referenced by generateCoreVars().
Definition at line 129 of file freeEMS.h.
Referenced by PrimaryRPMISR(), and RTIISR().
EXTERN unsigned short configuredBasicDatalogLength |
Definition at line 122 of file freeEMS.h.
Referenced by decodePacketAndRespond(), initVariables(), main(), and populateBasicDatalog().
EXTERN unsigned short coreStatusA |
Definition at line 308 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), InjectorXISR(), main(), PrimaryRPMISR(), resetToNonRunningState(), RTIISR(), and SecondaryRPMISR().
Definition at line 168 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), generateCoreVars(), generateDerivedVars(), initVariables(), and populateBasicDatalog().
Pointer to the core running variables
Definition at line 169 of file freeEMS.h.
Referenced by initVariables().
Definition at line 130 of file freeEMS.h.
Referenced by IRQISR(), LowVoltageISR(), main(), PortJISR(), PortPISR(), PrimaryRPMISR(), SCI0ISR(), SecondaryRPMISR(), sendDebugIfClear(), sendErrorIfClear(), UISR(), and XIRQISR().
EXTERN unsigned short currentDwell0 |
Definition at line 190 of file freeEMS.h.
Referenced by initVariables(), and main().
EXTERN unsigned short currentDwell1 |
Definition at line 191 of file freeEMS.h.
Referenced by initVariables(), and main().
EXTERN unsigned short* currentDwellMath |
Definition at line 188 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), initVariables(), and main().
EXTERN unsigned short* currentDwellRealtime |
Definition at line 189 of file freeEMS.h.
Referenced by initVariables(), and main().
EXTERN unsigned char currentFuelRPage |
Definition at line 247 of file freeEMS.h.
Referenced by generateDerivedVars(), and setupPagedRAM().
EXTERN unsigned char currentTimeRPage |
Definition at line 249 of file freeEMS.h.
Referenced by setupPagedRAM().
EXTERN unsigned char currentTuneRPage |
Definition at line 248 of file freeEMS.h.
Referenced by setupPagedRAM().
EXTERN DerivedVar* DerivedVars |
Bank 0 core running variables
Definition at line 172 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), generateDerivedVars(), initVariables(), and populateBasicDatalog().
EXTERN DerivedVar DerivedVars0 |
Pointer to the secondary running variables
Definition at line 173 of file freeEMS.h.
Referenced by initVariables().
EXTERN unsigned char dwellQueueLength |
Definition at line 391 of file freeEMS.h.
Referenced by IgnitionDwellISR(), and PrimaryRPMISR().
unsigned long engineCyclePeriod |
Definition at line 72 of file staticInit.c.
Referenced by ModDownCtrISR(), PrimaryRPMISR(), resetToNonRunningState(), and SecondaryRPMISR().
EXTERN unsigned short ignitionAdvances[IGNITION_CHANNELS *2] |
Definition at line 395 of file freeEMS.h.
Referenced by calculateFuelAndIgnition().
EXTERN unsigned char ignitionQueueLength |
Definition at line 392 of file freeEMS.h.
Referenced by IgnitionFireISR(), and PrimaryRPMISR().
EXTERN unsigned short injectorCodeCloseRuntimes[INJECTION_CHANNELS] |
Definition at line 413 of file freeEMS.h.
Referenced by InjectorXISR().
EXTERN unsigned short injectorCodeLatencies[INJECTION_CHANNELS] |
Definition at line 426 of file freeEMS.h.
Referenced by InjectorXISR().
EXTERN unsigned short injectorCodeOpenRuntimes[INJECTION_CHANNELS] |
Definition at line 412 of file freeEMS.h.
Referenced by InjectorXISR().
EXTERN volatile unsigned char* volatile injectorMainControlRegisters[INJECTION_CHANNELS] |
Definition at line 404 of file freeEMS.h.
Referenced by initVariables(), InjectorXISR(), and PrimaryRPMISR().
EXTERN unsigned long injectorMainEndTimes[INJECTION_CHANNELS] |
Definition at line 408 of file freeEMS.h.
Referenced by InjectorXISR(), and PrimaryRPMISR().
EXTERN unsigned short injectorMainPulseWidths0[INJECTION_CHANNELS] |
Definition at line 420 of file freeEMS.h.
Referenced by initVariables(), and main().
EXTERN unsigned short injectorMainPulseWidths1[INJECTION_CHANNELS] |
Definition at line 421 of file freeEMS.h.
Referenced by initVariables(), and main().
EXTERN unsigned short* injectorMainPulseWidthsMath |
Definition at line 416 of file freeEMS.h.
Referenced by calculateFuelAndIgnition(), initVariables(), and main().
EXTERN unsigned short* injectorMainPulseWidthsRealtime |
Definition at line 418 of file freeEMS.h.
Referenced by initVariables(), InjectorXISR(), main(), and PrimaryRPMISR().
EXTERN unsigned short injectorMainStartTimesHolding[INJECTION_CHANNELS] |
Definition at line 407 of file freeEMS.h.
Referenced by InjectorXISR(), and PrimaryRPMISR().
EXTERN volatile unsigned short* volatile injectorMainTimeRegisters[INJECTION_CHANNELS] |
Definition at line 403 of file freeEMS.h.
Referenced by initVariables(), InjectorXISR(), and PrimaryRPMISR().
EXTERN unsigned short injectorStagedPulseWidths0[INJECTION_CHANNELS] |
Definition at line 422 of file freeEMS.h.
Referenced by initVariables(), and main().
EXTERN unsigned short injectorStagedPulseWidths1[INJECTION_CHANNELS] |
Definition at line 423 of file freeEMS.h.
Referenced by initVariables(), and main().
EXTERN unsigned short* injectorStagedPulseWidthsMath |
Definition at line 417 of file freeEMS.h.
Referenced by initVariables(), and main().
EXTERN unsigned short* injectorStagedPulseWidthsRealtime |
Definition at line 419 of file freeEMS.h.
Referenced by initVariables(), and main().
EXTERN ISRLatencyVar ISRLatencyVars |
Definition at line 132 of file freeEMS.h.
Referenced by initVariables(), main(), PrimaryRPMISR(), and SecondaryRPMISR().
EXTERN unsigned long lastPrimaryPulseTimeStamp |
Definition at line 363 of file freeEMS.h.
Referenced by PrimaryRPMISR().
EXTERN unsigned long lastSecondaryOddTimeStamp |
Definition at line 379 of file freeEMS.h.
Referenced by SecondaryRPMISR().
EXTERN unsigned long lastSecondaryPulseLeadingTimeStamp |
Definition at line 376 of file freeEMS.h.
Referenced by SecondaryRPMISR().
EXTERN unsigned long lastSecondaryPulseTrailingTimeStamp |
Definition at line 377 of file freeEMS.h.
Referenced by SecondaryRPMISR().
EXTERN unsigned long lengthOfSecondaryLowPulses |
Definition at line 372 of file freeEMS.h.
Referenced by generateDerivedVars(), and SecondaryRPMISR().
unsigned short masterPulseWidth |
* Pointers to main tables to aid readability */
* Pointers to SmallTablesA */ * Pointers to SmallTablesB */
Definition at line 51 of file staticInit.c.
Referenced by calculateFuelAndIgnition(), and PrimaryRPMISR().
EXTERN unsigned short* mathSampleTimeStamp |
secondary adc storage area for asynchronously sampling in the RTC/RTI ISR
Definition at line 186 of file freeEMS.h.
Referenced by initVariables(), and main().
EXTERN unsigned short* mathSampleTimeStampRecord |
Definition at line 187 of file freeEMS.h.
Referenced by initVariables(), main(), and PrimaryRPMISR().
EXTERN unsigned char nextDwellChannel |
Definition at line 393 of file freeEMS.h.
Referenced by IgnitionDwellISR(), and PrimaryRPMISR().
EXTERN unsigned char nextIgnitionChannel |
Definition at line 394 of file freeEMS.h.
Referenced by IgnitionFireISR(), and PrimaryRPMISR().
EXTERN unsigned char portHDebounce |
Definition at line 109 of file freeEMS.h.
Referenced by PortHISR(), and RTIISR().
EXTERN unsigned long primaryLeadingEdgeTimeStamp |
Definition at line 359 of file freeEMS.h.
Referenced by PrimaryRPMISR().
EXTERN unsigned short primaryPulsesPerSecondaryPulse |
Definition at line 357 of file freeEMS.h.
Referenced by PrimaryRPMISR(), and SecondaryRPMISR().
EXTERN unsigned short primaryTeethDroppedFromLackOfSync |
Definition at line 386 of file freeEMS.h.
Referenced by PrimaryRPMISR().
EXTERN unsigned long primaryTrailingEdgeTimeStamp |
EXTERN unsigned short queuedDwellOffsets[IGNITION_CHANNELS] |
Definition at line 396 of file freeEMS.h.
Referenced by IgnitionDwellISR(), and PrimaryRPMISR().
EXTERN unsigned short queuedIgnitionOffsets[IGNITION_CHANNELS] |
Definition at line 397 of file freeEMS.h.
Referenced by IgnitionFireISR(), and PrimaryRPMISR().
EXTERN unsigned char rescheduleFuelFlags |
EXTERN unsigned short RPM0 |
Definition at line 106 of file freeEMS.h.
Referenced by initVariables(), main(), and resetToNonRunningState().
EXTERN unsigned short RPM1 |
Definition at line 107 of file freeEMS.h.
Referenced by initVariables(), main(), and resetToNonRunningState().
EXTERN RuntimeVar RuntimeVars |
Definition at line 131 of file freeEMS.h.
Referenced by main(), PrimaryRPMISR(), RTIISR(), SCI0ISR(), and SecondaryRPMISR().
EXTERN unsigned char selfSetTimer |
Definition at line 350 of file freeEMS.h.
Referenced by InjectorXISR(), and PrimaryRPMISR().
EXTERN unsigned char ShouldSendLog |
EXTERN unsigned char stagedOn |
Definition at line 349 of file freeEMS.h.
Referenced by InjectorXISR().
unsigned short tachoPeriod |
Definition at line 48 of file staticInit.c.
Referenced by ModDownCtrISR().
EXTERN unsigned long timeBetweenSuccessivePrimaryPulses |
Definition at line 361 of file freeEMS.h.
Referenced by generateDerivedVars(), and PrimaryRPMISR().
unsigned short timerExtensionClock |
Definition at line 335 of file freeEMS.h.
Referenced by InjectorXISR(), PrimaryRPMISR(), SecondaryRPMISR(), and TimerOverflow().
unsigned short totalAngleAfterReferenceIgnition |
Definition at line 52 of file staticInit.c.
unsigned short totalAngleAfterReferenceInjection |
Definition at line 53 of file staticInit.c.
Referenced by calculateFuelAndIgnition(), and PrimaryRPMISR().
EXTERN unsigned short totalDwell |
EXTERN unsigned short TPSADCRange |
Definition at line 299 of file freeEMS.h.
Referenced by generateCoreVars(), and initConfiguration().
EXTERN unsigned short TPSMAPRange |
Definition at line 298 of file freeEMS.h.
Referenced by generateCoreVars(), and initConfiguration().