3-phase PV router
Loading...
Searching...
No Matches
PinList< MaxPins > Struct Template Reference

Wrapper for a list of pins, constructible from variadic arguments. More...

#include <utils_override.h>

Public Member Functions

constexpr PinList ()
 Default constructor. Initializes with zero pins.
 
template<typename... Args>
constexpr PinList (Args... args)
 Variadic constructor. Initializes with provided pins.
 
constexpr PinList (uint16_t bitmask)
 Constructor from bitmask. Sets pin numbers from bits set in bitmask.
 
constexpr uint16_t toBitmask () const
 Converts the pin list to a bitmask.
 

Public Attributes

uint8_t count
 
uint8_t pins [MaxPins]
 

Detailed Description

template<uint8_t MaxPins>
struct PinList< MaxPins >

Wrapper for a list of pins, constructible from variadic arguments.

Template Parameters
MaxPinsMaximum number of pins supported.

Definition at line 139 of file utils_override.h.

Constructor & Destructor Documentation

◆ PinList() [1/3]

template<uint8_t MaxPins>
PinList< MaxPins >::PinList ( )
inlineconstexpr

Default constructor. Initializes with zero pins.

Definition at line 147 of file utils_override.h.

◆ PinList() [2/3]

template<uint8_t MaxPins>
PinList< MaxPins >::PinList ( uint16_t bitmask)
inlineconstexpr

Constructor from bitmask. Sets pin numbers from bits set in bitmask.

Parameters
bitmaskBitmask value.

Definition at line 154 of file utils_override.h.

◆ PinList() [3/3]

template<uint8_t MaxPins>
template<typename... Args>
PinList< MaxPins >::PinList ( Args... args)
inlineconstexpr

Variadic constructor. Initializes with provided pins.

Parameters
argsList of pins.

Definition at line 171 of file utils_override.h.

Member Function Documentation

◆ toBitmask()

template<uint8_t MaxPins>
uint16_t PinList< MaxPins >::toBitmask ( ) const
inlineconstexpr

Converts the pin list to a bitmask.

Returns
Bitmask with bits set at the specified pins.

Definition at line 178 of file utils_override.h.

Member Data Documentation

◆ count

template<uint8_t MaxPins>
uint8_t PinList< MaxPins >::count

Definition at line 142 of file utils_override.h.

◆ pins

template<uint8_t MaxPins>
uint8_t PinList< MaxPins >::pins[MaxPins]

Definition at line 141 of file utils_override.h.


The documentation for this struct was generated from the following file: