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.

28 lines
494 B

  1. /*
  2. GPIO MODULE
  3. Copyright (C) 2017-2019 by Xose Pérez <xose dot perez at gmail dot com>
  4. */
  5. #pragma once
  6. #include "libs/BasePin.h"
  7. // real hardware pin
  8. class GpioPin final : virtual public BasePin {
  9. public:
  10. GpioPin(unsigned char pin);
  11. void pinMode(int8_t mode);
  12. void digitalWrite(int8_t val);
  13. int digitalRead();
  14. };
  15. bool gpioValid(unsigned char gpio);
  16. bool gpioGetLock(unsigned char gpio);
  17. bool gpioReleaseLock(unsigned char gpio);
  18. void gpioSetup();