|
| instr_psel (const instr_psel &)=delete |
|
instr_psel & | operator= (const instr_psel &)=delete |
|
| instr_psel (instr_psel &&)=delete |
|
instr_psel & | operator= (instr_psel &&)=delete |
|
void | enable (bool set=false) const |
| Enable the instrumentation functionality. More...
|
|
void | disable () const |
| Disable the instrumentation functionality. More...
|
|
void | assert () const |
| Set the corresponding GPIO to logic 1.
|
|
void | deassert () const |
| Set the corresponding GPIO to logic 0.
|
|
void | set (bool asserted) const |
| Set the corresponding GPIO to a specific state. More...
|
|
void | toggle () const |
| Invert the state of the corresponding GPIO.
|
|
|
constexpr static int | global_psel = PSEL |
| Index for the PSEL within all GPIO peripherals on the device.
|
|
constexpr static uint8_t | psel = (PSEL - GPIO_Instance::begin_psel) |
| Index for the PSEL within its GPIO instance.
|
|
constexpr static uint8_t | gpio_instance = GPIO_Instance::peripheral.INSTANCE |
| The GPIO instance ordinal.
|
|
constexpr static nrf5::GPIO_Type | gpio = GPIO_Instance::peripheral |
| The GPIO instance that provides access to #PSEL.
|
|
constexpr static bool | psel_valid = (0 <= PSEL) && (psel < gpio.AUX) |
| Valid GPIOs are non-negative values that are among the pins supported by the instance.
|
|
constexpr static uint32_t | bit = (psel_valid ? (1U << psel) : 0) |
| The bit mask corresponding to PSEL.
|
|
template<int PSEL>
class nrfcxx::gpio::instr_psel< PSEL >
Instrumentation through toggling GPIOs.
This feature provides a relatively non-intrusive way to add compile-time optional instrumentation to a system. File-local instances of this class are defined, with #NRFCXX_GPIO_PSEL_SCOPEn or a non-disabled GPIO pin selection like #NRFCXX_GPIO_PSEL_SCOPE0. Prior to use the instances are enabled()d, then within the code the assert(), deassert(), set(), and toggle() methods may be invoked to signal context-specific state changes.
- See also
- make_scoped_instr()
- Template Parameters
-
PSEL | the GPIO pin number to use for the instrumentation. The value is a global ordinal with the peripheral instance represented by a multiple of 32 added to the GPIO pin within that instance. E.g. P1.23 is identified by PSEL (32 + 23) . Use -1 to disable the instrumentation at compile-time. Attempts to reference a pin on a non-existent GPIO peripheral will fail at compile time with obscure messages about non-existent members. |