Mutila: Mouse's Utilities for Arduino
Oft-used utilities: debouncing buttons, averaging samples, and so on.
src
DebouncedButton.h
1
#pragma once
2
3
#include <stdint.h>
4
#include "AbstractDebouncedButton.h"
5
#include "DigitalInputButton.h"
6
15
class
DebouncedButton
:
public
AbstractDebouncedButton
,
public
DigitalInputButton
{
16
public
:
22
DebouncedButton
(uint8_t pin,
bool
pullup=
true
);
23
28
virtual
~DebouncedButton
() {;}
29
40
void
begin
(uint8_t threshold=AbstractDebouncedButton::DefaultThreshold, uint8_t delay=AbstractDebouncedButton::DefaultButtonDelay);
41
46
void
update
();
47
52
bool
on
();
53
54
};
55
56
DigitalInputButton::begin
void begin()
Definition:
DigitalInputButton.cpp:10
AbstractDebouncedButton
Definition:
AbstractDebouncedButton.h:11
DebouncedButton::DebouncedButton
DebouncedButton(uint8_t pin, bool pullup=true)
Definition:
DebouncedButton.cpp:6
DebouncedButton
Definition:
DebouncedButton.h:15
DebouncedButton::~DebouncedButton
virtual ~DebouncedButton()
Definition:
DebouncedButton.h:28
DebouncedButton::update
void update()
Definition:
DebouncedButton.cpp:17
DebouncedButton::on
bool on()
Definition:
DebouncedButton.cpp:31
DigitalInputButton
Definition:
DigitalInputButton.h:14
Generated by
1.8.15