AbleButtons V0.2.0
Lightweight button library for Arduino.
 
Loading...
Searching...
No Matches
CheckButton.cpp File Reference

Check state of a button. More...

#include "Checks.h"
#include "Utils.h"

Go to the source code of this file.

Functions

void checkButtonSetup (Button *btn)
 Check the state of an individual button just setup. More...
 
void checkButtonJustPressed (Button *btn)
 Check state of a pressed button just pressed. More...
 
void checkButtonJustReleased (Button *btn)
 Check button that has just been released. More...
 
void checkButtonJustHeld (Button *btn)
 Check button that has just been held. More...
 
void checkButtonJustIdle (Button *btn)
 Check button that has just become or remains idle. More...
 
void checkButtonJustClicked (Button *btn)
 Check button that has just been clicked. More...
 
void checkButtonJustDoubleClicked (Button *btn)
 Check button that has just been double-clicked. More...
 
void checkButtonIntegrity (Button *btn, ButtonState &state)
 Check integrity of Button invariants (always hold true). More...
 

Variables

struct ButtonState btnState [NUM_BUTTONS]
 Previous state for each button. More...
 

Detailed Description

Check state of a button.

Definition in file CheckButton.cpp.

Function Documentation

◆ checkButtonIntegrity()

void checkButtonIntegrity ( Button btn,
ButtonState state 
)

Check integrity of Button invariants (always hold true).

Parameters
btnThe button to check.
stateThe tracked state of the button for comparison.

Definition at line 162 of file CheckButton.cpp.

◆ checkButtonJustClicked()

void checkButtonJustClicked ( Button btn)

Check button that has just been clicked.

Parameters
btnThe button to check.

Definition at line 121 of file CheckButton.cpp.

◆ checkButtonJustDoubleClicked()

void checkButtonJustDoubleClicked ( Button btn)

Check button that has just been double-clicked.

Parameters
btnThe button to check.

Definition at line 141 of file CheckButton.cpp.

◆ checkButtonJustHeld()

void checkButtonJustHeld ( Button btn)

Check button that has just been held.

Parameters
btnThe button to check.

Definition at line 79 of file CheckButton.cpp.

◆ checkButtonJustIdle()

void checkButtonJustIdle ( Button btn)

Check button that has just become or remains idle.

Parameters
btnThe button to check.

Definition at line 100 of file CheckButton.cpp.

◆ checkButtonJustPressed()

void checkButtonJustPressed ( Button btn)

Check state of a pressed button just pressed.

Parameters
btnThe button to check.

Definition at line 37 of file CheckButton.cpp.

◆ checkButtonJustReleased()

void checkButtonJustReleased ( Button btn)

Check button that has just been released.

Parameters
btnThe button to check.

Definition at line 58 of file CheckButton.cpp.

◆ checkButtonSetup()

void checkButtonSetup ( Button btn)

Check the state of an individual button just setup.

Parameters
btnThe button to check.

Definition at line 16 of file CheckButton.cpp.

Variable Documentation

◆ btnState

struct ButtonState btnState[NUM_BUTTONS]

Previous state for each button.

Definition at line 9 of file CheckButton.cpp.