|
3-phase PV router
|
The edges of the active-LOW input pins: pressed, released, or no change. More...
#include <stdint.h>

Go to the source code of this file.
Classes | |
| struct | PinEdges |
| State of an active-LOW input pin, and how it changed since the previous reading. More... | |
Functions | |
| constexpr bool | isRotationRequested (const PinEdges &pin, const bool bOverridden) |
| Tells whether the rotation pin asks for a rotation now. | |
| constexpr PinEdges | pinEdges (const bool wasActive, const bool active) |
| The edges of a pin, from its previous level and its current one. | |
| template<uint8_t pin> | |
| PinEdges | trackPinEdges (const bool active) |
| Gives the edges of a pin from its current level, and keeps that level for the next call. | |
The edges of the active-LOW input pins: pressed, released, or no change.
The diversion, router OFF, dual tariff and rotation pins are read once per second. Each one keeps its previous level, released at startup: the new level and the previous one give its edges.
Definition in file pin_edges.h.
|
constexpr |
Tells whether the rotation pin asks for a rotation now.
| pin | the edges of the rotation pin, read every second, forced or not. |
| bOverridden | true while a load, relay or remote load is forced. |
Definition at line 87 of file pin_edges.h.


|
constexpr |
The edges of a pin, from its previous level and its current one.
| wasActive | the pin was LOW at the previous reading. |
| active | the pin is LOW now. |
Definition at line 54 of file pin_edges.h.

| PinEdges trackPinEdges | ( | const bool | active | ) |
Gives the edges of a pin from its current level, and keeps that level for the next call.
| pin | the input pin: each one keeps its own previous level, released at startup. |
| active | the pin is LOW now. |
Call it for each pin every second, whether its edges are used or not: a previous level left stale would turn a press made long ago into an edge now.
Definition at line 70 of file pin_edges.h.

