AbleButtons V0.4.0
Lightweight button library for Arduino.
 
Loading...
Searching...
No Matches
Config.h File Reference

Declarations to select which buttons we use. More...

#include <AbleButtons.h>

Go to the source code of this file.

Macros

#define NUM_BUTTONS   2
 The number of buttons to connect for testing. More...
 
#define BUTTON_A_PIN   2
 Connect first button between this pin and ground. More...
 
#define BUTTON_B_PIN   3
 Connect second button between this pin and ground. More...
 
#define TESTABLE_CIRCUIT   1
 0 = Pulldown; 1 = Pullup More...
 
#define TESTABLE_CALLBACK   1
 0 = No Callback; 1 = Callback. More...
 
#define TESTABLE_CLASS   3
 0 = DirectButton; 1 = Button; 2 = ClickerButton; 3 = DoubleClickerButton More...
 
#define TESTABLE_PULLDOWN   0
 Set TESTABLE_CIRCUIT to this value to test pulldown circuits. More...
 
#define TESTABLE_PULLUP   1
 Set TESTABLE_CIRCUIT to this value to test pullup circuits. More...
 
#define TESTABLE_DIRECT   0
 Set TESTABLE_CLASS to this value to test Able...DirectButton. More...
 
#define TESTABLE_BUTTON   1
 Set TESTABLE_CLASS to this value to test Able...Button. More...
 
#define TESTABLE_CLICKER   2
 Set TESTABLE_CLASS to this value to test Able...ClickerButton. More...
 
#define TESTABLE_DOUBLECLICKER   3
 Set TESTABLE_CLASS to this value to test Able...DoubleClickerButton. More...
 
#define TESTABLE_USING_BUTTON   AblePullupCallbackDoubleClickerButton
 Using Button to test. More...
 
#define TESTABLE_USING_BUTTONLIST   AblePullupCallbackDoubleClickerButtonList
 Using ButtonList to test. More...
 

Typedefs

using Button = TESTABLE_USING_BUTTON
 Using the button defined by the circuit, callback and class. More...
 
using ButtonList = TESTABLE_USING_BUTTONLIST
 Using the button list defined by the circuit, callback and class. More...
 

Variables

Button btnA
 Button A.
 
Button btnB
 Button B.
 
Buttonbtns []
 Array of buttons A and B. More...
 
ButtonList btnList
 Declaration of button list.
 

Detailed Description

Declarations to select which buttons we use.

Change the circuit, callback and class values to test different classes.

Definition in file Config.h.

Macro Definition Documentation

◆ BUTTON_A_PIN

#define BUTTON_A_PIN   2

Connect first button between this pin and ground.

Definition at line 14 of file Config.h.

◆ BUTTON_B_PIN

#define BUTTON_B_PIN   3

Connect second button between this pin and ground.

Definition at line 15 of file Config.h.

◆ NUM_BUTTONS

#define NUM_BUTTONS   2

The number of buttons to connect for testing.

Definition at line 13 of file Config.h.

◆ TESTABLE_BUTTON

#define TESTABLE_BUTTON   1

Set TESTABLE_CLASS to this value to test Able...Button.

Definition at line 41 of file Config.h.

◆ TESTABLE_CALLBACK

#define TESTABLE_CALLBACK   1

0 = No Callback; 1 = Callback.

Definition at line 24 of file Config.h.

◆ TESTABLE_CIRCUIT

#define TESTABLE_CIRCUIT   1

0 = Pulldown; 1 = Pullup

Definition at line 22 of file Config.h.

◆ TESTABLE_CLASS

#define TESTABLE_CLASS   3

0 = DirectButton; 1 = Button; 2 = ClickerButton; 3 = DoubleClickerButton

Definition at line 26 of file Config.h.

◆ TESTABLE_CLICKER

#define TESTABLE_CLICKER   2

Set TESTABLE_CLASS to this value to test Able...ClickerButton.

Definition at line 43 of file Config.h.

◆ TESTABLE_DIRECT

#define TESTABLE_DIRECT   0

Set TESTABLE_CLASS to this value to test Able...DirectButton.

Definition at line 39 of file Config.h.

◆ TESTABLE_DOUBLECLICKER

#define TESTABLE_DOUBLECLICKER   3

Set TESTABLE_CLASS to this value to test Able...DoubleClickerButton.

Definition at line 45 of file Config.h.

◆ TESTABLE_PULLDOWN

#define TESTABLE_PULLDOWN   0

Set TESTABLE_CIRCUIT to this value to test pulldown circuits.

Definition at line 34 of file Config.h.

◆ TESTABLE_PULLUP

#define TESTABLE_PULLUP   1

Set TESTABLE_CIRCUIT to this value to test pullup circuits.

Definition at line 36 of file Config.h.

◆ TESTABLE_USING_BUTTON

#define TESTABLE_USING_BUTTON   AblePullupCallbackDoubleClickerButton

Using Button to test.

Definition at line 61 of file Config.h.

◆ TESTABLE_USING_BUTTONLIST

#define TESTABLE_USING_BUTTONLIST   AblePullupCallbackDoubleClickerButtonList

Using ButtonList to test.

Definition at line 63 of file Config.h.

Typedef Documentation

◆ Button

Using the button defined by the circuit, callback and class.

Definition at line 124 of file Config.h.

◆ ButtonList

Using the button list defined by the circuit, callback and class.

Definition at line 125 of file Config.h.

Variable Documentation

◆ btns

Button* btns[]
extern

Array of buttons A and B.

Array of buttons A and B.

Definition at line 21 of file ButtonableAll.ino.