3-phase PV router
Loading...
Searching...
No Matches
utils_override_helpers.h File Reference

Config-dependent helper functions for override pin configuration. More...

#include "utils_override.h"
Include dependency graph for utils_override_helpers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

constexpr uint16_t ALL_LOADS ()
 Returns a bitmask representing all load pins.
 
constexpr uint16_t ALL_LOADS_AND_RELAYS ()
 Returns a bitmask representing all loads and all relays.
 
constexpr uint16_t ALL_RELAYS ()
 Returns a bitmask representing all relay pins.
 
constexpr uint8_t LOAD (uint8_t loadNum)
 Returns the pin number for a given load index at compile time.
 
constexpr uint8_t RELAY (uint8_t relayNum)
 Returns the pin number for a given relay index at compile time.
 

Detailed Description

Config-dependent helper functions for override pin configuration.

This file provides convenience functions like LOAD(), RELAY(), ALL_LOADS(), etc. that depend on configuration values defined in config.h.

IMPORTANT: This file must be included AFTER physicalLoadPin[], relays, NO_OF_DUMPLOADS, and RELAY_DIVERSION are defined in config.h.

Author
Frederic Metrich (frede.nosp@m.ric..nosp@m.metri.nosp@m.ch@l.nosp@m.ive.f.nosp@m.r)
Version
0.1
Date
2026-01-28

Definition in file utils_override_helpers.h.

Function Documentation

◆ ALL_LOADS()

uint16_t ALL_LOADS ( )
constexpr

Returns a bitmask representing all load pins.

Returns
Bitmask with all load pins set.

Definition at line 47 of file utils_override_helpers.h.

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

◆ ALL_LOADS_AND_RELAYS()

uint16_t ALL_LOADS_AND_RELAYS ( )
constexpr

Returns a bitmask representing all loads and all relays.

Returns
Bitmask with all load and relay pins set.

Definition at line 82 of file utils_override_helpers.h.

Here is the call graph for this function:

◆ ALL_RELAYS()

uint16_t ALL_RELAYS ( )
constexpr

Returns a bitmask representing all relay pins.

Returns
Bitmask with all relay pins set, or 0 if RELAY_DIVERSION is disabled.

Definition at line 61 of file utils_override_helpers.h.

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

◆ LOAD()

uint8_t LOAD ( uint8_t loadNum)
constexpr

Returns the pin number for a given load index at compile time.

Parameters
loadNumThe load index (0-based).
Returns
The pin number for the load.

Definition at line 27 of file utils_override_helpers.h.

◆ RELAY()

uint8_t RELAY ( uint8_t relayNum)
constexpr

Returns the pin number for a given relay index at compile time.

Parameters
relayNumThe relay index (0-based).
Returns
The pin number for the relay.
Note
Only use when RELAY_DIVERSION is enabled.

Definition at line 38 of file utils_override_helpers.h.