distortos  v0.5.0
object-oriented C++ RTOS for microcontrollers
leds.hpp
Go to the documentation of this file.
1 
15 #ifndef SOURCE_BOARD_ST_STM32F4DISCOVERY_INCLUDE_DISTORTOS_BOARD_LEDS_HPP_
16 #define SOURCE_BOARD_ST_STM32F4DISCOVERY_INCLUDE_DISTORTOS_BOARD_LEDS_HPP_
17 
18 #include <cstddef>
19 
21 #define DISTORTOS_BOARD_TOTAL_LEDS (1 + 1 + 1 + 1)
22 
23 namespace distortos
24 {
25 
26 namespace chip
27 {
28 
29 class ChipOutputPin;
30 
31 } // namespace chip
32 
33 namespace board
34 {
35 
38 
39 /*---------------------------------------------------------------------------------------------------------------------+
40 | indexes of leds
41 +---------------------------------------------------------------------------------------------------------------------*/
42 
43 enum
44 {
53 };
54 
55 /*---------------------------------------------------------------------------------------------------------------------+
56 | alternative (label-based) indexes of leds
57 +---------------------------------------------------------------------------------------------------------------------*/
58 
60 constexpr size_t orangeLedIndex {ld3LedIndex};
61 
63 constexpr size_t greenLedIndex {ld4LedIndex};
64 
66 constexpr size_t redLedIndex {ld5LedIndex};
67 
69 constexpr size_t blueLedIndex {ld6LedIndex};
70 
71 /*---------------------------------------------------------------------------------------------------------------------+
72 | indexed access to leds objects
73 +---------------------------------------------------------------------------------------------------------------------*/
74 
77 
78 } // namespace board
79 
80 } // namespace distortos
81 
82 #endif // SOURCE_BOARD_ST_STM32F4DISCOVERY_INCLUDE_DISTORTOS_BOARD_LEDS_HPP_
index of ld3 LED (orange)
Definition: leds.hpp:46
#define DISTORTOS_BOARD_TOTAL_LEDS
total number of leds on the board
Definition: leds.hpp:21
index of ld5 LED (red)
Definition: leds.hpp:50
index of ld6 LED (blue)
Definition: leds.hpp:52
constexpr size_t blueLedIndex
alternative index of ld6 LED (blue)
Definition: leds.hpp:69
constexpr size_t orangeLedIndex
alternative index of ld3 LED (orange)
Definition: leds.hpp:60
Definition: ChipOutputPin.hpp:31
index of ld4 LED (green)
Definition: leds.hpp:48
Top-level namespace of distortos project.
constexpr size_t greenLedIndex
alternative index of ld4 LED (green)
Definition: leds.hpp:63
constexpr size_t totalLeds
total number of leds on the board
Definition: leds.hpp:37
constexpr size_t redLedIndex
alternative index of ld5 LED (red)
Definition: leds.hpp:66
chip::ChipOutputPin leds[totalLeds]
array with all leds objects
Definition: ST_STM32F4DISCOVERY-leds.cpp:30