Mutila: Mouse's Utilities for Arduino
Oft-used utilities: debouncing buttons, averaging samples, and so on.
src
DualInputButton.h
1
#pragma once
2
3
#include <stdint.h>
4
#include "AbstractButton.h"
5
18
class
DualInputButton
:
public
AbstractButton
{
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
DualInputButton
Definition:
DualInputButton.h:18
DualInputButton::on
bool on()
Definition:
DualInputButton.cpp:19
AbstractButton
Definition:
AbstractButton.h:10
AbstractButton::begin
virtual void begin()
Definition:
AbstractButton.h:23
DualInputButton::DualInputButton
DualInputButton(AbstractButton &button1, AbstractButton &button2, const MixMode mix=Or)
Definition:
DualInputButton.cpp:4
Generated by
1.8.15