Go to the source code of this file.
◆ FLEX_USES_RPM2
| #define FLEX_USES_RPM2 |
( |
| ) |
((configPage2.flexEnabled > 0U) && (pinFlex == pinTrigger2) && (!currentStatus.decoder.secondary.isValid())) |
◆ VSS_USES_RPM2
◆ initialiseAll()
Initialise Speeduino for the main loop. Top level init entry point for all initialisations:
- Initialise and set sizes of 3D tables
- Load config from EEPROM, update config structures to current version of SW if needed.
- Initialise board (The initBoard() is for board X implemented in board_X.ino file)
- Initialise timers (See timers.ino)
- Perform optional SD card and RTC battery inits
- Load calibration tables from EEPROM
- Perform pin mapping (calling setPinMapping() based on config2::pinMapping)
- Stop any coil charging and close injectors
- Initialise schedulers, Idle, Fan, auxPWM, Corrections, AD-conversions, Programmable I/O
- Initialise baro (ambient pressure) by reading MAP (before engine runs)
- Initialise triggers (by initialiseTriggers() )
- Perform cyl. count based initialisations (config2::nCylinders)
- Perform injection and spark mode based setup
- Assign injector open/close and coil charge begin/end functions to their dedicated global vars
- Perform fuel pressure priming by turning fuel pump on
- Read CLT and TPS sensors to have cranking pulsewidths computed correctly
- Mark Initialisation completed (this flag-marking is used in code to prevent after-init changes)
◆ setPinMapping()
Set board / microcontroller specific pin mappings / assignments. The boardID is switch-case compared against raw boardID integers (not enum or defined label, and probably no need for that either) which are originated from tuning SW (e.g. TS) set values and are available in reference/speeduino.ini (See pinLayout, note also that numbering is not contiguous here).