Speeduino
Loading...
Searching...
No Matches
Enumerations | Functions
resetControl.h File Reference

Reset control functionality, to prevent resets while the engine is running (if configured to do so) More...

#include "statuses.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum class  ResetControlMode : uint8_t { Disabled = 0U , PreventWhenRunning = 1U , PreventAlways = 2U , SerialCommand = 3U }
 Available reset control modes. More...
 

Functions

void initialiseResetControl (ResetControlMode resetControlMode, uint8_t resetPin)
 Initialise the reset control system, with the given mode and reset pin.
 
ResetControlMode getResetControlMode (void)
 Get the reset control mode as set during initialisation.
 
bool isResetPreventActive (void)
 Check if reset prevention is active.
 
void matchResetControlToEngineState (const statuses &current)
 Match reset control to the current engine state.
 

Detailed Description

Reset control functionality, to prevent resets while the engine is running (if configured to do so)

See also
https://wiki.speeduino.com/en/configuration/Reset_Control

Enumeration Type Documentation

◆ ResetControlMode

Available reset control modes.

Enumerator
Disabled 

Disabled

PreventWhenRunning 

Prevent reset when engine is running

PreventAlways 

Prevent reset always

SerialCommand 

Reset via serial command

Function Documentation

◆ getResetControlMode()

ResetControlMode getResetControlMode ( void  )

Get the reset control mode as set during initialisation.

Here is the caller graph for this function:

◆ initialiseResetControl()

void initialiseResetControl ( ResetControlMode  resetControlMode,
uint8_t  resetPin 
)

Initialise the reset control system, with the given mode and reset pin.

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

◆ isResetPreventActive()

bool isResetPreventActive ( void  )

Check if reset prevention is active.

Here is the caller graph for this function:

◆ matchResetControlToEngineState()

void matchResetControlToEngineState ( const statuses current)

Match reset control to the current engine state.

When the mode is set to PreventWhenRunning, this will set the reset pin HIGH (to prevent reset) if the engine is running, and LOW otherwise. This should be called regularly in the main loop.

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