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
Classes | Public Member Functions | List of all members
BelaDebounce Class Reference

#include <BelaDebounce.h>

Inheritance diagram for BelaDebounce:
Debounce

Classes

struct  Settings
 

Public Member Functions

 BelaDebounce (const Settings &settings)
 
int setup (const Settings &settings)
 
bool process (BelaContext *context)
 
bool process (BelaContext *context, unsigned int frame)
 
- Public Member Functions inherited from Debounce
 Debounce (unsigned int interval)
 
 Debounce (const Settings &settings)
 
void setup (unsigned int interval)
 
void setup (const Settings &settings)
 
bool process (bool input)
 
bool get ()
 
Edge edgeDetected ()
 

Additional Inherited Members

- Public Types inherited from Debounce
enum  Edge { FALLING = -1, NONE = 0, RISING = 1 }
 
- Static Public Member Functions inherited from Debounce
static Edge detectEdge (bool oldState, bool newState)
 
- Protected Attributes inherited from Debounce
bool state
 
bool oldState
 

Detailed Description

A debounced reading from a Bela digital in.

Constructor & Destructor Documentation

BelaDebounce::BelaDebounce ( const Settings settings)

Same as setup(), but throws on error.

Member Function Documentation

int BelaDebounce::setup ( const Settings settings)

Set up the switch.

Returns
0 on success or an error code otherwise.
bool BelaDebounce::process ( BelaContext context)

Process the current block of data. Call this once per block.

Returns
the debounced value of the switch at the end of the block.
bool BelaDebounce::process ( BelaContext context,
unsigned int  frame 
)

Process the current frame of data. Call this every frame.

Returns
the debounced value of the switch.

The documentation for this class was generated from the following files: