distortos  v0.5.0
object-oriented C++ RTOS for microcontrollers
buttons.hpp
Go to the documentation of this file.
1 
15 #ifndef SOURCE_BOARD_ST_STM32F4DISCOVERY_INCLUDE_DISTORTOS_BOARD_BUTTONS_HPP_
16 #define SOURCE_BOARD_ST_STM32F4DISCOVERY_INCLUDE_DISTORTOS_BOARD_BUTTONS_HPP_
17 
18 #include <cstddef>
19 
21 #define DISTORTOS_BOARD_TOTAL_BUTTONS (1)
22 
23 namespace distortos
24 {
25 
26 namespace chip
27 {
28 
29 class ChipInputPin;
30 
31 } // namespace chip
32 
33 namespace board
34 {
35 
38 
39 /*---------------------------------------------------------------------------------------------------------------------+
40 | indexes of buttons
41 +---------------------------------------------------------------------------------------------------------------------*/
42 
43 enum
44 {
47 };
48 
49 /*---------------------------------------------------------------------------------------------------------------------+
50 | alternative (label-based) indexes of buttons
51 +---------------------------------------------------------------------------------------------------------------------*/
52 
54 constexpr size_t userButtonIndex {b1ButtonIndex};
55 
56 /*---------------------------------------------------------------------------------------------------------------------+
57 | indexed access to buttons objects
58 +---------------------------------------------------------------------------------------------------------------------*/
59 
62 
63 } // namespace board
64 
65 } // namespace distortos
66 
67 #endif // SOURCE_BOARD_ST_STM32F4DISCOVERY_INCLUDE_DISTORTOS_BOARD_BUTTONS_HPP_
constexpr size_t totalButtons
total number of buttons on the board
Definition: buttons.hpp:37
#define DISTORTOS_BOARD_TOTAL_BUTTONS
total number of buttons on the board
Definition: buttons.hpp:21
const chip::ChipInputPin buttons[totalButtons]
array with all buttons objects
Definition: ST_STM32F4DISCOVERY-buttons.cpp:30
Top-level namespace of distortos project.
index of b1 button (user)
Definition: buttons.hpp:46
Definition: ChipInputPin.hpp:31
constexpr size_t userButtonIndex
alternative index of b1 button (user)
Definition: buttons.hpp:54