Speeduino
Loading...
Searching...
No Matches
Functions | Variables
resetControl.cpp File Reference
#include "resetControl.h"
#include "unit_testing.h"

Functions

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

Variables

static ResetControlMode _resetControl = ResetControlMode::Disabled
 
static uint8_t _resetPin
 
static bool _resetPreventActive = false
 

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:

Variable Documentation

◆ _resetControl

◆ _resetPin

uint8_t _resetPin
static

◆ _resetPreventActive

bool _resetPreventActive = false
static