10 #ifndef DIGITALPINBASE_HPP 11 #define DIGITALPINBASE_HPP 15 namespace duds {
namespace hardware {
namespace interface {
29 std::shared_ptr<DigitalPort>
dp;
51 const std::shared_ptr<DigitalPort> &
port()
const {
65 #endif // #ifndef DIGITALPINBASE_HPP ~DigitalPinBase()=default
Cannot be destructed using this base class to avoid the need for a virtual destructor.
std::shared_ptr< DigitalPort > dp
The port object that can grant access to the pin(s).
const std::shared_ptr< DigitalPort > & port() const
Returns the port that grants access to the pin(s) referenced by this object.
void reset()
Resets the shared pointer to the DigitalPort so that this object no longer represents a pin...
DigitalPinBase()=default
Cannot be constructed using this base class, but allows the construction of a useless object without ...
DigitalPinBase(const std::shared_ptr< DigitalPort > &port)
Initializes the port.
A base class for classes that represent one or more pins on a single DigitalPort, but do not provide ...