GPIOTE abstraction for configuration of channels.
More...
Enumerator |
---|
NRF_GPIOTE_POLARITY_LOTOHI |
Low to high.
|
NRF_GPIOTE_POLARITY_HITOLO |
High to low.
|
NRF_GPIOTE_POLARITY_TOGGLE |
Toggle.
|
Enumerator |
---|
NRF_GPIOTE_INITIAL_VALUE_LOW |
Low to high.
|
NRF_GPIOTE_INITIAL_VALUE_HIGH |
High to low.
|
- Parameters
-
channel_number | specifies the GPIOTE channel [0:3] to configure as an output channel. |
pin_number | specifies the pin number [0:30] to use in the GPIOTE channel. |
polarity | specifies the desired polarity in the output GPIOTE channel. |
initial_value | specifies the initial value of the GPIOTE channel input after the channel configuration. |
static __INLINE void nrf_gpiote_event_config |
( |
uint32_t |
channel_number, |
|
|
uint32_t |
pin_number, |
|
|
nrf_gpiote_polarity_t |
polarity |
|
) |
| |
|
static |
Note that the pin must be configured as connected input for this function to have any effect.
Note that when configuring the channel as input an event might be triggered. Care of disabling interrupts for that channel is left to the user.
- Parameters
-
channel_number | specifies the GPIOTE channel [0:3] to configure as an input channel. |
pin_number | specifies the pin number [0:30] to use in the GPIOTE channel. |
polarity | specifies the desired polarity in the output GPIOTE channel. |
static __INLINE void nrf_gpiote_unconfig |
( |
uint32_t |
channel_number | ) |
|
|
static |
Note that when unconfiguring the channel, the pin is configured as GPIO PIN_CNF configuration.
- Parameters
-
channel_number | specifies the GPIOTE channel [0:3] to unconfigure. |