Brian Silverman | 80fc94c | 2014-03-09 16:56:01 -0700 | [diff] [blame] | 1 | #ifndef BBB_CAPE_SRC_BBB_LED_H_ |
2 | #define BBB_CAPE_SRC_BBB_LED_H_ | ||||
3 | |||||
4 | #include <stdio.h> | ||||
5 | |||||
6 | #include "aos/common/macros.h" | ||||
7 | |||||
8 | namespace bbb { | ||||
9 | |||||
10 | // Allows easily controlling one of the LEDs. | ||||
11 | class LED { | ||||
12 | public: | ||||
13 | LED(int number); | ||||
14 | ~LED(); | ||||
15 | |||||
16 | void Set(bool on); | ||||
17 | |||||
18 | private: | ||||
19 | FILE *brightness_handle_ = nullptr; | ||||
20 | const int number_; | ||||
21 | |||||
22 | DISALLOW_COPY_AND_ASSIGN(LED); | ||||
23 | }; | ||||
24 | |||||
25 | } // namespace bbb | ||||
26 | |||||
27 | #endif // BBB_CAPE_SRC_BBB_LED_H_ |