nRF5 SDK v12.1.0
Macros | Enumerations | Functions

GPIOTE abstraction for configuration of channels. More...

Macros

#define NRF_GPIOTE_INT_IN_MASK
 

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 the GPIOTE channel. 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 the GPIOTE channel. More...
 
enum  nrf_gpiote_tasks_t {
  NRF_GPIOTE_TASKS_OUT_0 = offsetof(NRF_GPIOTE_Type, TASKS_OUT[0]),
  NRF_GPIOTE_TASKS_OUT_1 = offsetof(NRF_GPIOTE_Type, TASKS_OUT[1]),
  NRF_GPIOTE_TASKS_OUT_2 = offsetof(NRF_GPIOTE_Type, TASKS_OUT[2]),
  NRF_GPIOTE_TASKS_OUT_3 = offsetof(NRF_GPIOTE_Type, TASKS_OUT[3]),
  NRF_GPIOTE_TASKS_OUT_4 = offsetof(NRF_GPIOTE_Type, TASKS_OUT[4]),
  NRF_GPIOTE_TASKS_OUT_5 = offsetof(NRF_GPIOTE_Type, TASKS_OUT[5]),
  NRF_GPIOTE_TASKS_OUT_6 = offsetof(NRF_GPIOTE_Type, TASKS_OUT[6]),
  NRF_GPIOTE_TASKS_OUT_7 = offsetof(NRF_GPIOTE_Type, TASKS_OUT[7]),
  NRF_GPIOTE_TASKS_SET_0 = offsetof(NRF_GPIOTE_Type, TASKS_SET[0]),
  NRF_GPIOTE_TASKS_SET_1 = offsetof(NRF_GPIOTE_Type, TASKS_SET[1]),
  NRF_GPIOTE_TASKS_SET_2 = offsetof(NRF_GPIOTE_Type, TASKS_SET[2]),
  NRF_GPIOTE_TASKS_SET_3 = offsetof(NRF_GPIOTE_Type, TASKS_SET[3]),
  NRF_GPIOTE_TASKS_SET_4 = offsetof(NRF_GPIOTE_Type, TASKS_SET[4]),
  NRF_GPIOTE_TASKS_SET_5 = offsetof(NRF_GPIOTE_Type, TASKS_SET[5]),
  NRF_GPIOTE_TASKS_SET_6 = offsetof(NRF_GPIOTE_Type, TASKS_SET[6]),
  NRF_GPIOTE_TASKS_SET_7 = offsetof(NRF_GPIOTE_Type, TASKS_SET[7]),
  NRF_GPIOTE_TASKS_CLR_0 = offsetof(NRF_GPIOTE_Type, TASKS_CLR[0]),
  NRF_GPIOTE_TASKS_CLR_1 = offsetof(NRF_GPIOTE_Type, TASKS_CLR[1]),
  NRF_GPIOTE_TASKS_CLR_2 = offsetof(NRF_GPIOTE_Type, TASKS_CLR[2]),
  NRF_GPIOTE_TASKS_CLR_3 = offsetof(NRF_GPIOTE_Type, TASKS_CLR[3]),
  NRF_GPIOTE_TASKS_CLR_4 = offsetof(NRF_GPIOTE_Type, TASKS_CLR[4]),
  NRF_GPIOTE_TASKS_CLR_5 = offsetof(NRF_GPIOTE_Type, TASKS_CLR[5]),
  NRF_GPIOTE_TASKS_CLR_6 = offsetof(NRF_GPIOTE_Type, TASKS_CLR[6]),
  NRF_GPIOTE_TASKS_CLR_7 = offsetof(NRF_GPIOTE_Type, TASKS_CLR[7])
}
 Tasks. More...
 
enum  nrf_gpiote_events_t {
  NRF_GPIOTE_EVENTS_IN_0 = offsetof(NRF_GPIOTE_Type, EVENTS_IN[0]),
  NRF_GPIOTE_EVENTS_IN_1 = offsetof(NRF_GPIOTE_Type, EVENTS_IN[1]),
  NRF_GPIOTE_EVENTS_IN_2 = offsetof(NRF_GPIOTE_Type, EVENTS_IN[2]),
  NRF_GPIOTE_EVENTS_IN_3 = offsetof(NRF_GPIOTE_Type, EVENTS_IN[3]),
  NRF_GPIOTE_EVENTS_IN_4 = offsetof(NRF_GPIOTE_Type, EVENTS_IN[4]),
  NRF_GPIOTE_EVENTS_IN_5 = offsetof(NRF_GPIOTE_Type, EVENTS_IN[5]),
  NRF_GPIOTE_EVENTS_IN_6 = offsetof(NRF_GPIOTE_Type, EVENTS_IN[6]),
  NRF_GPIOTE_EVENTS_IN_7 = offsetof(NRF_GPIOTE_Type, EVENTS_IN[7]),
  NRF_GPIOTE_EVENTS_PORT = offsetof(NRF_GPIOTE_Type, EVENTS_PORT)
}
 Events. More...
 
enum  nrf_gpiote_int_t {
  NRF_GPIOTE_INT_IN0_MASK = GPIOTE_INTENSET_IN0_Msk,
  NRF_GPIOTE_INT_IN1_MASK = GPIOTE_INTENSET_IN1_Msk,
  NRF_GPIOTE_INT_IN2_MASK = GPIOTE_INTENSET_IN2_Msk,
  NRF_GPIOTE_INT_IN3_MASK = GPIOTE_INTENSET_IN3_Msk,
  NRF_GPIOTE_INT_IN4_MASK = GPIOTE_INTENSET_IN4_Msk,
  NRF_GPIOTE_INT_IN5_MASK = GPIOTE_INTENSET_IN5_Msk,
  NRF_GPIOTE_INT_IN6_MASK = GPIOTE_INTENSET_IN6_Msk,
  NRF_GPIOTE_INT_IN7_MASK = GPIOTE_INTENSET_IN7_Msk,
  NRF_GPIOTE_INT_PORT_MASK = (int)GPIOTE_INTENSET_PORT_Msk
}
 GPIOTE interrupts. More...
 

Functions

__STATIC_INLINE void nrf_gpiote_task_set (nrf_gpiote_tasks_t task)
 Function for activating a specific GPIOTE task. More...
 
__STATIC_INLINE uint32_t nrf_gpiote_task_addr_get (nrf_gpiote_tasks_t task)
 Function for getting the address of a specific GPIOTE task. More...
 
__STATIC_INLINE bool nrf_gpiote_event_is_set (nrf_gpiote_events_t event)
 Function for getting the state of a specific GPIOTE event. More...
 
__STATIC_INLINE void nrf_gpiote_event_clear (nrf_gpiote_events_t event)
 Function for clearing a specific GPIOTE event. More...
 
__STATIC_INLINE uint32_t nrf_gpiote_event_addr_get (nrf_gpiote_events_t event)
 Function for getting the address of a specific GPIOTE event. More...
 
__STATIC_INLINE void nrf_gpiote_int_enable (uint32_t mask)
 Function for enabling interrupts. More...
 
__STATIC_INLINE void nrf_gpiote_int_disable (uint32_t mask)
 Function for disabling interrupts. More...
 
__STATIC_INLINE uint32_t nrf_gpiote_int_is_enabled (uint32_t mask)
 Function for checking if interrupts are enabled. More...
 
__STATIC_INLINE void nrf_gpiote_event_enable (uint32_t idx)
 Function for enabling a GPIOTE event. More...
 
__STATIC_INLINE void nrf_gpiote_event_disable (uint32_t idx)
 Function for disabling a GPIOTE event. More...
 
__STATIC_INLINE void nrf_gpiote_event_configure (uint32_t idx, uint32_t pin, nrf_gpiote_polarity_t polarity)
 Function for configuring a GPIOTE event. More...
 
__STATIC_INLINE uint32_t nrf_gpiote_event_pin_get (uint32_t idx)
 Function for getting the pin associated with a GPIOTE event. More...
 
__STATIC_INLINE
nrf_gpiote_polarity_t 
nrf_gpiote_event_polarity_get (uint32_t idx)
 Function for getting the polarity associated with a GPIOTE event. More...
 
__STATIC_INLINE void nrf_gpiote_task_enable (uint32_t idx)
 Function for enabling a GPIOTE task. More...
 
__STATIC_INLINE void nrf_gpiote_task_disable (uint32_t idx)
 Function for disabling a GPIOTE task. More...
 
__STATIC_INLINE void nrf_gpiote_task_configure (uint32_t idx, uint32_t pin, nrf_gpiote_polarity_t polarity, nrf_gpiote_outinit_t init_val)
 Function for configuring a GPIOTE task. More...
 
__STATIC_INLINE void nrf_gpiote_task_force (uint32_t idx, nrf_gpiote_outinit_t init_val)
 Function for forcing a specific state on the pin connected to GPIOTE. More...
 
__STATIC_INLINE void nrf_gpiote_te_default (uint32_t idx)
 Function for resetting a GPIOTE task event configuration to the default state. More...
 

Detailed Description

GPIOTE abstraction for configuration of channels.

Macro Definition Documentation

#define NRF_GPIOTE_INT_IN_MASK

Enumeration Type Documentation

Events.

Enumerator
NRF_GPIOTE_EVENTS_IN_0 

In event 0.

NRF_GPIOTE_EVENTS_IN_1 

In event 1.

NRF_GPIOTE_EVENTS_IN_2 

In event 2.

NRF_GPIOTE_EVENTS_IN_3 

In event 3.

NRF_GPIOTE_EVENTS_IN_4 

In event 4.

NRF_GPIOTE_EVENTS_IN_5 

In event 5.

NRF_GPIOTE_EVENTS_IN_6 

In event 6.

NRF_GPIOTE_EVENTS_IN_7 

In event 7.

NRF_GPIOTE_EVENTS_PORT 

Port event.

GPIOTE interrupts.

Enumerator
NRF_GPIOTE_INT_IN0_MASK 

GPIOTE interrupt from IN0.

NRF_GPIOTE_INT_IN1_MASK 

GPIOTE interrupt from IN1.

NRF_GPIOTE_INT_IN2_MASK 

GPIOTE interrupt from IN2.

NRF_GPIOTE_INT_IN3_MASK 

GPIOTE interrupt from IN3.

NRF_GPIOTE_INT_IN4_MASK 

GPIOTE interrupt from IN4.

NRF_GPIOTE_INT_IN5_MASK 

GPIOTE interrupt from IN5.

NRF_GPIOTE_INT_IN6_MASK 

GPIOTE interrupt from IN6.

NRF_GPIOTE_INT_IN7_MASK 

GPIOTE interrupt from IN7.

NRF_GPIOTE_INT_PORT_MASK 

GPIOTE interrupt from PORT event.

Initial output value for the GPIOTE channel.

Enumerator
NRF_GPIOTE_INITIAL_VALUE_LOW 

Low to high.

NRF_GPIOTE_INITIAL_VALUE_HIGH 

High to low.

Polarity for the GPIOTE channel.

Enumerator
NRF_GPIOTE_POLARITY_LOTOHI 

Low to high.

NRF_GPIOTE_POLARITY_HITOLO 

High to low.

NRF_GPIOTE_POLARITY_TOGGLE 

Toggle.

Tasks.

Enumerator
NRF_GPIOTE_TASKS_OUT_0 

Out task 0.

NRF_GPIOTE_TASKS_OUT_1 

Out task 1.

NRF_GPIOTE_TASKS_OUT_2 

Out task 2.

NRF_GPIOTE_TASKS_OUT_3 

Out task 3.

NRF_GPIOTE_TASKS_OUT_4 

Out task 4.

NRF_GPIOTE_TASKS_OUT_5 

Out task 5.

NRF_GPIOTE_TASKS_OUT_6 

Out task 6.

NRF_GPIOTE_TASKS_OUT_7 

Out task 7.

NRF_GPIOTE_TASKS_SET_0 

Set task 0.

NRF_GPIOTE_TASKS_SET_1 

Set task 1.

NRF_GPIOTE_TASKS_SET_2 

Set task 2.

NRF_GPIOTE_TASKS_SET_3 

Set task 3.

NRF_GPIOTE_TASKS_SET_4 

Set task 4.

NRF_GPIOTE_TASKS_SET_5 

Set task 5.

NRF_GPIOTE_TASKS_SET_6 

Set task 6.

NRF_GPIOTE_TASKS_SET_7 

Set task 7.

NRF_GPIOTE_TASKS_CLR_0 

Clear task 0.

NRF_GPIOTE_TASKS_CLR_1 

Clear task 1.

NRF_GPIOTE_TASKS_CLR_2 

Clear task 2.

NRF_GPIOTE_TASKS_CLR_3 

Clear task 3.

NRF_GPIOTE_TASKS_CLR_4 

Clear task 4.

NRF_GPIOTE_TASKS_CLR_5 

Clear task 5.

NRF_GPIOTE_TASKS_CLR_6 

Clear task 6.

NRF_GPIOTE_TASKS_CLR_7 

Clear task 7.

Function Documentation

__STATIC_INLINE uint32_t nrf_gpiote_event_addr_get ( nrf_gpiote_events_t  event)

Function for getting the address of a specific GPIOTE event.

Parameters
[in]eventEvent.
Returns
Address
__STATIC_INLINE void nrf_gpiote_event_clear ( nrf_gpiote_events_t  event)

Function for clearing a specific GPIOTE event.

Parameters
[in]eventEvent.
__STATIC_INLINE void nrf_gpiote_event_configure ( uint32_t  idx,
uint32_t  pin,
nrf_gpiote_polarity_t  polarity 
)

Function for configuring a GPIOTE event.

Parameters
[in]idxTask-Event index.
[in]pinPin associated with event.
[in]polarityTransition that should generate an event.
__STATIC_INLINE void nrf_gpiote_event_disable ( uint32_t  idx)

Function for disabling a GPIOTE event.

Parameters
[in]idxTask-Event index.
__STATIC_INLINE void nrf_gpiote_event_enable ( uint32_t  idx)

Function for enabling a GPIOTE event.

Parameters
[in]idxTask-Event index.
__STATIC_INLINE bool nrf_gpiote_event_is_set ( nrf_gpiote_events_t  event)

Function for getting the state of a specific GPIOTE event.

Parameters
[in]eventEvent.
__STATIC_INLINE uint32_t nrf_gpiote_event_pin_get ( uint32_t  idx)

Function for getting the pin associated with a GPIOTE event.

Parameters
[in]idxTask-Event index.
Returns
Pin number.
__STATIC_INLINE nrf_gpiote_polarity_t nrf_gpiote_event_polarity_get ( uint32_t  idx)

Function for getting the polarity associated with a GPIOTE event.

Parameters
[in]idxTask-Event index.
Returns
Polarity.
__STATIC_INLINE void nrf_gpiote_int_disable ( uint32_t  mask)

Function for disabling interrupts.

Parameters
[in]maskInterrupt mask to be disabled.
__STATIC_INLINE void nrf_gpiote_int_enable ( uint32_t  mask)

Function for enabling interrupts.

Parameters
[in]maskInterrupt mask to be enabled.
__STATIC_INLINE uint32_t nrf_gpiote_int_is_enabled ( uint32_t  mask)

Function for checking if interrupts are enabled.

Parameters
[in]maskMask of interrupt flags to check.
Returns
Mask with enabled interrupts.
__STATIC_INLINE uint32_t nrf_gpiote_task_addr_get ( nrf_gpiote_tasks_t  task)

Function for getting the address of a specific GPIOTE task.

Parameters
[in]taskTask.
Returns
Address.
__STATIC_INLINE void nrf_gpiote_task_configure ( uint32_t  idx,
uint32_t  pin,
nrf_gpiote_polarity_t  polarity,
nrf_gpiote_outinit_t  init_val 
)

Function for configuring a GPIOTE task.

Note
Function is not configuring mode field so task is disabled after this function is called.
Parameters
[in]idxTask-Event index.
[in]pinPin associated with event.
[in]polarityTransition that should generate an event.
[in]init_valInitial value of pin.
__STATIC_INLINE void nrf_gpiote_task_disable ( uint32_t  idx)

Function for disabling a GPIOTE task.

Parameters
[in]idxTask-Event index.
__STATIC_INLINE void nrf_gpiote_task_enable ( uint32_t  idx)

Function for enabling a GPIOTE task.

Parameters
[in]idxTask-Event index.
__STATIC_INLINE void nrf_gpiote_task_force ( uint32_t  idx,
nrf_gpiote_outinit_t  init_val 
)

Function for forcing a specific state on the pin connected to GPIOTE.

Parameters
[in]idxTask-Event index.
[in]init_valPin state.
__STATIC_INLINE void nrf_gpiote_task_set ( nrf_gpiote_tasks_t  task)

Function for activating a specific GPIOTE task.

Parameters
[in]taskTask.
__STATIC_INLINE void nrf_gpiote_te_default ( uint32_t  idx)

Function for resetting a GPIOTE task event configuration to the default state.

Parameters
[in]idxTask-Event index.

Documentation feedback | Developer Zone | Subscribe | Updated