Bela
Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
GpioDebounce.h
1 #pragma once
2 #include <Gpio.h>
3 #include <libraries/Debounce/Debounce.h>
4 #include <memory>
5 
10 class GpioDebounce : public Debounce
11 {
12 public:
16  GpioDebounce(unsigned int interval, unsigned int channel);
26  int setup(unsigned int interval, unsigned int channel);
30  bool process() { return Debounce::process(gpio->read()); }
31 private:
32  std::shared_ptr<Gpio> gpio;
33 };
Definition: GpioDebounce.h:10
bool process()
Definition: GpioDebounce.h:30
int setup(unsigned int interval, unsigned int channel)
Definition: GpioDebounce.cpp:10
Debounce a boolean reading.
Definition: Debounce.h:10
GpioDebounce(unsigned int interval, unsigned int channel)
Definition: GpioDebounce.cpp:4
bool process(bool input)
Definition: Debounce.h:57