/* Part of the GPIO MODULE Copyright (C) 2017-2019 by Xose PĂ©rez */ #pragma once #include "gpio.h" #include class GpioPin final : public BasePin { public: explicit GpioPin(unsigned char pin_) : BasePin(pin_) {} void pinMode(int8_t mode) override { ::pinMode(this->pin, mode); } void digitalWrite(int8_t val) override { ::digitalWrite(this->pin, val); } String description() const override { static String desc(String(F("GpioPin @ GPIO")) + static_cast(pin)); return desc; } int digitalRead() { return ::digitalRead(this->pin); } };