Arduino Universal Inputs
A collection of libraries for managing/processing input devices on Arduino.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator
ArduinoMatrixButton.h
Go to the documentation of this file.
1 
3 #ifndef _ARDUINOUNIVERSALINPUTS_ARDUINOMATRIXBUTTON_H
4 #define _ARDUINOUNIVERSALINPUTS_ARDUINOMATRIXBUTTON_H
5 
6 #include "IButton.h"
7 
13 {
14 public:
16 
17  virtual ~ArduinoMatrixButton() {}
18 
23  inputpin_t getColPin() const { return m_colPin; }
24 
29  inputpin_t getRowPin() const { return m_rowPin; }
30 
31 protected:
32  uint8_t getPhysicalState() const;
33 
34 private:
35  inputpin_t m_colPin;
36  inputpin_t m_rowPin;
37 };
38 
39 #endif
ArduinoMatrixButton(inputid_t id, inputpin_t colPin, inputpin_t rowPin)
Creates a new button in a matrix configuration.
Definition: ArduinoMatrixButton.cpp:11
inputpin_t getRowPin() const
Gets the pin attached to the matrix row for this button.
Definition: ArduinoMatrixButton.h:29
uint16_t inputid_t
Holds the value of a device ID.
Definition: UniversalInputTypes.h:13
uint8_t getPhysicalState() const
Gets the current physical state of the button.
Definition: ArduinoMatrixButton.cpp:26
uint8_t inputpin_t
Holds the value of a pin number.
Definition: UniversalInputTypes.h:19
inputpin_t getColPin() const
Gets the pin attached to the matrix column for this button.
Definition: ArduinoMatrixButton.h:23
Represents a two state button.
Definition: IButton.h:14
Represents a single button in a matrix configuration.
Definition: ArduinoMatrixButton.h:12