EV3RT CXX API Reference [English]
An RTOS-based development platform for LEGO Mindstorms EV3.
ev3cxx_brick_button.h
Go to the documentation of this file.
1
7
#pragma once
8
9
#include <stdio.h>
10
11
#include "ev3api.h"
12
#include "
ev3cxx_button.h
"
13
14
namespace
ev3cxx
{
15
20
enum class
BrickButtons
{
21
LEFT
= LEFT_BUTTON,
22
RIGHT
= RIGHT_BUTTON,
23
UP
= UP_BUTTON,
24
DOWN
= DOWN_BUTTON,
25
ENTER
= ENTER_BUTTON,
26
BACK
= BACK_BUTTON
27
};
28
33
class
BrickButton
:
public
detail::Button
34
{
35
public
:
41
BrickButton
(
BrickButtons
button)
42
: m_button(button)
43
{}
44
50
int
isPressed
() {
51
return
ev3_button_is_pressed(static_cast<button_t>(m_button));
52
}
53
54
private
:
55
const
BrickButtons
m_button;
56
57
};
// class BrickButton
58
59
}
// namespace ev3cxx
ev3cxx_button.h
EV3RT CPP API for general button.
ev3cxx::BrickButton::BrickButton
BrickButton(BrickButtons button)
Constructor of class BrickButton.
Definition:
ev3cxx_brick_button.h:41
ev3cxx
Definition:
ev3cxx.h:35
ev3cxx::BrickButton
Class BrickButton. API for working with brick buttons.
Definition:
ev3cxx_brick_button.h:33
ev3cxx::BrickButtons::ENTER
Enter brick button.
ev3cxx::BrickButtons::UP
Up brick button.
ev3cxx::BrickButtons::BACK
Back brick button.
ev3cxx::BrickButtons::RIGHT
Right brick button.
ev3cxx::BrickButtons::LEFT
Left brick button.
ev3cxx::BrickButton::isPressed
int isPressed()
Get state of brick button.
Definition:
ev3cxx_brick_button.h:50
ev3cxx::detail::Button
Class Button. API for working with general button buttons.
Definition:
ev3cxx_button.h:19
ev3cxx::BrickButtons
BrickButtons
Enum with index of sensor port.
Definition:
ev3cxx_brick_button.h:20
ev3cxx::BrickButtons::DOWN
Down brick button.
library
lib-ev3cxx
include
ev3cxx_brick_button.h
Generated on Mon May 15 2017 03:17:23 for EV3RT CXX API Reference [English] by
1.8.13