Wrapper supporting GPIO control of output signals by explicit or scoped assertion.
More...
#include <nrfcxx/gpio.hpp>
|
|
scoped_assert | make_scoped () const |
| | Construct an RAII object that asserts the signal while it exists.
|
| |
| | active_signal (generic_pin &pin) |
| | Construct the helper for an active-low signal. More...
|
| |
|
bool | valid () const |
| | Indicate whether the signal is configured with a valid pin reference.
|
| |
|
bool | asserted () const |
| | Indicate whether the signal is currently asserted.
|
| |
|
void | assert () const |
| | Clear the associated GPIO to assert the active-low signal.
|
| |
|
void | deassert () const |
| | Set the associated GPIO to deassert the active-low signal.
|
| |
| void | enable (unsigned int aux=0) const |
| | Configure the associated GPIO to control the signal output. More...
|
| |
|
void | disable () const |
| | Configure the associated GPIO to its power-up (non-controlling) state.
|
| |
|
|
static constexpr bool | active_high = ACTIVE_HIGH |
| |
template<bool ACTIVE_HIGH = false>
class nrfcxx::gpio::active_signal< ACTIVE_HIGH >
Wrapper supporting GPIO control of output signals by explicit or scoped assertion.
This references an externally defined generic_pin.
- Template Parameters
-
| ACTIVE_HIGH | if true the pin asserts with a logic level high, and deasserts with a logic level low. If false (default) the pin asserts with a logic level low, and deasserts with a logic level high. |
◆ active_signal()
template<bool ACTIVE_HIGH = false>
Construct the helper for an active-low signal.
- Warning
- An attempt to create an instance for a psel that does not exist on the device will produce FailSsafeCode::NO_SUCH_PERIPHERAL.
- Parameters
-
| psel | the GPIO PSEL index for the signal. |
◆ enable()
template<bool ACTIVE_HIGH = false>
Configure the associated GPIO to control the signal output.
- Parameters
-
| aux | any additional flags (e.g. DRIVE) that would augment PIN_CNF_WRONLY to produce the correct configuration for the pin. |
The documentation for this class was generated from the following file: