Mutila: Mouse's Utilities for Arduino
Oft-used utilities: debouncing buttons, averaging samples, and so on.
DualInputButton.h
1 #pragma once
2 
3 #include <stdint.h>
4 #include "AbstractButton.h"
5 
19 public:
20  enum MixMode {
21  Or,
22  Xor,
23  And
24  };
25 public:
32  DualInputButton(AbstractButton& button1, AbstractButton& button2, const MixMode mix=Or);
33 
41  void begin(bool callBeginInChildren=true);
42 
47  bool on();
48 
49 protected:
50  AbstractButton& _button1;
51  AbstractButton& _button2;
52  const MixMode _mix;
53 
54 };
55 
virtual void begin()
DualInputButton(AbstractButton &button1, AbstractButton &button2, const MixMode mix=Or)