43/* &&&&&&&&&& WARNING &&&&&&&&&& These need to be changed if the timer period is changed at all!! &&&&&&&&&& WARNING &&&&&&&&&& */
44/* TODO It may be better to make these actual times and calculate the number of timer units such that a change in time base of the timer doesn't affect the code. */
85/// @todo TODO Move these to decoder interface, and make set by each decoder where appropriate
86///* ECT limits */
87/* The number of timer units it takes for the switch on scheduling code to run + latencies */
88constunsignedshortectSwitchOnCodeTime = 250; /* Used to set min pw in output ISR. 250 is based on worst of decoders causing latencies. */
89/* The number of timer units it takes for the switch off scheduling code to run + latencies */
90constunsignedshortectSwitchOffCodeTime = 250; /* Used to see if we should set self sched or not. 250 is based on worst of decoders causing latencies. */
91
92// TODO put these where they belong, just dumped from other file for now...
93/* Main injector channel bit masks and registers for use in both injection_isrs.c and engine_position_isrs.c */
94/* Masks for setting mainOn flags and checking state of pin and therefore which change of state just occured */
95/* Masks for clearing mainOn flags */
96/* Masks for setting mainOn flags and checking state of pin and therefore which change of state just occured */
97/* Masks to be used with |= to switch a channel to "turn on compare" mode */
98/* Masks to be used dissable with &= to switch a channel to "turn off compare" mode */
99/* Masks to be used with |= to switch a channel to "turn on on compare" mode from "turn off on compare" mode */
100/* Masks to be used with &= to switch a channel to "turn off on compare" mode from "turn on on compare" mode */
101/* Ignition channel bit masks for use in both PIT timer ISRs and engine_position_isrs.c */
102/* Masks for setting ignition status bits and turning on the channels themselves */
103/* Masks for clearing ignition status bits and turning off the channels themselves */
114constunsignedcharectMainEnableMasks[ECT_CHANNELS] = {0x30, 0xC0, 0x03, 0x0C, 0x30, 0xC0}; // Regardless of state, mask to enable and cause to go high
115constunsignedcharectMainDisableMasks[ECT_CHANNELS] = {0xCF, 0x3F, 0xFC, 0xF3, 0xCF, 0x3F}; // Regardless of state, mask to disable completely