nRF51 SDK - S210 SoftDevice
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
GPIOTE abstraction

GPIOTE abstraction for configuration of channels. More...

Enumerations

enum  nrf_gpiote_polarity_t {
  NRF_GPIOTE_POLARITY_LOTOHI = GPIOTE_CONFIG_POLARITY_LoToHi,
  NRF_GPIOTE_POLARITY_HITOLO = GPIOTE_CONFIG_POLARITY_HiToLo,
  NRF_GPIOTE_POLARITY_TOGGLE = GPIOTE_CONFIG_POLARITY_Toggle
}
 Polarity for GPIOTE channel enumerator. More...
 
enum  nrf_gpiote_outinit_t {
  NRF_GPIOTE_INITIAL_VALUE_LOW = GPIOTE_CONFIG_OUTINIT_Low,
  NRF_GPIOTE_INITIAL_VALUE_HIGH = GPIOTE_CONFIG_OUTINIT_High
}
 Initial output value for GPIOTE channel enumerator. More...
 

Functions

static __INLINE void nrf_gpiote_task_config (uint32_t channel_number, uint32_t pin_number, nrf_gpiote_polarity_t polarity, nrf_gpiote_outinit_t initial_value)
 Function for configuring GPIOTE channel as output, setting the properly desired output level. More...
 
static __INLINE void nrf_gpiote_event_config (uint32_t channel_number, uint32_t pin_number, nrf_gpiote_polarity_t polarity)
 Function for configuring GPIOTE channel as input, automatically clearing an event that appears in some cases under configuration. More...
 
static __INLINE void nrf_gpiote_unconfig (uint32_t channel_number)
 Function for unconfiguring GPIOTE channel. More...
 

Detailed Description

GPIOTE abstraction for configuration of channels.

Enumeration Type Documentation

Initial output value for GPIOTE channel enumerator.

Enumerator
NRF_GPIOTE_INITIAL_VALUE_LOW 

Low to high.

NRF_GPIOTE_INITIAL_VALUE_HIGH 

High to low.

Polarity for GPIOTE channel enumerator.

Enumerator
NRF_GPIOTE_POLARITY_LOTOHI 

Low to high.

NRF_GPIOTE_POLARITY_HITOLO 

High to low.

NRF_GPIOTE_POLARITY_TOGGLE 

Toggle.

Function Documentation

static __INLINE void nrf_gpiote_event_config ( uint32_t  channel_number,
uint32_t  pin_number,
nrf_gpiote_polarity_t  polarity 
)
static

Function for configuring GPIOTE channel as input, automatically clearing an event that appears in some cases under configuration.

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_numberspecifies the GPIOTE channel [0:3] to configure as an input channel.
pin_numberspecifies the pin number [0:30] to use in the GPIOTE channel.
polarityspecifies the desired polarity in the output GPIOTE channel.
static __INLINE void nrf_gpiote_task_config ( uint32_t  channel_number,
uint32_t  pin_number,
nrf_gpiote_polarity_t  polarity,
nrf_gpiote_outinit_t  initial_value 
)
static

Function for configuring GPIOTE channel as output, setting the properly desired output level.

Parameters
channel_numberspecifies the GPIOTE channel [0:3] to configure as an output channel.
pin_numberspecifies the pin number [0:30] to use in the GPIOTE channel.
polarityspecifies the desired polarity in the output GPIOTE channel.
initial_valuespecifies the initial value of the GPIOTE channel input after the channel configuration.
static __INLINE void nrf_gpiote_unconfig ( uint32_t  channel_number)
static

Function for unconfiguring GPIOTE channel.

Note that when unconfiguring the channel, the pin is configured as GPIO PIN_CNF configuration.

Parameters
channel_numberspecifies the GPIOTE channel [0:3] to unconfigure.