![]() |
Speeduino
|
Reset control functionality, to prevent resets while the engine is running (if configured to do so) More...
#include "statuses.h"
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 ¤t) |
| Match reset control to the current engine state. | |
Reset control functionality, to prevent resets while the engine is running (if configured to do so)
|
strong |
| ResetControlMode getResetControlMode | ( | void | ) |
Get the reset control mode as set during initialisation.

| void initialiseResetControl | ( | ResetControlMode | resetControlMode, |
| uint8_t | resetPin | ||
| ) |
Initialise the reset control system, with the given mode and reset pin.


Check if reset prevention is active.

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.

