DIY fertilizer mixer and plant watering machine https://www.xythobuz.de/giessomat.html
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

GPIOBank.h 445B

12345678910111213141516171819202122232425
  1. #ifndef _GPIO_BANK_H_
  2. #define _GPIO_BANK_H_
  3. class GPIOBank {
  4. public:
  5. GPIOBank(int _size);
  6. ~GPIOBank(void);
  7. void setPinNumbers(int _pins[]);
  8. void setOutput(void);
  9. void setInput(bool pullup);
  10. int getSize(void);
  11. void setPin(int n, bool state);
  12. void setAll(bool state);
  13. bool getPin(int n);
  14. private:
  15. int size;
  16. int *pins;
  17. bool *out_state;
  18. bool is_output;
  19. };
  20. #endif // _GPIO_BANK_H_