Arduino Universal Inputs
A collection of libraries for managing/processing input devices on Arduino.
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
IInputDevice.h
Go to the documentation of this file.
1
3
#ifndef _ARDUINOUNIVERSALINPUTS_IINPUTDEVICE_H
4
#define _ARDUINOUNIVERSALINPUTS_IINPUTDEVICE_H
5
6
#include "
UniversalInputTypes.h
"
7
14
class
IInputDevice
15
{
16
public
:
21
IInputDevice
(
inputid_t
id
)
22
: m_id(id)
23
{
24
}
25
26
virtual
~
IInputDevice
() {}
27
32
inputid_t
getID
()
const
{
return
m_id; }
33
38
virtual
inputtype_t
type
()
const
= 0;
39
44
virtual
bool
poll
() = 0;
45
46
private
:
47
inputid_t
m_id;
48
};
49
50
#endif
IInputDevice::getID
inputid_t getID() const
Retrieves the ID of this device.
Definition:
IInputDevice.h:32
IInputDevice::poll
virtual bool poll()=0
Polls this input device for change.
IInputDevice
Represents an input device.
Definition:
IInputDevice.h:14
inputid_t
uint16_t inputid_t
Holds the value of a device ID.
Definition:
UniversalInputTypes.h:13
IInputDevice::IInputDevice
IInputDevice(inputid_t id)
Creates a new input device.
Definition:
IInputDevice.h:21
inputtype_t
inputtype_t
Enumeration of all input device types.
Definition:
UniversalInputTypes.h:37
IInputDevice::type
virtual inputtype_t type() const =0
Retrieves the type of this device.
UniversalInputTypes.h
Generated on Fri Aug 3 2018 14:58:25 for Arduino Universal Inputs by
1.8.6