FreeEMS
0.2.0-SNAPSHOT-285-g028e24c
|
Echos the input on the first ignition output. More...
#include "../inc/defaultSecondaryRPMISR.c"
Go to the source code of this file.
Macros | |
#define | angleOfSingleIteration (180 * ANGLE_FACTOR) |
#define | E0 0 |
#define | E2 (E0 + angleOfSingleIteration) |
#define | E3 (E1 + angleOfSingleIteration) |
#define | E4 (E0 + (2 * angleOfSingleIteration)) |
#define | E5 (E1 + (2 * angleOfSingleIteration)) |
#define | E6 (E0 + (3 * angleOfSingleIteration)) |
#define | E7 (E1 + (3 * angleOfSingleIteration)) |
Functions | |
void | decoderInitPreliminary () |
void | perDecoderReset () |
void | PrimaryRPMISR () |
RPM ISRs, IC timer for engine position and RPM. |
Variables | |
const unsigned short | eventAngles [] = {E0, E1, E2, E3, E4, E5, E6, E7} |
const unsigned char | eventValidForCrankSync [] = {0,0,0,0,0,0,0,0} |
Echos the input on the first ignition output.
This decoder is for any 4 tooth/slot hall or optical cam speed sensor and to be used for distributor and/or 4 shot batch injection only.
To build a version of this decoder with a specific angle pair for your hall or optical distributor, just define the DECODER_IMPLEMENTATION_C flag, include the four required headers, define the angle for E1, and define the unique decoder name string!
To effectively reverse the polarity, just subtract your angle from 180 and it will then be correct, assuming that either angle is correct.
Definition in file HallOrOptical-Distributor-XofY.c.
#define angleOfSingleIteration (180 * ANGLE_FACTOR) |
Definition at line 47 of file HallOrOptical-Distributor-XofY.c.
Referenced by PrimaryRPMISR().
#define E0 0 |
Definition at line 49 of file HallOrOptical-Distributor-XofY.c.
#define E2 (E0 + angleOfSingleIteration) |
Definition at line 51 of file HallOrOptical-Distributor-XofY.c.
#define E3 (E1 + angleOfSingleIteration) |
Definition at line 52 of file HallOrOptical-Distributor-XofY.c.
#define E4 (E0 + (2 * angleOfSingleIteration)) |
Definition at line 53 of file HallOrOptical-Distributor-XofY.c.
#define E5 (E1 + (2 * angleOfSingleIteration)) |
Definition at line 54 of file HallOrOptical-Distributor-XofY.c.
#define E6 (E0 + (3 * angleOfSingleIteration)) |
Definition at line 55 of file HallOrOptical-Distributor-XofY.c.
#define E7 (E1 + (3 * angleOfSingleIteration)) |
Definition at line 56 of file HallOrOptical-Distributor-XofY.c.
void decoderInitPreliminary | ( | void | ) |
Definition at line 68 of file HallOrOptical-Distributor-XofY.c.
References TCTL4.
void perDecoderReset | ( | void | ) |
Definition at line 71 of file HallOrOptical-Distributor-XofY.c.
void PrimaryRPMISR | ( | void | ) |
RPM ISRs, IC timer for engine position and RPM.
There are multiple copies of this interrupt handler, each is linked with the rest of the code once such that if there are N decoder implementations and/or variants, then there are N loadable binaries produced after a full build.
For details on any specific decoder implementation, see the documentation for that specific file.
Definition at line 74 of file HallOrOptical-Distributor-XofY.c.
References decoderSetting::accelerationInputEventTimeTolerance, ADCBuffers, angleOfSingleIteration, BIT0, CALC_FUEL_IGN, Clocks, COMBUSTION_SYNC, coreStatusA, Counters, KeyUserDebug::currentEvent, DEBUG_TURN_PIN_OFF, DEBUG_TURN_PIN_ON, decoderSetting::decelerationInputEventTimeTolerance, DECODER_BENCHMARKS, KeyUserDebug::decoderFlags, fixedConfig2::decoderSettings, edgeTimeStamp, eventAngles, fixedConfigs2, KeyUserDebug::inputEventTimeTolerance, KeyUserDebugs, LAST_PERIOD_VALID, LAST_TIMESTAMP_VALID, lastEventTimeStamp, lastPrimaryEventTimeStamp, lastSecondaryEventTimeStamp, lastTicksPerDegree, NBIT0, PORTB, PRIMARY_EVENT_ARRIVED_TOO_EARLY, PRIMARY_EVENT_ARRIVED_TOO_LATE, KeyUserDebug::primaryTeethSeen, PTIT, resetToNonRunningState(), sampleEachADC(), SET_SYNC_LEVEL_TO, Counter::syncedADCreadings, TC0, TFLG, TFLGOF, ticks_per_degree_multiplier, ticksPerDegreeRecord, LongTime::timeLong, Clock::timeoutADCreadingClock, timerExtensionClock, LongTime::timeShorts, and timeStamp.
Definition at line 64 of file HallOrOptical-Distributor-XofY.c.
const unsigned char eventValidForCrankSync[] = {0,0,0,0,0,0,0,0} |
Definition at line 65 of file HallOrOptical-Distributor-XofY.c.