freeEMS.h File Reference

#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 Documentation

#define CALC_FUEL_IGN   BIT10_16

Definition at line 202 of file freeEMS.h.

Referenced by main(), and PrimaryRPMISR().

#define CLEAR_CALC_FUEL_IGN   NBIT10_16

Definition at line 212 of file freeEMS.h.

Referenced by main().

#define CLEAR_FORCE_READING   NBIT11_16

Definition at line 213 of file freeEMS.h.

Referenced by main().

#define CLEAR_PRIMARY_SYNC   NBIT2_16

Definition at line 210 of file freeEMS.h.

Referenced by PrimaryRPMISR(), resetToNonRunningState(), and SecondaryRPMISR().

#define COREA01   BIT1_16

Definition at line 193 of file freeEMS.h.

#define COREA12   BIT12_16

Definition at line 204 of file freeEMS.h.

#define COREA13   BIT13_16

Definition at line 205 of file freeEMS.h.

#define COREA14   BIT14_16

Definition at line 206 of file freeEMS.h.

#define COREA15   BIT15_16

Definition at line 207 of file freeEMS.h.

#define COREA16   BIT16_16

Definition at line 208 of file freeEMS.h.

#define ENGINE_PHASE   BIT4_16

Definition at line 196 of file freeEMS.h.

#define EXTERN   extern

Definition at line 38 of file freeEMS.h.

#define FORCE_READING   BIT11_16

Definition at line 203 of file freeEMS.h.

Referenced by main(), and RTIISR().

#define FUEL_CUT   BIT5_16

Definition at line 197 of file freeEMS.h.

#define HARD_SPARK_CUT   BIT6_16

Definition at line 198 of file freeEMS.h.

#define PRIMARY_SYNC   BIT2_16

Definition at line 194 of file freeEMS.h.

Referenced by PrimaryRPMISR(), and SecondaryRPMISR().

#define SECONDARY_SYNC   BIT3_16

Definition at line 195 of file freeEMS.h.

#define SOFT_SPARK_CUT   BIT7_16

Definition at line 199 of file freeEMS.h.

#define SPARK_RETARD   BIT8_16

Definition at line 200 of file freeEMS.h.

#define STAGED_NOT_REQUIRED   NBIT9_16

Definition at line 211 of file freeEMS.h.

Referenced by calculateFuelAndIgnition().

#define STAGED_REQUIRED   BIT9_16

Definition at line 201 of file freeEMS.h.

Referenced by calculateFuelAndIgnition(), and InjectorXISR().


Variable Documentation

EXTERN ADCArray ADCArrays

Definition at line 91 of file freeEMS.h.

Referenced by calculateFuelAndIgnition(), generateCoreVars(), main(), and PrimaryRPMISR().

EXTERN ADCArray asyncADCArrays

Definition at line 92 of file freeEMS.h.

EXTERN unsigned long bootFuelConst

Definition at line 181 of file freeEMS.h.

Referenced by calculateFuelAndIgnition(), and initConfiguration().

EXTERN unsigned short bootTimeAAP

Definition at line 186 of file freeEMS.h.

Referenced by generateCoreVars().

EXTERN unsigned short boundedTPSADC

Definition at line 184 of file freeEMS.h.

Referenced by generateCoreVars().

EXTERN Clock Clocks

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().

EXTERN CoreVar CoreVars

Definition at line 88 of file freeEMS.h.

Referenced by calculateFuelAndIgnition(), generateCoreVars(), and generateDerivedVars().

EXTERN Counter Counters

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]

Definition at line 283 of file freeEMS.h.

Referenced by calculateFuelAndIgnition().

EXTERN unsigned char currentFuelRPage

Definition at line 153 of file freeEMS.h.

Referenced by decodePacketAndBuildResponse(), generateDerivedVars(), and setupPagedRAM().

EXTERN unsigned char currentTimeRPage

Definition at line 155 of file freeEMS.h.

Referenced by setupPagedRAM().

EXTERN unsigned char currentTuneRPage

Definition at line 154 of file freeEMS.h.

Referenced by setupPagedRAM().

EXTERN DerivedVar DerivedVars

Definition at line 89 of file freeEMS.h.

Referenced by calculateFuelAndIgnition(), and generateDerivedVars().

EXTERN unsigned short dwellOn

Definition at line 258 of file freeEMS.h.

Referenced by initVariables().

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]

Definition at line 286 of file freeEMS.h.

Referenced by calculateFuelAndIgnition().

EXTERN unsigned char ignitionQueueLength

Definition at line 282 of file freeEMS.h.

Referenced by IgnitionFireISR(), initVariables(), and PrimaryRPMISR().

EXTERN unsigned short injectorCodeCloseRuntimes[INJECTION_CHANNELS]

Definition at line 304 of file freeEMS.h.

Referenced by InjectorXISR().

EXTERN unsigned short injectorCodeLatencies[INJECTION_CHANNELS]

Definition at line 311 of file freeEMS.h.

Referenced by InjectorXISR().

EXTERN unsigned short injectorCodeOpenRuntimes[INJECTION_CHANNELS]

Definition at line 303 of file freeEMS.h.

Referenced by InjectorXISR().

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]

Definition at line 299 of file freeEMS.h.

Referenced by InjectorXISR(), and PrimaryRPMISR().

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]

Definition at line 298 of file freeEMS.h.

Referenced by InjectorXISR(), and PrimaryRPMISR().

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]

Definition at line 308 of file freeEMS.h.

EXTERN ISRLatencyVar ISRLatencyVars

Definition at line 86 of file freeEMS.h.

Referenced by main(), PrimaryRPMISR(), and SecondaryRPMISR().

EXTERN unsigned short lastPrimaryPulseTimeStamp

Definition at line 273 of file freeEMS.h.

Referenced by initVariables(), and PrimaryRPMISR().

EXTERN unsigned long lastSecondaryOddTimeStamp

Definition at line 275 of file freeEMS.h.

Referenced by initVariables(), and SecondaryRPMISR().

EXTERN unsigned char mainOn

Definition at line 257 of file freeEMS.h.

Referenced by initVariables().

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

Definition at line 284 of file freeEMS.h.

Referenced by IgnitionDwellISR(), and PrimaryRPMISR().

EXTERN unsigned char nextIgnitionChannel

Definition at line 285 of file freeEMS.h.

Referenced by IgnitionFireISR(), and PrimaryRPMISR().

unsigned char portHDebounce

Definition at line 3 of file staticInit.c.

Referenced by initVariables(), PortHISR(), and RTIISR().

EXTERN unsigned short primaryLeadingEdgeTimeStamp

Definition at line 269 of file freeEMS.h.

Referenced by initVariables(), and PrimaryRPMISR().

EXTERN unsigned short primaryPulsesPerSecondaryPulse

Definition at line 267 of file freeEMS.h.

Referenced by initVariables(), PrimaryRPMISR(), and SecondaryRPMISR().

EXTERN unsigned short primaryPulsesPerSecondaryPulseBuffer

Definition at line 268 of file freeEMS.h.

Referenced by initVariables(), and SecondaryRPMISR().

EXTERN unsigned short primaryTeethDroppedFromLackOfSync

Definition at line 276 of file freeEMS.h.

Referenced by PrimaryRPMISR().

EXTERN unsigned short primaryTrailingEdgeTimeStamp

Definition at line 270 of file freeEMS.h.

EXTERN unsigned short queuedDwellOffsets[IGNITION_CHANNELS]

Definition at line 287 of file freeEMS.h.

Referenced by IgnitionDwellISR(), and PrimaryRPMISR().

EXTERN unsigned short queuedIgnitionOffsets[IGNITION_CHANNELS]

Definition at line 288 of file freeEMS.h.

Referenced by IgnitionFireISR(), and PrimaryRPMISR().

EXTERN unsigned char realTimeUseBank

Definition at line 238 of file freeEMS.h.

Referenced by initVariables(), and main().

EXTERN unsigned char realTimeUseIgnitionOffset

Definition at line 240 of file freeEMS.h.

Referenced by initVariables(), and main().

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

Definition at line 261 of file freeEMS.h.

Referenced by initVariables().

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 Tables4 TablesD RWINDOW

Definition at line 149 of file freeEMS.h.

EXTERN Tables3 TablesC RWINDOW

Definition at line 148 of file freeEMS.h.

EXTERN Tables2 TablesB RWINDOW

Definition at line 147 of file freeEMS.h.

EXTERN Tables1 TablesA RWINDOW

Definition at line 146 of file freeEMS.h.

EXTERN unsigned char RXBuffer [RX_BUFFER_SIZE] RXBUF

Definition at line 144 of file freeEMS.h.

EXTERN unsigned char selfSetTimer

Definition at line 260 of file freeEMS.h.

Referenced by initVariables(), InjectorXISR(), and PrimaryRPMISR().

EXTERN unsigned char stagedOn

Definition at line 259 of file freeEMS.h.

Referenced by initVariables(), and InjectorXISR().

unsigned short tachoPeriod

Definition at line 5 of file staticInit.c.

Referenced by ModDownCtrISR().

EXTERN unsigned short timeBetweenSuccessivePrimaryPulses

Definition at line 271 of file freeEMS.h.

Referenced by initVariables(), and PrimaryRPMISR().

EXTERN unsigned short timeBetweenSuccessivePrimaryPulsesBuffer

Definition at line 272 of file freeEMS.h.

Referenced by initVariables(), and PrimaryRPMISR().

unsigned short timerExtensionClock

Definition at line 245 of file freeEMS.h.

Referenced by InjectorXISR(), PrimaryRPMISR(), SecondaryRPMISR(), and TimerOverflow().

EXTERN unsigned short totalAngleAfterReferenceIgnition

Definition at line 179 of file freeEMS.h.

Referenced by initVariables().

EXTERN unsigned short totalAngleAfterReferenceInjection

Definition at line 178 of file freeEMS.h.

Referenced by calculateFuelAndIgnition(), initVariables(), and PrimaryRPMISR().

EXTERN unsigned short totalDwell

Definition at line 177 of file freeEMS.h.

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().

EXTERN unsigned char TXBuffer [TX_BUFFER_SIZE] TXBUF

Definition at line 143 of file freeEMS.h.


Generated on Mon Nov 10 21:19:02 2008 for freeems by  doxygen 1.5.2