#include "buttons.h"
#include "avrlibdefs.h"
#include <stdint.h>
#include <stdbool.h>
Go to the source code of this file.
Macros |
|
#define | DEBOUNCE_COUNT 3 |
Functions |
|
void | waitFor (uint8_t button) |
| bool | justPressed (uint8_t button) |
| bool | justReleased (uint8_t button) |
|
void | debounceButtons (void) |
| | Maintains wasEvent[] and toggles isDown[].
|
| bool | isPressed (uint8_t button) |
|
bool | bothRightButtonsPressed (void) |
|
bool | bothLeftButtonsPressed (void) |
Detailed Description
Definition in file buttons.c.
Function Documentation
| bool isPressed |
( |
uint8_t |
button | ) |
|
|
inline |
- Returns
- true when button is currently down (does no debouncing!)
Definition at line 114 of file buttons.c.
| bool justPressed |
( |
uint8_t |
button | ) |
|
|
inline |
- Returns
- true when confirmed rising edge at last debouncing.
Definition at line 50 of file buttons.c.
| bool justReleased |
( |
uint8_t |
button | ) |
|
|
inline |
- Returns
- true when confirmed falling edge at last debouncing.
Definition at line 58 of file buttons.c.