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.

23 lines
439 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. // base interface for generic pin handler.
  7. class BasePin {
  8. public:
  9. BasePin(unsigned char pin) :
  10. pin(pin)
  11. {}
  12. virtual void pinMode(int8_t mode) = 0;
  13. virtual void digitalWrite(int8_t val) = 0;
  14. virtual int digitalRead() = 0;
  15. const unsigned char pin;
  16. };