InputEvents v1.4.0
An easy to use but comprehensive Event Library for Buttons, Encoders, Encoder Buttons, Analog Inputs, Joysticks and Switches.
Public Member Functions | List of all members
Bounce2PinAdapter Class Reference

Description

A PinAdapter for the Bounce2 library. Note: this is not a DebounceAdapter as Bounce2 can only read the GPIO pins directly, not via a PinAdapter.

If you want to use this PinAdapter, you must manually install the Bounce2 library as it is no longer a dependency for InputEvents.

#include <Bounce2PinAdapter.h>

Inheritance diagram for Bounce2PinAdapter:
Inheritance graph
[legend]

Public Member Functions

 Bounce2PinAdapter (byte pin)
 
void begin ()
 Initialise the pin adapter. Must be safe for repeated calls (Idempotent) More...
 
bool read ()
 Read the current state of the pin. More...
 
virtual void begin ()=0
 Initialise the pin adapter. Must be safe for repeated calls (Idempotent) More...
 
virtual bool read ()=0
 Read the current state of the pin. More...
 

Member Function Documentation

◆ begin()

void Bounce2PinAdapter::begin ( )
inlinevirtual

Initialise the pin adapter. Must be safe for repeated calls (Idempotent)

Implements PinAdapter.

◆ read()

bool Bounce2PinAdapter::read ( )
inlinevirtual

Read the current state of the pin.

Returns
true/HIGH
false/LOW

Implements PinAdapter.


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