wpi-32u4-library
|
Interfaces with button C on the Romi 32U4. More...
#include <Romi32U4Buttons.h>
Inherits PushbuttonBase.
Public Member Functions | |
virtual bool | isPressed () |
indicates whether button is currently pressed without any debouncing. More... | |
![]() | |
void | waitForPress () |
Waits until the button is pressed and takes care of debouncing. More... | |
void | waitForRelease () |
Waits until the button is released and takes care of debouncing. More... | |
void | waitForButton () |
Waits until the button is pressed and then waits until the button is released, taking care of debouncing. More... | |
bool | getSingleDebouncedPress () |
Uses a state machine to return true once after each time it detects the button moving from the released state to the pressed state. More... | |
bool | getSingleDebouncedRelease () |
Uses a state machine to return true once after each time it detects the button moving from the pressed state to the released state. More... | |
virtual bool | isPressed ()=0 |
indicates whether button is currently pressed without any debouncing. More... | |
Interfaces with button C on the Romi 32U4.
The pin used for button C is also used for the RX LED.
This class temporarily disables USB interrupts because the Arduino core code has USB interrupts enabled that sometimes write to the pin this button is on.
This class temporarily sets the pin to be an input without a pull-up resistor. The pull-up resistor is not needed because of the resistors on the board.
Definition at line 66 of file Romi32U4Buttons.h.
|
inlinevirtual |
indicates whether button is currently pressed without any debouncing.
This function must be implemented in a subclass of PushbuttonBase, such as Pushbutton.
Implements PushbuttonBase.
Definition at line 70 of file Romi32U4Buttons.h.
References FastGPIO::Pin< pin >::isInputHigh(), and FastGPIO::Pin< pin >::setInputPulledUp().