nrfx 2.5
Macros | Enumerations | Functions
GPIOTE HAL

Hardware access layer (HAL) for managing the GPIOTE peripheral. More...

Macros

#define GPIOTE_CONFIG_PORT_PIN_Msk   (GPIOTE_CONFIG_PORT_Msk | GPIOTE_CONFIG_PSEL_Msk)
 Mask for covering port and pin bits in registers.
 
#define NRF_GPIOTE_HAS_LATENCY   1
 Presence of the latency setting.
 
#define NRF_GPIOTE_INT_IN_MASK
 Mask holding positions of available GPIOTE input interrupts. 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 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_latency_t {
  NRF_GPIOTE_LATENCY_LOWPOWER = GPIOTE_LATENCY_LATENCY_LowPower,
  NRF_GPIOTE_LATENCY_LOWLATENCY = GPIOTE_LATENCY_LATENCY_LowLatency
}
 Latency setting. More...
 
enum  nrf_gpiote_task_t {
  NRF_GPIOTE_TASK_OUT_0 = offsetof(NRF_GPIOTE_Type, TASKS_OUT[0]),
  NRF_GPIOTE_TASK_OUT_1 = offsetof(NRF_GPIOTE_Type, TASKS_OUT[1]),
  NRF_GPIOTE_TASK_OUT_2 = offsetof(NRF_GPIOTE_Type, TASKS_OUT[2]),
  NRF_GPIOTE_TASK_OUT_3 = offsetof(NRF_GPIOTE_Type, TASKS_OUT[3]),
  NRF_GPIOTE_TASK_OUT_4 = offsetof(NRF_GPIOTE_Type, TASKS_OUT[4]),
  NRF_GPIOTE_TASK_OUT_5 = offsetof(NRF_GPIOTE_Type, TASKS_OUT[5]),
  NRF_GPIOTE_TASK_OUT_6 = offsetof(NRF_GPIOTE_Type, TASKS_OUT[6]),
  NRF_GPIOTE_TASK_OUT_7 = offsetof(NRF_GPIOTE_Type, TASKS_OUT[7]),
  NRF_GPIOTE_TASK_SET_0 = offsetof(NRF_GPIOTE_Type, TASKS_SET[0]),
  NRF_GPIOTE_TASK_SET_1 = offsetof(NRF_GPIOTE_Type, TASKS_SET[1]),
  NRF_GPIOTE_TASK_SET_2 = offsetof(NRF_GPIOTE_Type, TASKS_SET[2]),
  NRF_GPIOTE_TASK_SET_3 = offsetof(NRF_GPIOTE_Type, TASKS_SET[3]),
  NRF_GPIOTE_TASK_SET_4 = offsetof(NRF_GPIOTE_Type, TASKS_SET[4]),
  NRF_GPIOTE_TASK_SET_5 = offsetof(NRF_GPIOTE_Type, TASKS_SET[5]),
  NRF_GPIOTE_TASK_SET_6 = offsetof(NRF_GPIOTE_Type, TASKS_SET[6]),
  NRF_GPIOTE_TASK_SET_7 = offsetof(NRF_GPIOTE_Type, TASKS_SET[7]),
  NRF_GPIOTE_TASK_CLR_0 = offsetof(NRF_GPIOTE_Type, TASKS_CLR[0]),
  NRF_GPIOTE_TASK_CLR_1 = offsetof(NRF_GPIOTE_Type, TASKS_CLR[1]),
  NRF_GPIOTE_TASK_CLR_2 = offsetof(NRF_GPIOTE_Type, TASKS_CLR[2]),
  NRF_GPIOTE_TASK_CLR_3 = offsetof(NRF_GPIOTE_Type, TASKS_CLR[3]),
  NRF_GPIOTE_TASK_CLR_4 = offsetof(NRF_GPIOTE_Type, TASKS_CLR[4]),
  NRF_GPIOTE_TASK_CLR_5 = offsetof(NRF_GPIOTE_Type, TASKS_CLR[5]),
  NRF_GPIOTE_TASK_CLR_6 = offsetof(NRF_GPIOTE_Type, TASKS_CLR[6]),
  NRF_GPIOTE_TASK_CLR_7 = offsetof(NRF_GPIOTE_Type, TASKS_CLR[7])
}
 GPIOTE tasks. More...
 
enum  nrf_gpiote_event_t {
  NRF_GPIOTE_EVENT_IN_0 = offsetof(NRF_GPIOTE_Type, EVENTS_IN[0]),
  NRF_GPIOTE_EVENT_IN_1 = offsetof(NRF_GPIOTE_Type, EVENTS_IN[1]),
  NRF_GPIOTE_EVENT_IN_2 = offsetof(NRF_GPIOTE_Type, EVENTS_IN[2]),
  NRF_GPIOTE_EVENT_IN_3 = offsetof(NRF_GPIOTE_Type, EVENTS_IN[3]),
  NRF_GPIOTE_EVENT_IN_4 = offsetof(NRF_GPIOTE_Type, EVENTS_IN[4]),
  NRF_GPIOTE_EVENT_IN_5 = offsetof(NRF_GPIOTE_Type, EVENTS_IN[5]),
  NRF_GPIOTE_EVENT_IN_6 = offsetof(NRF_GPIOTE_Type, EVENTS_IN[6]),
  NRF_GPIOTE_EVENT_IN_7 = offsetof(NRF_GPIOTE_Type, EVENTS_IN[7]),
  NRF_GPIOTE_EVENT_PORT = offsetof(NRF_GPIOTE_Type, EVENTS_PORT)
}
 GPIOTE 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

NRF_STATIC_INLINE void nrf_gpiote_task_trigger (NRF_GPIOTE_Type *p_reg, nrf_gpiote_task_t task)
 Function for activating the specified GPIOTE task. More...
 
NRF_STATIC_INLINE uint32_t nrf_gpiote_task_address_get (NRF_GPIOTE_Type const *p_reg, nrf_gpiote_task_t task)
 Function for getting the address of the specified GPIOTE task. More...
 
NRF_STATIC_INLINE bool nrf_gpiote_event_check (NRF_GPIOTE_Type const *p_reg, nrf_gpiote_event_t event)
 Function for getting the state of the specified GPIOTE event. More...
 
NRF_STATIC_INLINE void nrf_gpiote_event_clear (NRF_GPIOTE_Type *p_reg, nrf_gpiote_event_t event)
 Function for clearing the specified GPIOTE event. More...
 
NRF_STATIC_INLINE uint32_t nrf_gpiote_event_address_get (NRF_GPIOTE_Type const *p_reg, nrf_gpiote_event_t event)
 Function for getting the address of the specified GPIOTE event. More...
 
NRF_STATIC_INLINE void nrf_gpiote_int_enable (NRF_GPIOTE_Type *p_reg, uint32_t mask)
 Function for enabling interrupts. More...
 
NRF_STATIC_INLINE void nrf_gpiote_int_disable (NRF_GPIOTE_Type *p_reg, uint32_t mask)
 Function for disabling interrupts. More...
 
NRF_STATIC_INLINE uint32_t nrf_gpiote_int_enable_check (NRF_GPIOTE_Type const *p_reg, uint32_t mask)
 Function for checking if the specified interrupts are enabled. More...
 
NRF_STATIC_INLINE void nrf_gpiote_subscribe_set (NRF_GPIOTE_Type *p_reg, nrf_gpiote_task_t task, uint8_t channel)
 Function for setting the subscribe configuration for a given GPIOTE task. More...
 
NRF_STATIC_INLINE void nrf_gpiote_subscribe_clear (NRF_GPIOTE_Type *p_reg, nrf_gpiote_task_t task)
 Function for clearing the subscribe configuration for a given GPIOTE task. More...
 
NRF_STATIC_INLINE void nrf_gpiote_publish_set (NRF_GPIOTE_Type *p_reg, nrf_gpiote_event_t event, uint8_t channel)
 Function for setting the publish configuration for a given GPIOTE event. More...
 
NRF_STATIC_INLINE void nrf_gpiote_publish_clear (NRF_GPIOTE_Type *p_reg, nrf_gpiote_event_t event)
 Function for clearing the publish configuration for a given GPIOTE event. More...
 
NRF_STATIC_INLINE void nrf_gpiote_event_enable (NRF_GPIOTE_Type *p_reg, uint32_t idx)
 Function for enabling a GPIOTE event. More...
 
NRF_STATIC_INLINE void nrf_gpiote_event_disable (NRF_GPIOTE_Type *p_reg, uint32_t idx)
 Function for disabling a GPIOTE event. More...
 
NRF_STATIC_INLINE void nrf_gpiote_event_configure (NRF_GPIOTE_Type *p_reg, uint32_t idx, uint32_t pin, nrf_gpiote_polarity_t polarity)
 Function for configuring a GPIOTE event. More...
 
NRF_STATIC_INLINE uint32_t nrf_gpiote_event_pin_get (NRF_GPIOTE_Type const *p_reg, uint32_t idx)
 Function for getting the pin associated with a GPIOTE event. More...
 
NRF_STATIC_INLINE nrf_gpiote_polarity_t nrf_gpiote_event_polarity_get (NRF_GPIOTE_Type const *p_reg, uint32_t idx)
 Function for getting the polarity associated with a GPIOTE event. More...
 
NRF_STATIC_INLINE void nrf_gpiote_task_enable (NRF_GPIOTE_Type *p_reg, uint32_t idx)
 Function for enabling a GPIOTE task. More...
 
NRF_STATIC_INLINE void nrf_gpiote_task_disable (NRF_GPIOTE_Type *p_reg, uint32_t idx)
 Function for disabling a GPIOTE task. More...
 
NRF_STATIC_INLINE void nrf_gpiote_task_configure (NRF_GPIOTE_Type *p_reg, uint32_t idx, uint32_t pin, nrf_gpiote_polarity_t polarity, nrf_gpiote_outinit_t init_val)
 Function for configuring a GPIOTE task. More...
 
NRF_STATIC_INLINE void nrf_gpiote_task_force (NRF_GPIOTE_Type *p_reg, uint32_t idx, nrf_gpiote_outinit_t init_val)
 Function for forcing the specified state on the pin connected to GPIOTE. More...
 
NRF_STATIC_INLINE void nrf_gpiote_te_default (NRF_GPIOTE_Type *p_reg, uint32_t idx)
 Function for resetting a GPIOTE task event configuration to the default state. More...
 
NRF_STATIC_INLINE bool nrf_gpiote_te_is_enabled (NRF_GPIOTE_Type const *p_reg, uint32_t idx)
 Function for checking if particular Task-Event is enabled. More...
 
NRF_STATIC_INLINE nrf_gpiote_task_t nrf_gpiote_out_task_get (uint8_t index)
 Function for getting the OUT task associated with the specified GPIOTE channel. More...
 
NRF_STATIC_INLINE nrf_gpiote_task_t nrf_gpiote_set_task_get (uint8_t index)
 Function for getting the SET task associated with the specified GPIOTE channel. More...
 
NRF_STATIC_INLINE nrf_gpiote_task_t nrf_gpiote_clr_task_get (uint8_t index)
 Function for getting the CLR task associated with the specified GPIOTE channel. More...
 
NRF_STATIC_INLINE nrf_gpiote_event_t nrf_gpiote_in_event_get (uint8_t index)
 Function for getting the IN event associated with the specified GPIOTE channel. More...
 
NRF_STATIC_INLINE void nrf_gpiote_latency_set (NRF_GPIOTE_Type *p_reg, nrf_gpiote_latency_t latency)
 Function for setting the latency setting. More...
 
NRF_STATIC_INLINE nrf_gpiote_latency_t nrf_gpiote_latency_get (NRF_GPIOTE_Type const *p_reg)
 Function for retrieving the latency setting. More...
 

Detailed Description

Hardware access layer (HAL) for managing the GPIOTE peripheral.

Macro Definition Documentation

◆ NRF_GPIOTE_INT_IN_MASK

#define NRF_GPIOTE_INT_IN_MASK
Value:
NRF_GPIOTE_INT_IN2_MASK | NRF_GPIOTE_INT_IN3_MASK)
Definition: nrf_gpiote.h:112
Definition: nrf_gpiote.h:114
Definition: nrf_gpiote.h:111

Mask holding positions of available GPIOTE input interrupts.

Enumeration Type Documentation

◆ nrf_gpiote_event_t

GPIOTE events.

Enumerator
NRF_GPIOTE_EVENT_IN_0 

In event 0.

NRF_GPIOTE_EVENT_IN_1 

In event 1.

NRF_GPIOTE_EVENT_IN_2 

In event 2.

NRF_GPIOTE_EVENT_IN_3 

In event 3.

NRF_GPIOTE_EVENT_IN_4 

In event 4.

NRF_GPIOTE_EVENT_IN_5 

In event 5.

NRF_GPIOTE_EVENT_IN_6 

In event 6.

NRF_GPIOTE_EVENT_IN_7 

In event 7.

NRF_GPIOTE_EVENT_PORT 

Port event.

◆ nrf_gpiote_int_t

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.

◆ nrf_gpiote_latency_t

Latency setting.

Enumerator
NRF_GPIOTE_LATENCY_LOWPOWER 

Low Power.

NRF_GPIOTE_LATENCY_LOWLATENCY 

Low Latency.

◆ nrf_gpiote_outinit_t

Initial output value for the GPIOTE channel.

Enumerator
NRF_GPIOTE_INITIAL_VALUE_LOW 

Low to high.

NRF_GPIOTE_INITIAL_VALUE_HIGH 

High to low.

◆ nrf_gpiote_polarity_t

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.

◆ nrf_gpiote_task_t

GPIOTE tasks.

Enumerator
NRF_GPIOTE_TASK_OUT_0 

Out task 0.

NRF_GPIOTE_TASK_OUT_1 

Out task 1.

NRF_GPIOTE_TASK_OUT_2 

Out task 2.

NRF_GPIOTE_TASK_OUT_3 

Out task 3.

NRF_GPIOTE_TASK_OUT_4 

Out task 4.

NRF_GPIOTE_TASK_OUT_5 

Out task 5.

NRF_GPIOTE_TASK_OUT_6 

Out task 6.

NRF_GPIOTE_TASK_OUT_7 

Out task 7.

NRF_GPIOTE_TASK_SET_0 

Set task 0.

NRF_GPIOTE_TASK_SET_1 

Set task 1.

NRF_GPIOTE_TASK_SET_2 

Set task 2.

NRF_GPIOTE_TASK_SET_3 

Set task 3.

NRF_GPIOTE_TASK_SET_4 

Set task 4.

NRF_GPIOTE_TASK_SET_5 

Set task 5.

NRF_GPIOTE_TASK_SET_6 

Set task 6.

NRF_GPIOTE_TASK_SET_7 

Set task 7.

NRF_GPIOTE_TASK_CLR_0 

Clear task 0.

NRF_GPIOTE_TASK_CLR_1 

Clear task 1.

NRF_GPIOTE_TASK_CLR_2 

Clear task 2.

NRF_GPIOTE_TASK_CLR_3 

Clear task 3.

NRF_GPIOTE_TASK_CLR_4 

Clear task 4.

NRF_GPIOTE_TASK_CLR_5 

Clear task 5.

NRF_GPIOTE_TASK_CLR_6 

Clear task 6.

NRF_GPIOTE_TASK_CLR_7 

Clear task 7.

Function Documentation

◆ nrf_gpiote_clr_task_get()

NRF_STATIC_INLINE nrf_gpiote_task_t nrf_gpiote_clr_task_get ( uint8_t  index)

Function for getting the CLR task associated with the specified GPIOTE channel.

Parameters
[in]indexChannel index.
Returns
Requested CLR task.

◆ nrf_gpiote_event_address_get()

NRF_STATIC_INLINE uint32_t nrf_gpiote_event_address_get ( NRF_GPIOTE_Type const *  p_reg,
nrf_gpiote_event_t  event 
)

Function for getting the address of the specified GPIOTE event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent.
Returns
Address of the specified event.

◆ nrf_gpiote_event_check()

NRF_STATIC_INLINE bool nrf_gpiote_event_check ( NRF_GPIOTE_Type const *  p_reg,
nrf_gpiote_event_t  event 
)

Function for getting the state of the specified GPIOTE event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent.
Return values
trueThe event is set.
falseThe event is not set.

◆ nrf_gpiote_event_clear()

NRF_STATIC_INLINE void nrf_gpiote_event_clear ( NRF_GPIOTE_Type *  p_reg,
nrf_gpiote_event_t  event 
)

Function for clearing the specified GPIOTE event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent.

◆ nrf_gpiote_event_configure()

NRF_STATIC_INLINE void nrf_gpiote_event_configure ( NRF_GPIOTE_Type *  p_reg,
uint32_t  idx,
uint32_t  pin,
nrf_gpiote_polarity_t  polarity 
)

Function for configuring a GPIOTE event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]idxTask-Event index.
[in]pinPin associated with event.
[in]polarityTransition that should generate an event.

◆ nrf_gpiote_event_disable()

NRF_STATIC_INLINE void nrf_gpiote_event_disable ( NRF_GPIOTE_Type *  p_reg,
uint32_t  idx 
)

Function for disabling a GPIOTE event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]idxTask-Event index.

◆ nrf_gpiote_event_enable()

NRF_STATIC_INLINE void nrf_gpiote_event_enable ( NRF_GPIOTE_Type *  p_reg,
uint32_t  idx 
)

Function for enabling a GPIOTE event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]idxTask-Event index.

◆ nrf_gpiote_event_pin_get()

NRF_STATIC_INLINE uint32_t nrf_gpiote_event_pin_get ( NRF_GPIOTE_Type const *  p_reg,
uint32_t  idx 
)

Function for getting the pin associated with a GPIOTE event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]idxTask-Event index.
Returns
Pin number.

◆ nrf_gpiote_event_polarity_get()

NRF_STATIC_INLINE nrf_gpiote_polarity_t nrf_gpiote_event_polarity_get ( NRF_GPIOTE_Type const *  p_reg,
uint32_t  idx 
)

Function for getting the polarity associated with a GPIOTE event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]idxTask-Event index.
Returns
Polarity.

◆ nrf_gpiote_in_event_get()

NRF_STATIC_INLINE nrf_gpiote_event_t nrf_gpiote_in_event_get ( uint8_t  index)

Function for getting the IN event associated with the specified GPIOTE channel.

Parameters
[in]indexChannel index.
Returns
Requested IN event.

◆ nrf_gpiote_int_disable()

NRF_STATIC_INLINE void nrf_gpiote_int_disable ( NRF_GPIOTE_Type *  p_reg,
uint32_t  mask 
)

Function for disabling interrupts.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be disabled.

◆ nrf_gpiote_int_enable()

NRF_STATIC_INLINE void nrf_gpiote_int_enable ( NRF_GPIOTE_Type *  p_reg,
uint32_t  mask 
)

Function for enabling interrupts.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be enabled.

◆ nrf_gpiote_int_enable_check()

NRF_STATIC_INLINE uint32_t nrf_gpiote_int_enable_check ( NRF_GPIOTE_Type const *  p_reg,
uint32_t  mask 
)

Function for checking if the specified interrupts are enabled.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be checked.
Returns
Mask of enabled interrupts.

◆ nrf_gpiote_latency_get()

NRF_STATIC_INLINE nrf_gpiote_latency_t nrf_gpiote_latency_get ( NRF_GPIOTE_Type const *  p_reg)

Function for retrieving the latency setting.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Latency setting.

◆ nrf_gpiote_latency_set()

NRF_STATIC_INLINE void nrf_gpiote_latency_set ( NRF_GPIOTE_Type *  p_reg,
nrf_gpiote_latency_t  latency 
)

Function for setting the latency setting.

Note
Available for event mode with rising or falling edge detection on the pin. Toggle task mode can only be used with low latency setting.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]latencyLatency setting to be set.

◆ nrf_gpiote_out_task_get()

NRF_STATIC_INLINE nrf_gpiote_task_t nrf_gpiote_out_task_get ( uint8_t  index)

Function for getting the OUT task associated with the specified GPIOTE channel.

Parameters
[in]indexChannel index.
Returns
Requested OUT task.

◆ nrf_gpiote_publish_clear()

NRF_STATIC_INLINE void nrf_gpiote_publish_clear ( NRF_GPIOTE_Type *  p_reg,
nrf_gpiote_event_t  event 
)

Function for clearing the publish configuration for a given GPIOTE event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent for which to clear the configuration.

◆ nrf_gpiote_publish_set()

NRF_STATIC_INLINE void nrf_gpiote_publish_set ( NRF_GPIOTE_Type *  p_reg,
nrf_gpiote_event_t  event,
uint8_t  channel 
)

Function for setting the publish configuration for a given GPIOTE event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent for which to set the configuration.
[in]channelChannel through which to publish the event.

◆ nrf_gpiote_set_task_get()

NRF_STATIC_INLINE nrf_gpiote_task_t nrf_gpiote_set_task_get ( uint8_t  index)

Function for getting the SET task associated with the specified GPIOTE channel.

Parameters
[in]indexChannel index.
Returns
Requested SET task.

◆ nrf_gpiote_subscribe_clear()

NRF_STATIC_INLINE void nrf_gpiote_subscribe_clear ( NRF_GPIOTE_Type *  p_reg,
nrf_gpiote_task_t  task 
)

Function for clearing the subscribe configuration for a given GPIOTE task.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskTask for which to clear the configuration.

◆ nrf_gpiote_subscribe_set()

NRF_STATIC_INLINE void nrf_gpiote_subscribe_set ( NRF_GPIOTE_Type *  p_reg,
nrf_gpiote_task_t  task,
uint8_t  channel 
)

Function for setting the subscribe configuration for a given GPIOTE task.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskTask for which to set the configuration.
[in]channelChannel through which to subscribe events.

◆ nrf_gpiote_task_address_get()

NRF_STATIC_INLINE uint32_t nrf_gpiote_task_address_get ( NRF_GPIOTE_Type const *  p_reg,
nrf_gpiote_task_t  task 
)

Function for getting the address of the specified GPIOTE task.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskTask.
Returns
Address of the specified task.

◆ nrf_gpiote_task_configure()

NRF_STATIC_INLINE void nrf_gpiote_task_configure ( NRF_GPIOTE_Type *  p_reg,
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]p_regPointer to the structure of registers of the peripheral.
[in]idxTask-Event index.
[in]pinPin associated with event.
[in]polarityTransition that should generate an event.
[in]init_valInitial value of the pin.

◆ nrf_gpiote_task_disable()

NRF_STATIC_INLINE void nrf_gpiote_task_disable ( NRF_GPIOTE_Type *  p_reg,
uint32_t  idx 
)

Function for disabling a GPIOTE task.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]idxTask-Event index.

◆ nrf_gpiote_task_enable()

NRF_STATIC_INLINE void nrf_gpiote_task_enable ( NRF_GPIOTE_Type *  p_reg,
uint32_t  idx 
)

Function for enabling a GPIOTE task.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]idxTask-Event index.

◆ nrf_gpiote_task_force()

NRF_STATIC_INLINE void nrf_gpiote_task_force ( NRF_GPIOTE_Type *  p_reg,
uint32_t  idx,
nrf_gpiote_outinit_t  init_val 
)

Function for forcing the specified state on the pin connected to GPIOTE.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]idxTask-Event index.
[in]init_valPin state.

◆ nrf_gpiote_task_trigger()

NRF_STATIC_INLINE void nrf_gpiote_task_trigger ( NRF_GPIOTE_Type *  p_reg,
nrf_gpiote_task_t  task 
)

Function for activating the specified GPIOTE task.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskTask.

◆ nrf_gpiote_te_default()

NRF_STATIC_INLINE void nrf_gpiote_te_default ( NRF_GPIOTE_Type *  p_reg,
uint32_t  idx 
)

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

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]idxTask-Event index.

◆ nrf_gpiote_te_is_enabled()

NRF_STATIC_INLINE bool nrf_gpiote_te_is_enabled ( NRF_GPIOTE_Type const *  p_reg,
uint32_t  idx 
)

Function for checking if particular Task-Event is enabled.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]idxTask-Event index.
Return values
trueThe Task-Event mode is set to Task or Event.
falseThe Task-Event mode is set to Disabled.

Documentation feedback | Developer Zone | Subscribe | Updated