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

Concept for a pin that can be immediatly written to. More...

#include <cPin.hpp>

Concept definition

template<class Pin>
concept fiber::cOutPin = requires(Pin pin, bool level){
{ pin.high() } -> std::same_as<void>;
{ pin.low() } -> std::same_as<void>;
{ pin.write(level) } -> std::same_as<void>;
}
Concept for a pin that can be immediatly written to.
Definition cPin.hpp:50

Detailed Description

Concept for a pin that can be immediatly written to.

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


void write(bool b);

sets the pin output level to the passed state

  • param b: the new state for the pin
    • true: logic high
    • false: logic low

void high();

sets the pin to logic high


void low();

sets the pin to logic low

reads the value from the pin

Returns: the logic value applied to the pin.