|
nrfcxx
0.1.0
C++-17 Framework for Nordic nRF5 Devices
|
A class used to manage LEDs. More...
#include <nrfcxx/led.hpp>
Public Member Functions | |
| generic_led (gpio::generic_pin &pin) | |
| Create an LED instance that is bound to a generic GPIO pin. More... | |
Public Member Functions inherited from nrfcxx::led::led_type | |
| led_type (const led_type &)=delete | |
| led_type & | operator= (const led_type &)=delete |
| led_type (const led_type &&)=delete | |
| led_type & | operator= (led_type &&)=delete |
| void | enable (void) |
| Set the GPIO associated with the LED to enable the LED. More... | |
| void | disable (void) |
| Disable the nrf5::GPIO associated with the LED. More... | |
| void | set (int v) |
| Set the LED to a specific state. More... | |
| virtual void | toggle (void) |
| Toggle the LED state. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from nrfcxx::led::led_type | |
| static size_t | count (void) |
| Get the number of LEDs supported by the target board. | |
| static led_type & | lookup (unsigned int i) |
| Return a reference to an LED identified by ordinal position. More... | |
Static Public Attributes inherited from nrfcxx::led::led_type | |
| static led_type | no_led |
A class used to manage LEDs.
This implements the functions of led_type using a gpio::generic_pin.
| active_low | a bool value indicating whether the LED is lit when the signal is low (true) or when the signal is high (false). Most Nordic development boards use active-low LEDs so the default supports them. |
|
inlineexplicit |
Create an LED instance that is bound to a generic GPIO pin.
| pin | the GPIO pin that controls the LED. A reference to this is retained by the generic_led instance. |
1.8.16