fiber
Loading...
Searching...
No Matches
fiber::cPins Concept Reference

Concept for tri-state pin (high, low, input) that can be immediatelly read from and written to. More...

#include <cPin.hpp>

Concept definition

template<class Pins, std::size_t N>
concept fiber::cPins = requires(Pins pins, std::bitset<N> values){
{ pins.write(values) } -> std::same_as<void>;
{ pins.dir(values) } -> std::same_as<void>;
{ pins.read() } -> std::same_as<std::bitset<N>>;
{ pins.template view<0>() } -> cPin;
}
Concept for tri-state pin (high, low, input) that can be immediatelly read from and written to.
Definition cPin.hpp:175
Concept for tri-state pin (high, low, input) that can be immediatelly read from and written to.
Definition cPin.hpp:228

Detailed Description

Concept for tri-state pin (high, low, input) that can be immediatelly read from and written to.

Pin without any practical delay, like pins of the micro controller

The write() function writes levels to output pins and ignores values for input pins, where:

  • true, 1 --> High
  • false, 0 --> Low

The dir() function specifies the input/output direction of the pin, where:

  • true, '1' --> Input
  • false, '0' --> Output