nrfcxx
0.1.0
C++-17 Framework for Nordic nRF5 Devices
|
RAII instance that ensures the an instance is enabled within a scope. More...
#include <nrfcxx/periph.hpp>
Public Member Functions | |
operator bool () const | |
Boolean value is true iff construction completed with an enabled device. | |
ssize_type | result () const |
The result of attempting to enable the peripheral. More... | |
RAII instance that ensures the an instance is enabled within a scope.
If constructed when the peripheral is not enabled the peripheral will be enabled. If this action fails the enabler instance will evaluate to false, indicating the peripheral is not functional. If it succeeds, the peripheral will be disabled when the instance is destructed.
If the peripheral is enabled prior to constructing the enabler its enabled state will not be changed when the enabler is destructed.
|
inline |
The result of attempting to enable the peripheral.