mirror of
https://github.com/eclipse/upm.git
synced 2025-07-04 19:01:21 +03:00
Added interface iButton
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@gmail.com>
This commit is contained in:

committed by
Serban Waltter

parent
3dc21b1dc8
commit
b2441100fa
@ -28,6 +28,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <mraa/gpio.hpp>
|
||||
#include <interfaces/iButton.hpp>
|
||||
|
||||
namespace upm {
|
||||
|
||||
@ -54,7 +55,7 @@ namespace upm {
|
||||
* @image html button.jpg
|
||||
* @snippet button.cxx Interesting
|
||||
*/
|
||||
class Button{
|
||||
class Button : virtual public iButton {
|
||||
public:
|
||||
/**
|
||||
* button constructor
|
||||
@ -79,6 +80,13 @@ class Button{
|
||||
*/
|
||||
int value();
|
||||
|
||||
/**
|
||||
* Gets the current button press state.
|
||||
*
|
||||
* @returns Button state
|
||||
*/
|
||||
virtual bool isPressed();
|
||||
|
||||
/**
|
||||
* Installs an interrupt service routine (ISR) to be called when
|
||||
* the button is activated or deactivated.
|
||||
|
Reference in New Issue
Block a user