rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Data Structures | Functions
start_stop.h File Reference

Data Structures

struct  StartStopState
 

Functions

void doStartCranking ()
 
void initStartStopButton ()
 

Function Documentation

◆ doStartCranking()

void doStartCranking ( )

Definition at line 19 of file start_stop.cpp.

19 {
20 bool wasStarterEngaged = enginePins.starterControl.getAndSet(1);
21 if (!wasStarterEngaged) {
23 efiPrintf("Let's crank this engine for up to %d seconds via %s!",
26 }
27}
StartStopState startStopState
Definition engine.h:100
RegisteredOutputPin starterControl
Definition efi_gpio.h:82
bool getAndSet(int logicValue)
Definition efi_gpio.cpp:561
EnginePins enginePins
Definition efi_gpio.cpp:24
static Engine *const engine
Definition engine.h:390
static constexpr engine_configuration_s * engineConfiguration
const char * hwPortname(brain_pin_e brainPin)
Timer startStopStateLastPush
Definition start_stop.h:8

Referenced by configureRusefiLuaHooks(), and onStartStopButtonToggle().

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

◆ initStartStopButton()

void initStartStopButton ( )

See test_start_stop.cpp

Definition at line 11 of file start_stop.cpp.

11 {
12 /* startCrankingDuration is efitimesec_t, so we need to multiply it by 1000 to get milliseconds*/
17}
void init(efitimems_t threshold, brain_pin_e &pin, pin_input_mode_e &mode, bool inverted=false)
Definition debounce.cpp:23
ButtonDebounce startStopButtonDebounce
Definition start_stop.h:6

Go to the source code of this file.