Fork of the espurna firmware for `mhsw` switches
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
459 B

  1. /*
  2. Part of BUTTON module
  3. Copyright (C) 2020 by Maxim Prokhorov <prokhorov dot max at outlook dot com>
  4. */
  5. #pragma once
  6. #include <cstdint>
  7. // base interface for generic pin handler.
  8. class BasePin {
  9. public:
  10. BasePin(unsigned char pin) :
  11. pin(pin)
  12. {}
  13. virtual void pinMode(int8_t mode) = 0;
  14. virtual void digitalWrite(int8_t val) = 0;
  15. virtual int digitalRead() = 0;
  16. const unsigned char pin;
  17. };