fiber
Loading...
Searching...
No Matches
fiber::PinTuple< Pins > Class Template Reference

A tuple (heterogenious collection) of pins that can be written together as if it was a port. More...

#include <cPin.hpp>

Public Member Functions

constexpr PinTuple (Pins... pins)
 constructs a PinTuple from a list of pins
 
constexpr void write (std::bitset< sizeof...(Pins)> values)
 writes each bit to each corresponding pin
 
constexpr void dir (std::bitset< sizeof...(Pins)> values)
 writes each bit to configure each corresponding pin
 
constexpr std::bitset< sizeof...(Pins)> read ()
 reads from all pins and writes their results to the corresponding bit position
 
template<size_t pin>
requires (pin < sizeof...(Pins))
constexpr auto view ()
 returns a view of the corresponding pin position
 

Detailed Description

template<typename... Pins>
requires (cPin<Pins> && ...)
class fiber::PinTuple< Pins >

A tuple (heterogenious collection) of pins that can be written together as if it was a port.

Constructor & Destructor Documentation

◆ PinTuple()

template<typename... Pins>
fiber::PinTuple< Pins >::PinTuple ( Pins... pins)
inlineconstexpr

constructs a PinTuple from a list of pins

Member Function Documentation

◆ dir()

template<typename... Pins>
void fiber::PinTuple< Pins >::dir ( std::bitset< sizeof...(Pins)> values)
inlineconstexpr

writes each bit to configure each corresponding pin

◆ read()

template<typename... Pins>
std::bitset< sizeof...(Pins)> fiber::PinTuple< Pins >::read ( )
inlinenodiscardconstexpr

reads from all pins and writes their results to the corresponding bit position

◆ view()

template<typename... Pins>
template<size_t pin>
requires (pin < sizeof...(Pins))
auto fiber::PinTuple< Pins >::view ( )
inlinenodiscardconstexpr

returns a view of the corresponding pin position

◆ write()

template<typename... Pins>
void fiber::PinTuple< Pins >::write ( std::bitset< sizeof...(Pins)> values)
inlineconstexpr

writes each bit to each corresponding pin


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