rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Functions
rusefi.h File Reference

Detailed Description

Date
Dec 25, 2013
Author
Andrey Belomutskiy, (c) 2012-2020

Definition in file rusefi.h.

Functions

__NO_RETURN void runRusEfi ()
 
__NO_RETURN void rebootNow ()
 
void preHalInit ()
 

Function Documentation

◆ preHalInit()

void preHalInit ( )

Referenced by main().

Here is the caller graph for this function:

◆ rebootNow()

__NO_RETURN void rebootNow ( )

Definition at line 150 of file rusefi.cpp.

150 {
151 NVIC_SystemReset();
152}

Referenced by executeTSCommand(), and scheduleReboot().

Here is the caller graph for this function:

◆ runRusEfi()

__NO_RETURN void runRusEfi ( )

we need to initialize table objects before default configuration can set values

Next we should initialize serial port console, it's important to know what's going on

Definition at line 174 of file rusefi.cpp.

174 {
175 engine->setConfig();
176
177#if EFI_TEXT_LOGGING
178 // Initialize logging system early - we can't log until this is called
180#endif
181
182#if HAL_USE_WDG
183 setWatchdogResetPeriod(WATCHDOG_RESET_MS);
185#endif // HAL_USE_WDG
186
187#if EFI_PROD_CODE
190#endif
191
192#if defined(STM32F4) || defined(STM32F7)
193 addConsoleAction("stm32_standby", stm32_standby);
194#endif
195
196 addConsoleAction(CMD_REBOOT, scheduleReboot);
197#if EFI_DFU_JUMP
198 addConsoleAction(CMD_REBOOT_DFU, jump_to_bootloader);
199#endif /* EFI_DFU_JUMP */
200
201#if EFI_USE_OPENBLT
202 addConsoleAction(CMD_REBOOT_OPENBLT, jump_to_openblt);
203#endif
204
205 /**
206 * we need to initialize table objects before default configuration can set values
207 */
209
210 // Perform hardware initialization that doesn't need configuration
212
213 // at the moment that's always hellen board ID
215
216 engine->engineModules.apply_all([](auto & m) {
217 m.initNoConfiguration();
218 });
219
220#if EFI_USB_SERIAL
222#endif
223
224#if HAL_USE_USB_MSD
225 initUsbMsd();
226#endif
227
228 /**
229 * Next we should initialize serial port console, it's important to know what's going on
230 */
232
233 // Read configuration from flash memory
235
236#if EFI_TUNER_STUDIO
238#endif /* EFI_TUNER_STUDIO */
239
240 // Start hardware serial ports (including bluetooth, if present)
241#if EFI_TUNER_STUDIO
243#endif // EFI_TUNER_STUDIO
244
246
247 // periodic events need to be initialized after fuel&spark pins to avoid a warning
249 initMainLoop();
250
251 runMainLoop();
252}
void stm32_standby()
Definition mpu_util.cpp:18
void startWatchdog(int)
void setWatchdogResetPeriod(int)
void jump_to_openblt()
void jump_to_bootloader()
void setConfig()
Definition engine.cpp:397
type_list< Mockable< InjectorModelPrimary >, Mockable< InjectorModelSecondary >,#if EFI_IDLE_CONTROL Mockable< IdleController >,#endif TriggerScheduler,#if EFI_HPFP &&EFI_ENGINE_CONTROL Mockable< HpfpController >,#endif #if EFI_ENGINE_CONTROL Mockable< ThrottleModel >,#endif #if EFI_ALTERNATOR_CONTROL AlternatorController,#endif MainRelayController, Mockable< IgnitionController >, Mockable< AcController >, PrimeController, DfcoController,#if EFI_HD_ACR HarleyAcr,#endif Mockable< WallFuelController >, KnockController, SensorChecker,#if EFI_ENGINE_CONTROL Mockable< LimpManager >,#endif #if EFI_VVT_PID VvtController1, VvtController2, VvtController3, VvtController4,#endif #if EFI_BOOST_CONTROL BoostController,#endif TpsAccelEnrichment,#if EFI_LAUNCH_CONTROL NitrousController,#endif #if EFI_LTFT_CONTROL LongTermFuelTrim,#endif ShortTermFuelTrim,#include "modules_list_generated.h" EngineModule > engineModules
Definition engine.h:194
void addConsoleAction(const char *token, Void callback)
Register console action without parameters.
void detectBoardType()
void initializeConsole()
void startUsbConsole()
static EngineAccessor engine
Definition engine.h:413
void loadConfiguration()
void initPeriodicEvents()
void initDataStructures()
void errorHandlerInit()
void errorHandlerShowBootReasonAndErrors()
void initHardwareNoConfig()
Definition hardware.cpp:427
void startLoggingProcessor()
void initMainLoop()
Definition main_loop.cpp:67
void initUsbMsd()
void scheduleReboot()
Definition rusefi.cpp:158
void initEfiWithConfig()
Definition rusefi.cpp:254
__NO_RETURN void runMainLoop()
Definition rusefi.cpp:288
void startTunerStudioConnectivity()
void startSerialChannels()

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

Go to the source code of this file.