|
3-phase PV router
|
Manages override pins and their associated bitmasks for forced operation. More...
#include <utils_override.h>

Classes | |
| struct | Entry |
| Internal structure representing a pin and its associated bitmask. More... | |
Public Member Functions | |
| constexpr | OverridePins (const KeyIndexPair< MaxPins >(&pairs)[N]) |
| Constructor. Initializes the override pin mapping from pin-index pairs. | |
| constexpr uint16_t | findBitmask (uint8_t pin) const |
| Finds the bitmask associated with a given pin number. | |
| constexpr uint16_t | getBitmask (uint8_t index) const |
| Returns the bitmask for the specified entry index. | |
| constexpr uint8_t | getPin (uint8_t index) const |
| Returns the pin number at the specified entry index. | |
| constexpr uint8_t | size () const |
| Returns the number of override pin entries. | |
Private Attributes | |
| const Entry | entries_ [N] |
Manages override pins and their associated bitmasks for forced operation.
This class provides compile-time mapping between override pins and the loads/relays they control. Each pin can be associated with a set of pins (loads/relays), represented as a bitmask.
| N | Number of pin-index pairs (entries). |
| MaxPins | Maximum number of pins supported (loads + relays). Default is 16 (enough for most configurations). |
Definition at line 161 of file utils_override.h.
|
inlineconstexpr |
Constructor. Initializes the override pin mapping from pin-index pairs.
| pairs | Array of pin-index pairs, each specifying a pin and its associated pins. |
Definition at line 187 of file utils_override.h.
|
inlineconstexpr |
Finds the bitmask associated with a given pin number.
| pin | Pin value to search for. |
Definition at line 235 of file utils_override.h.
|
inlineconstexpr |
Returns the bitmask for the specified entry index.
| index | Index in the entries array. |
Definition at line 225 of file utils_override.h.
|
inlineconstexpr |
Returns the pin number at the specified entry index.
| index | Index in the entries array. |
Definition at line 215 of file utils_override.h.
|
inlineconstexpr |
Returns the number of override pin entries.
Definition at line 205 of file utils_override.h.
|
private |
Array of entries for all pin-index pairs.
Definition at line 179 of file utils_override.h.