Global hash define literal replacements. More...
Go to the source code of this file.
Defines | |
#define | INLINE_ASSEMBLY(code) __asm__ __volatile__ (code) |
#define | ALWAYS_INLINE __attribute__((always_inline)) |
#define | FALSE 0 |
#define | TRUE !FALSE |
#define | ZEROS 0x00 |
#define | ONES 0xFF |
#define | ZEROS16 0x0000 |
#define | ONES16 0xFFFF |
#define | LONGHALF 0x80000000 |
#define | LONGMAX 0xFFFFFFFF |
#define | SHORTHALF 0x8000 |
#define | SHORTMAX 0xFFFF |
#define | BIT0 0x01 |
#define | BIT1 0x02 |
#define | BIT2 0x04 |
#define | BIT3 0x08 |
#define | BIT4 0x10 |
#define | BIT5 0x20 |
#define | BIT6 0x40 |
#define | BIT7 0x80 |
#define | BIT0_16 0x0001 |
#define | BIT1_16 0x0002 |
#define | BIT2_16 0x0004 |
#define | BIT3_16 0x0008 |
#define | BIT4_16 0x0010 |
#define | BIT5_16 0x0020 |
#define | BIT6_16 0x0040 |
#define | BIT7_16 0x0080 |
#define | BIT8_16 0x0100 |
#define | BIT9_16 0x0200 |
#define | BIT10_16 0x0400 |
#define | BIT11_16 0x0800 |
#define | BIT12_16 0x1000 |
#define | BIT13_16 0x2000 |
#define | BIT14_16 0x4000 |
#define | BIT15_16 0x8000 |
#define | NBIT0 0xFE |
#define | NBIT1 0xFD |
#define | NBIT2 0xFB |
#define | NBIT3 0xF7 |
#define | NBIT4 0xEF |
#define | NBIT5 0xDF |
#define | NBIT6 0xBF |
#define | NBIT7 0x7F |
#define | NBIT0_16 0xFFFE |
#define | NBIT1_16 0xFFFD |
#define | NBIT2_16 0xFFFB |
#define | NBIT3_16 0xFFF7 |
#define | NBIT4_16 0xFFEF |
#define | NBIT5_16 0xFFDF |
#define | NBIT6_16 0xFFBF |
#define | NBIT7_16 0xFF7F |
#define | NBIT8_16 0xFEFF |
#define | NBIT9_16 0xFDFF |
#define | NBIT10_16 0xFBFF |
#define | NBIT11_16 0xF7FF |
#define | NBIT12_16 0xEFFF |
#define | NBIT13_16 0xDFFF |
#define | NBIT14_16 0xBFFF |
#define | NBIT15_16 0x7FFF |
#define | ESCAPE_BYTE 0xBB |
#define | START_BYTE 0xAA |
#define | STOP_BYTE 0xCC |
#define | ESCAPED_ESCAPE_BYTE 0x44 |
#define | ESCAPED_START_BYTE 0x55 |
#define | ESCAPED_STOP_BYTE 0x33 |
#define | flashSectorSize 1024 |
#define | flashSectorSizeInWords 512 |
#define | RPM_FACTOR 2 |
#define | MAP_FACTOR 100 |
#define | TPS_FACTOR 640 |
#define | BRV_FACTOR 1000 |
#define | TEMP_FACTOR 100 |
#define | EGO_FACTOR 32768 |
#define | idleManifoldPressure 3000 |
#define | seaLevelKPa 10000 |
#define | maxExpectedBoost 30000 |
#define | freezingPoint 27315 |
#define | roomTemperature 29315 |
#define | runningTemperature 35815 |
#define | halfThrottle 32768 |
#define | runningVoltage 14400 |
#define | idlePulseWidth 2000 |
#define | idleAirFlow 1500 |
#define | typicalCylinderSize 16384 |
#define | typicalInjectorSize 9387 |
#define | densityOfOctane 22496 |
#define | stoichiometricLambda 32768 |
#define | stoichiometricAFRMethane 17245 |
#define | stoichiometricAFRPropane 15685 |
#define | stoichiometricAFRLPG 15599 |
#define | stoichiometricAFRButane 15469 |
#define | stoichiometricAFROctane 15137 |
#define | stoichiometricAFRGasoline 14700 |
#define | stoichiometricAFRXylene 13681 |
#define | stoichiometricAFRToluene 13512 |
#define | stoichiometricAFRBenzene 13282 |
#define | stoichiometricAFRE85 9862 |
#define | stoichiometricAFREthanol 9008 |
#define | stoichiometricAFRMethanol 6475 |
#define | batteryVoltageMin 0 |
#define | batteryVoltageRange 24500 |
#define | LC1LambdaMin 16384 |
#define | LC1LambdaMax 49152 |
#define | LC1LambdaRange 32768 |
#define | AFR1020LambdaMin 16384 |
#define | AFR1020LambdaMax 49152 |
#define | AFR1020LambdaRange 32768 |
#define | MPX4100AMin 1400 |
#define | MPX4100AMax 10750 |
#define | MPX4100ARange 9350 |
#define | MPX4250AMin 800 |
#define | MPX4250AMax 26000 |
#define | MPX4250ARange 25200 |
#define | MPXH6300AMin 1200 |
#define | MPXH6300AMax 32000 |
#define | MPXH6300ARange 30800 |
#define | MPXH6400AMin 1200 |
#define | MPXH6400AMax 42000 |
#define | MPXH6400ARange 40800 |
#define | TPSDefaultMin 255 |
#define | TPSDefaultMax 767 |
#define | offIdleMAP 3000 |
#define | nearlyWOTMAP 9500 |
#define | ticksPerCycleAtOneRPMx2 300000000 |
#define | ticksPerCycleAtOneRPM 150000000 |
#define | tachoTickFactor4at50 6 |
#define | tachoTotalFactor4at50 48 |
#define | oneHundredPercentVE 51200 |
#define | densityOfFuelTotalDivisor 32000 |
#define | divisorFor115200bps 22 |
#define | ADC_DIVISIONS 1023 |
#define | IGNITION_CHANNELS 12 |
#define | INJECTION_CHANNELS 6 |
#define | DWELL_ENABLE BIT0 |
#define | DWELL_DISABLE NBIT0 |
#define | IGNITION_ENABLE BIT1 |
#define | IGNITION_DISABLE NBIT1 |
#define | RPAGE_TUNE_ONE 0xF8 |
#define | RPAGE_TUNE_TWO 0xF9 |
#define | RPAGE_FUEL_ONE 0xFA |
#define | RPAGE_FUEL_TWO 0xFB |
#define | RPAGE_TIME_ONE 0xFC |
#define | RPAGE_TIME_TWO 0xFD |
#define | RPAGE_MIN 0xF8 |
#define | PPAGE_MIN 0xE0 |
#define | EPAGE_MIN 0x?? |
#define | TX_BUFFER_SIZE 0x0820 |
#define | RX_BUFFER_SIZE 0x0810 |
#define | TransferTableSize 2048 |
#define | TX_MAX_PAYLOAD_SIZE 2048 |
Global hash define literal replacements.
Currently this holds most hash defined constants and literals.
TODO Some investigation as to whether it is best to use consts or defines is required
TODO Break this up into smaller chunks that are included into this file
Definition in file globalDefines.h.
#define ADC_DIVISIONS 1023 |
Definition at line 257 of file globalDefines.h.
Referenced by generateCoreVars().
#define AFR1020LambdaMax 49152 |
Definition at line 196 of file globalDefines.h.
#define AFR1020LambdaMin 16384 |
Definition at line 195 of file globalDefines.h.
#define AFR1020LambdaRange 32768 |
Definition at line 197 of file globalDefines.h.
#define ALWAYS_INLINE __attribute__((always_inline)) |
Definition at line 58 of file globalDefines.h.
#define batteryVoltageMin 0 |
Definition at line 188 of file globalDefines.h.
#define batteryVoltageRange 24500 |
Definition at line 189 of file globalDefines.h.
#define BIT0 0x01 |
Definition at line 80 of file globalDefines.h.
Referenced by decodePacketAndRespond(), and SCI0ISR().
#define BIT0_16 0x0001 |
Definition at line 89 of file globalDefines.h.
#define BIT1 0x02 |
Definition at line 81 of file globalDefines.h.
Referenced by SCI0ISR().
#define BIT10_16 0x0400 |
Definition at line 100 of file globalDefines.h.
#define BIT11_16 0x0800 |
Definition at line 101 of file globalDefines.h.
#define BIT12_16 0x1000 |
Definition at line 102 of file globalDefines.h.
#define BIT13_16 0x2000 |
Definition at line 103 of file globalDefines.h.
#define BIT14_16 0x4000 |
Definition at line 104 of file globalDefines.h.
#define BIT15_16 0x8000 |
Definition at line 105 of file globalDefines.h.
#define BIT1_16 0x0002 |
Definition at line 90 of file globalDefines.h.
#define BIT2 0x04 |
Definition at line 82 of file globalDefines.h.
#define BIT2_16 0x0004 |
Definition at line 91 of file globalDefines.h.
#define BIT3 0x08 |
Definition at line 83 of file globalDefines.h.
#define BIT3_16 0x0008 |
Definition at line 92 of file globalDefines.h.
#define BIT4 0x10 |
Definition at line 84 of file globalDefines.h.
Referenced by SCI0ISR().
#define BIT4_16 0x0010 |
Definition at line 93 of file globalDefines.h.
#define BIT5 0x20 |
Definition at line 85 of file globalDefines.h.
Referenced by SCI0ISR().
#define BIT5_16 0x0020 |
Definition at line 94 of file globalDefines.h.
#define BIT6 0x40 |
Definition at line 86 of file globalDefines.h.
Referenced by SCI0ISR().
#define BIT6_16 0x0040 |
Definition at line 95 of file globalDefines.h.
#define BIT7 0x80 |
Definition at line 87 of file globalDefines.h.
Referenced by SCI0ISR().
#define BIT7_16 0x0080 |
Definition at line 96 of file globalDefines.h.
#define BIT8_16 0x0100 |
Definition at line 98 of file globalDefines.h.
#define BIT9_16 0x0200 |
Definition at line 99 of file globalDefines.h.
#define BRV_FACTOR 1000 |
Definition at line 150 of file globalDefines.h.
#define densityOfFuelTotalDivisor 32000 |
Definition at line 250 of file globalDefines.h.
Referenced by calculateFuelAndIgnition().
#define densityOfOctane 22496 |
Definition at line 171 of file globalDefines.h.
#define divisorFor115200bps 22 |
Definition at line 252 of file globalDefines.h.
#define DWELL_DISABLE NBIT0 |
Definition at line 264 of file globalDefines.h.
Referenced by IgnitionDwellISR().
#define DWELL_ENABLE BIT0 |
Definition at line 263 of file globalDefines.h.
Referenced by IgnitionDwellISR(), and PrimaryRPMISR().
#define EGO_FACTOR 32768 |
Definition at line 152 of file globalDefines.h.
#define EPAGE_MIN 0x?? |
Definition at line 291 of file globalDefines.h.
#define ESCAPE_BYTE 0xBB |
Definition at line 137 of file globalDefines.h.
Referenced by SCI0ISR().
#define ESCAPED_ESCAPE_BYTE 0x44 |
Definition at line 140 of file globalDefines.h.
Referenced by SCI0ISR().
#define ESCAPED_START_BYTE 0x55 |
Definition at line 141 of file globalDefines.h.
Referenced by SCI0ISR().
#define ESCAPED_STOP_BYTE 0x33 |
Definition at line 142 of file globalDefines.h.
Referenced by SCI0ISR().
#define FALSE 0 |
Definition at line 62 of file globalDefines.h.
Referenced by calculateFuelAndIgnition(), generateCoreVars(), and generateDerivedVars().
#define flashSectorSize 1024 |
Definition at line 143 of file globalDefines.h.
Referenced by eraseSector(), writeBlock(), and writeSector().
#define flashSectorSizeInWords 512 |
Definition at line 144 of file globalDefines.h.
Referenced by writeBlock(), and writeSector().
#define freezingPoint 27315 |
Definition at line 159 of file globalDefines.h.
Referenced by generateCoreVars().
#define halfThrottle 32768 |
Definition at line 163 of file globalDefines.h.
Referenced by generateCoreVars().
#define idleAirFlow 1500 |
Definition at line 166 of file globalDefines.h.
#define idleManifoldPressure 3000 |
Definition at line 155 of file globalDefines.h.
#define idlePulseWidth 2000 |
Definition at line 165 of file globalDefines.h.
#define IGNITION_CHANNELS 12 |
Definition at line 259 of file globalDefines.h.
Referenced by calculateFuelAndIgnition().
#define IGNITION_DISABLE NBIT1 |
Definition at line 266 of file globalDefines.h.
Referenced by IgnitionFireISR().
#define IGNITION_ENABLE BIT1 |
Definition at line 265 of file globalDefines.h.
Referenced by IgnitionFireISR(), and PrimaryRPMISR().
#define INJECTION_CHANNELS 6 |
Definition at line 260 of file globalDefines.h.
Referenced by calculateFuelAndIgnition().
#define INLINE_ASSEMBLY | ( | code | ) | __asm__ __volatile__ (code) |
Definition at line 57 of file globalDefines.h.
#define LC1LambdaMax 49152 |
Definition at line 192 of file globalDefines.h.
#define LC1LambdaMin 16384 |
Definition at line 191 of file globalDefines.h.
#define LC1LambdaRange 32768 |
Definition at line 193 of file globalDefines.h.
#define LONGHALF 0x80000000 |
Definition at line 74 of file globalDefines.h.
Referenced by PrimaryRPMISR().
#define LONGMAX 0xFFFFFFFF |
Definition at line 75 of file globalDefines.h.
#define MAP_FACTOR 100 |
Definition at line 148 of file globalDefines.h.
#define maxExpectedBoost 30000 |
Definition at line 157 of file globalDefines.h.
#define MPX4100AMax 10750 |
Definition at line 215 of file globalDefines.h.
#define MPX4100AMin 1400 |
Definition at line 214 of file globalDefines.h.
#define MPX4100ARange 9350 |
Definition at line 216 of file globalDefines.h.
#define MPX4250AMax 26000 |
Definition at line 220 of file globalDefines.h.
#define MPX4250AMin 800 |
Definition at line 219 of file globalDefines.h.
#define MPX4250ARange 25200 |
Definition at line 221 of file globalDefines.h.
#define MPXH6300AMax 32000 |
Definition at line 224 of file globalDefines.h.
#define MPXH6300AMin 1200 |
Definition at line 223 of file globalDefines.h.
#define MPXH6300ARange 30800 |
Definition at line 225 of file globalDefines.h.
#define MPXH6400AMax 42000 |
Definition at line 228 of file globalDefines.h.
#define MPXH6400AMin 1200 |
Definition at line 227 of file globalDefines.h.
#define MPXH6400ARange 40800 |
Definition at line 229 of file globalDefines.h.
#define NBIT0 0xFE |
Definition at line 108 of file globalDefines.h.
#define NBIT0_16 0xFFFE |
Definition at line 117 of file globalDefines.h.
#define NBIT1 0xFD |
Definition at line 109 of file globalDefines.h.
#define NBIT10_16 0xFBFF |
Definition at line 128 of file globalDefines.h.
#define NBIT11_16 0xF7FF |
Definition at line 129 of file globalDefines.h.
#define NBIT12_16 0xEFFF |
Definition at line 130 of file globalDefines.h.
#define NBIT13_16 0xDFFF |
Definition at line 131 of file globalDefines.h.
#define NBIT14_16 0xBFFF |
Definition at line 132 of file globalDefines.h.
#define NBIT15_16 0x7FFF |
Definition at line 133 of file globalDefines.h.
#define NBIT1_16 0xFFFD |
Definition at line 118 of file globalDefines.h.
#define NBIT2 0xFB |
Definition at line 110 of file globalDefines.h.
Referenced by main().
#define NBIT2_16 0xFFFB |
Definition at line 119 of file globalDefines.h.
#define NBIT3 0xF7 |
Definition at line 111 of file globalDefines.h.
Referenced by main().
#define NBIT3_16 0xFFF7 |
Definition at line 120 of file globalDefines.h.
#define NBIT4 0xEF |
Definition at line 112 of file globalDefines.h.
#define NBIT4_16 0xFFEF |
Definition at line 121 of file globalDefines.h.
#define NBIT5 0xDF |
Definition at line 113 of file globalDefines.h.
#define NBIT5_16 0xFFDF |
Definition at line 122 of file globalDefines.h.
#define NBIT6 0xBF |
Definition at line 114 of file globalDefines.h.
#define NBIT6_16 0xFFBF |
Definition at line 123 of file globalDefines.h.
#define NBIT7 0x7F |
Definition at line 115 of file globalDefines.h.
#define NBIT7_16 0xFF7F |
Definition at line 124 of file globalDefines.h.
#define NBIT8_16 0xFEFF |
Definition at line 126 of file globalDefines.h.
#define NBIT9_16 0xFDFF |
Definition at line 127 of file globalDefines.h.
#define nearlyWOTMAP 9500 |
Definition at line 235 of file globalDefines.h.
#define offIdleMAP 3000 |
Definition at line 234 of file globalDefines.h.
#define oneHundredPercentVE 51200 |
Definition at line 246 of file globalDefines.h.
Referenced by calculateFuelAndIgnition().
#define ONES 0xFF |
Definition at line 67 of file globalDefines.h.
Referenced by initECTTimer(), initInterrupts(), initIO(), PortHISR(), PortJISR(), PortPISR(), sendDebugIfClear(), and sendErrorIfClear().
#define ONES16 0xFFFF |
Definition at line 71 of file globalDefines.h.
Referenced by initConfiguration(), and initECTTimer().
#define PPAGE_MIN 0xE0 |
Definition at line 290 of file globalDefines.h.
Referenced by decodePacketAndRespond().
#define roomTemperature 29315 |
Definition at line 160 of file globalDefines.h.
Referenced by calculateFuelAndIgnition(), and generateCoreVars().
#define RPAGE_FUEL_ONE 0xFA |
Definition at line 285 of file globalDefines.h.
Referenced by initPagedRAMFuel(), lookupBlockDetails(), and setupPagedRAM().
#define RPAGE_FUEL_TWO 0xFB |
Definition at line 286 of file globalDefines.h.
Referenced by initPagedRAMFuel(), lookupBlockDetails(), and setupPagedRAM().
#define RPAGE_MIN 0xF8 |
Definition at line 289 of file globalDefines.h.
Referenced by decodePacketAndRespond().
#define RPAGE_TIME_ONE 0xFC |
Definition at line 287 of file globalDefines.h.
Referenced by initPagedRAMTime(), lookupBlockDetails(), and setupPagedRAM().
#define RPAGE_TIME_TWO 0xFD |
Definition at line 288 of file globalDefines.h.
Referenced by initPagedRAMTime(), lookupBlockDetails(), and setupPagedRAM().
#define RPAGE_TUNE_ONE 0xF8 |
Definition at line 283 of file globalDefines.h.
Referenced by initPagedRAMTune(), lookupBlockDetails(), and setupPagedRAM().
#define RPAGE_TUNE_TWO 0xF9 |
Definition at line 284 of file globalDefines.h.
Referenced by initPagedRAMTune(), lookupBlockDetails(), and setupPagedRAM().
#define RPM_FACTOR 2 |
Definition at line 147 of file globalDefines.h.
#define runningTemperature 35815 |
Definition at line 161 of file globalDefines.h.
Referenced by generateCoreVars().
#define runningVoltage 14400 |
Definition at line 164 of file globalDefines.h.
Referenced by generateCoreVars().
#define RX_BUFFER_SIZE 0x0810 |
Definition at line 297 of file globalDefines.h.
Referenced by decodePacketAndRespond(), and SCI0ISR().
#define seaLevelKPa 10000 |
Definition at line 156 of file globalDefines.h.
Referenced by generateCoreVars(), and generateDerivedVars().
#define SHORTHALF 0x8000 |
Definition at line 76 of file globalDefines.h.
Referenced by safeScale().
#define SHORTMAX 0xFFFF |
Definition at line 77 of file globalDefines.h.
Referenced by safeAdd(), safeScale(), and safeTrim().
#define START_BYTE 0xAA |
Definition at line 138 of file globalDefines.h.
Referenced by checksumAndSend(), and SCI0ISR().
#define stoichiometricAFRBenzene 13282 |
Definition at line 183 of file globalDefines.h.
#define stoichiometricAFRButane 15469 |
Definition at line 178 of file globalDefines.h.
#define stoichiometricAFRE85 9862 |
Definition at line 184 of file globalDefines.h.
#define stoichiometricAFREthanol 9008 |
Definition at line 185 of file globalDefines.h.
#define stoichiometricAFRGasoline 14700 |
Definition at line 180 of file globalDefines.h.
#define stoichiometricAFRLPG 15599 |
Definition at line 177 of file globalDefines.h.
#define stoichiometricAFRMethane 17245 |
Definition at line 175 of file globalDefines.h.
#define stoichiometricAFRMethanol 6475 |
Definition at line 186 of file globalDefines.h.
#define stoichiometricAFROctane 15137 |
Definition at line 179 of file globalDefines.h.
#define stoichiometricAFRPropane 15685 |
Definition at line 176 of file globalDefines.h.
#define stoichiometricAFRToluene 13512 |
Definition at line 182 of file globalDefines.h.
#define stoichiometricAFRXylene 13681 |
Definition at line 181 of file globalDefines.h.
#define stoichiometricLambda 32768 |
Definition at line 172 of file globalDefines.h.
Referenced by calculateFuelAndIgnition(), and generateCoreVars().
#define STOP_BYTE 0xCC |
Definition at line 139 of file globalDefines.h.
Referenced by SCI0ISR().
#define tachoTickFactor4at50 6 |
Definition at line 239 of file globalDefines.h.
#define tachoTotalFactor4at50 48 |
Definition at line 241 of file globalDefines.h.
#define TEMP_FACTOR 100 |
Definition at line 151 of file globalDefines.h.
#define ticksPerCycleAtOneRPM 150000000 |
Definition at line 238 of file globalDefines.h.
Referenced by ModDownCtrISR(), and resetToNonRunningState().
#define ticksPerCycleAtOneRPMx2 300000000 |
Definition at line 237 of file globalDefines.h.
Referenced by PrimaryRPMISR().
#define TPS_FACTOR 640 |
Definition at line 149 of file globalDefines.h.
#define TPSDefaultMax 767 |
Definition at line 232 of file globalDefines.h.
#define TPSDefaultMin 255 |
Definition at line 231 of file globalDefines.h.
#define TransferTableSize 2048 |
Definition at line 298 of file globalDefines.h.
Referenced by lookupBlockDetails().
#define TRUE !FALSE |
Definition at line 63 of file globalDefines.h.
Referenced by calculateFuelAndIgnition(), generateCoreVars(), generateDerivedVars(), initAllPagedRAM(), main(), and RTIISR().
#define TX_BUFFER_SIZE 0x0820 |
Definition at line 296 of file globalDefines.h.
#define TX_MAX_PAYLOAD_SIZE 2048 |
Definition at line 299 of file globalDefines.h.
Referenced by decodePacketAndRespond().
#define typicalCylinderSize 16384 |
Definition at line 168 of file globalDefines.h.
#define typicalInjectorSize 9387 |
Definition at line 169 of file globalDefines.h.
#define ZEROS 0x00 |
Definition at line 66 of file globalDefines.h.
Referenced by initECTTimer(), initInterrupts(), and initIO().
#define ZEROS16 0x0000 |
Definition at line 70 of file globalDefines.h.