VizBlocks
Public Member Functions | Static Public Attributes | List of all members
Button Class Reference

#include <Button.hpp>

Public Member Functions

 Button (int pin, int id=99)
 
void initInterrupts (void(*function)())
 What does this do? More...
 
void setEventHandler (void(*function)(Button *, uint8_t, bool))
 What does this do? More...
 
bool getState ()
 What does this do? More...
 
int getId ()
 What does this do? More...
 
int getClickInterval ()
 What does this do? More...
 
int getHoldInterval ()
 What does this do? More...
 
int getRepeatInterval ()
 What does this do? More...
 
void check ()
 What does this do? More...
 
void ICACHE_RAM_ATTR tick ()
 What does this do? More...
 

Static Public Attributes

static const uint8_t kEventPressed = 0
 
static const uint8_t kEventReleased = 1
 
static const uint8_t kEventClicked = 2
 
static const uint8_t kEventHeld = 3
 
static const uint8_t kEventTick = 4
 

Constructor & Destructor Documentation

◆ Button()

Button::Button ( int  pin,
int  id = 99 
)

Member Function Documentation

◆ check()

void Button::check ( )

What does this do?

◆ getClickInterval()

int Button::getClickInterval ( )

What does this do?

◆ getHoldInterval()

int Button::getHoldInterval ( )

What does this do?

◆ getId()

int Button::getId ( )

What does this do?

◆ getRepeatInterval()

int Button::getRepeatInterval ( )

What does this do?

◆ getState()

bool Button::getState ( )

What does this do?

◆ initInterrupts()

void Button::initInterrupts ( void(*)()  function)

What does this do?

◆ setEventHandler()

void Button::setEventHandler ( void(*)(Button *, uint8_t, bool)  function)

What does this do?

◆ tick()

void ICACHE_RAM_ATTR Button::tick ( )

What does this do?

Member Data Documentation

◆ kEventClicked

const uint8_t Button::kEventClicked = 2
static

◆ kEventHeld

const uint8_t Button::kEventHeld = 3
static

◆ kEventPressed

const uint8_t Button::kEventPressed = 0
static

◆ kEventReleased

const uint8_t Button::kEventReleased = 1
static

◆ kEventTick

const uint8_t Button::kEventTick = 4
static

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