RoverButton class contains member functions to access Shutdown button, User button, and customly installed buttons on the rover.
More...
#include <rover_button.hpp>
|
static const int | INPUT_ = 0 |
| Static definition for INPUT pin mode for wPiPinMode function. More...
|
|
static const int | OUTPUT_ = 1 |
| Static definition for OUTPUT pin mode for wPiPinMode function. More...
|
|
static const int | PWM_OUTPUT_ = 2 |
| Static definition for PWM_OUTPUT pin mode for wPiPinMode function. More...
|
|
static const int | GPIO_CLOCK_ = 3 |
| Static definition for GPIO_CLOCK pin mode for wPiPinMode function. More...
|
|
static const int | SOFT_PWM_OUTPUT_ = 4 |
| Static definition for SOFT_PWM_OUTPUT pin mode for wPiPinMode function. More...
|
|
static const int | SOFT_TONE_OUTPUT_ = 5 |
| Static definition for SOFT_TONE_OUTPUT pin mode for wPiPinMode function. More...
|
|
static const int | PWM_TONE_OUTPUT_ = 6 |
| Static definition for PWM_TONE_OUTPUT pin mode for wPiPinMode function. More...
|
|
static const int | LO = 0 |
| Static definition for digital voltage level : LOW. More...
|
|
static const int | HI = 1 |
| Static definition for digital voltage level : HIGH. More...
|
|
RoverButton class contains member functions to access Shutdown button, User button, and customly installed buttons on the rover.
void rover::RoverButton::initialize |
( |
void |
| ) |
|
int rover::RoverButton::readButton |
( |
void |
| ) |
|
Reads the digital value of the a button.
- Returns
- val RoverGpio::LO (low) or RoverGpio::HI (high). Embedded shutdown and user buttons are pulled-up. Therefore, when the button is pressed a LOW (0) is returned.
void rover::RoverButton::setButtonPin |
( |
const int |
button_pin | ) |
|
Overrides the default button pin used in wiringPi format.
- Parameters
-
- Returns
- void
int rover::RoverButton::buttonPin |
|
private |
int rover::RoverButton::ROVERBUTTON_INIT_ |
|
private |
const int rover::RoverButton::SHUTDOWN_BUTTON_PIN = 29 |
|
staticprivate |
Shutdown button pin in wiringPi format.
const int rover::RoverButton::USER_BUTTON_PIN = 27 |
|
staticprivate |
User button pin in wiringPi format.
The documentation for this class was generated from the following files: