#include <Arduino.h>Go to the source code of this file.
Enumerations | |
| enum | { button_raw_mode , button_fall_mode , button_fall_pulse_mode , button_fall_pulse_secured_mode , button_rise_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. | |
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 |
| 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 (starts from 1) |
true if the button is considered clicked under the buttons mode set, false otherwise | 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) |