#include <Arduino.h>Go to the source code of this file.
Classes | |
| class | Button |
| Button Driver for XRCU. More... | |
Enumerations | |
| enum | { button_raw_mode , button_fall_mode , button_fall_pulse_mode , button_fall_pulse_secured_mode , button_rise_mode , button_rise_pulse_mode , button_rise_pulse_secured_mode } |
Functions | |
| bool | is_button_clicked (const uint32_t button_no) |
| Checks whether a button is clicked. | |
| void | set_buttons_mode (const uint8_t mode) |
| Sets the buttons mode. | |
| void | button_attach_interrupt (const uint32_t button_no, void(*user_func)(void)) |
| Attaches an interrupt to a button. | |
| void | button_detach_interrupt (const uint32_t button_no) |
| Detaches the interrupt on a button from the button. | |
Variables | |
| Button | buttons [4] |
| The buttons. | |
| Button & | button1 |
| The leftmost button. | |
| Button & | button2 |
| The 2nd leftmost button. | |
| Button & | button3 |
| The 3rd leftmost button. | |
| Button & | button4 |
| The rightmost button. | |
Buttons.h - Buttons Driver for XRCU.
| anonymous enum |
button_fall_pulse_secured_mode is recommended for GUI menu applications.
| void button_attach_interrupt | ( | const uint32_t | button_no, |
| void(* | user_func )(void) ) |
Attaches an interrupt to a button.
| button_no | The number of button to attach an interrupt to. [1 : 4] |
| user_func | The interrupt service routine. |
| void button_detach_interrupt | ( | const uint32_t | button_no | ) |
Detaches the interrupt on a button from the button.
| button_no | the number of button whose interrupt has to be detached |
| bool is_button_clicked | ( | const uint32_t | button_no | ) |
Checks whether a button is clicked.
| button_no | the button number [1 : 4] |
true if the button is considered clicked under the buttons mode set, false otherwise Button::isClicked() . Use class Button for new projects. | void set_buttons_mode | ( | const uint8_t | mode | ) |
Sets the buttons mode.
The buttons mode decides how every button is considered clicked.
| mode | the mode to be set (see examples for modes available) |