AbleButtons V0.4.0
Lightweight button library for Arduino.
 
Loading...
Searching...
No Matches
Checks.cpp File Reference

Definition of check state of a button functions. 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 checkButtonJustSingleClicked (Button *btn)
 Check button that has just been single-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...
 
void checkButtonListIntegrity ()
 Check integrity of ButtonList invariants (always hold true). More...
 
void displayButtonChanges (int index)
 Display button changes to Serial. More...
 

Variables

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

Detailed Description

Definition of check state of a button functions.

Definition in file Checks.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 202 of file Checks.cpp.

◆ checkButtonJustClicked()

void checkButtonJustClicked ( Button btn)

Check button that has just been clicked.

Parameters
btnThe button to check.

Definition at line 142 of file Checks.cpp.

◆ checkButtonJustDoubleClicked()

void checkButtonJustDoubleClicked ( Button btn)

Check button that has just been double-clicked.

Parameters
btnThe button to check.

Definition at line 177 of file Checks.cpp.

◆ checkButtonJustHeld()

void checkButtonJustHeld ( Button btn)

Check button that has just been held.

Parameters
btnThe button to check.

Definition at line 92 of file Checks.cpp.

◆ checkButtonJustIdle()

void checkButtonJustIdle ( Button btn)

Check button that has just become or remains idle.

Parameters
btnThe button to check.

Definition at line 117 of file Checks.cpp.

◆ checkButtonJustPressed()

void checkButtonJustPressed ( Button btn)

Check state of a pressed button just pressed.

Parameters
btnThe button to check.

Definition at line 42 of file Checks.cpp.

◆ checkButtonJustReleased()

void checkButtonJustReleased ( Button btn)

Check button that has just been released.

Parameters
btnThe button to check.

Definition at line 67 of file Checks.cpp.

◆ checkButtonJustSingleClicked()

void checkButtonJustSingleClicked ( Button btn)

Check button that has just been single-clicked.

Parameters
btnThe button to check.

Definition at line 167 of file Checks.cpp.

◆ checkButtonListIntegrity()

void checkButtonListIntegrity ( )

Check integrity of ButtonList invariants (always hold true).

Definition at line 286 of file Checks.cpp.

◆ checkButtonSetup()

void checkButtonSetup ( Button btn)

Check the state of an individual button just setup.

Parameters
btnThe button to check.

Definition at line 17 of file Checks.cpp.

◆ displayButtonChanges()

void displayButtonChanges ( int  index)

Display button changes to Serial.

Parameters
indexWhich button in the button list to check.

Definition at line 347 of file Checks.cpp.

Variable Documentation

◆ btnState

struct ButtonState btnState[NUM_BUTTONS]

Previous state for each button.

Definition at line 9 of file Checks.cpp.