|
3-phase PV router
|
Compile-time utilities for managing override pins and index-to-bitmask mapping. More...
#include "type_traits.hpp"

Go to the source code of this file.
Classes | |
| struct | OverridePins< N, MaxPins >::Entry |
| Internal structure representing a pin and its associated bitmask. More... | |
| struct | KeyIndexPair< MaxPins > |
| Structure holding a pin and its associated index list. More... | |
| class | OverridePins< N, MaxPins > |
| Manages override pins and their associated bitmasks for forced operation. More... | |
| struct | PinList< MaxPins > |
| Wrapper for a list of pins, constructible from variadic arguments. More... | |
Macros | |
| #define | VALIDATE_PINS(...) |
| Helper macro to validate pins at compile time. Usage: VALIDATE_PINS(2, 3, 5) will cause a compile error if any pin is invalid. | |
Functions | |
| template<uint8_t... Pins> | |
| constexpr bool | are_pins_valid () |
| Compile-time validation function for pin values. | |
| template<uint8_t... Pins> | |
| constexpr uint16_t | indicesToBitmask () |
| Helper to convert pins to a bitmask at compile-time. | |
| template<uint8_t MaxPins, uint8_t N> | |
| OverridePins (const KeyIndexPair< MaxPins >(&)[N]) -> OverridePins< N, MaxPins > | |
| Deduction guide for OverridePins template. Allows template argument deduction from constructor arguments. | |
Variables | |
| constexpr uint16_t | validPinMask { 0b11111111111100 } |
Compile-time utilities for managing override pins and index-to-bitmask mapping.
This header provides types and functions for representing and manipulating sets of override pins and their associated pins, all at compile time. It enables efficient bitmask computation and static configuration of pin mappings for embedded systems, such as PVRouter.
Pin features:
Usage example:
Definition in file utils_override.h.
| #define VALIDATE_PINS | ( | ... | ) |
Helper macro to validate pins at compile time. Usage: VALIDATE_PINS(2, 3, 5) will cause a compile error if any pin is invalid.
Definition at line 54 of file utils_override.h.
|
constexpr |
Compile-time validation function for pin values.
| Pins | List of pins to validate. |
Definition at line 45 of file utils_override.h.

|
constexpr |
Helper to convert pins to a bitmask at compile-time.
| Pins | List of pins to set in the bitmask. |
Definition at line 62 of file utils_override.h.

| OverridePins | ( | const KeyIndexPair< MaxPins > | (&)[N] | ) | -> OverridePins< N, MaxPins > |
Deduction guide for OverridePins template. Allows template argument deduction from constructor arguments.
|
constexpr |
Definition at line 37 of file utils_override.h.