|
Sound Byte Libs 1ee2ca6
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
LED control interface. More...
#include <led.hpp>
Public Member Functions | |
| Led (bool active_high=true) | |
| Construct LED controller. | |
| void | on () |
| Turn LED on. | |
| void | off () |
| Turn LED off. | |
| void | toggle () |
| Toggle LED state. | |
| void | set (bool state) |
| Set LED state. | |
| bool | isOn () const |
| Get current LED state. | |
| bool | isOff () const |
| Get current LED state. | |
LED control interface.
Wraps GPIO pin operations with LED-specific semantics. Template-based design provides compile-time optimization.
| GpioPinImpl | GPIO pin implementation type |
|
inlineexplicit |
Construct LED controller.
| active_high | true if LED is on when pin is high |
Definition at line 33 of file led.hpp.
References sbl::core::components::display::Led< GpioPinImpl >::off().
|
inline |
|
inline |
|
inline |
Turn LED off.
Definition at line 50 of file led.hpp.
Referenced by sbl::core::components::display::Led< GpioPinImpl >::Led(), sbl::core::components::display::Led< GpioPinImpl >::set(), and sbl::core::components::display::Led< GpioPinImpl >::toggle().
|
inline |
Turn LED on.
Definition at line 42 of file led.hpp.
Referenced by sbl::core::components::display::Led< GpioPinImpl >::set(), and sbl::core::components::display::Led< GpioPinImpl >::toggle().
|
inline |
Set LED state.
| state | true to turn on, false to turn off |
Definition at line 70 of file led.hpp.
References sbl::core::components::display::Led< GpioPinImpl >::off(), and sbl::core::components::display::Led< GpioPinImpl >::on().
|
inline |
Toggle LED state.
Definition at line 58 of file led.hpp.
References sbl::core::components::display::Led< GpioPinImpl >::off(), and sbl::core::components::display::Led< GpioPinImpl >::on().