nrfx 3.3
Macros | Functions
GPIOTE HALY

Hardware access layer with cache and barrier support for managing the GPIOTE peripheral. More...

Macros

#define NRFY_GPIOTE_HAS_LATENCY   1
 

Functions

NRFY_STATIC_INLINE void nrfy_gpiote_int_init (NRF_GPIOTE_Type *p_reg, uint32_t mask, uint8_t irq_priority, bool enable, uint32_t channels_number)
 Function for initializing the specified GPIOTE interrupts.
 
NRFY_STATIC_INLINE uint32_t nrfy_gpiote_events_process (NRF_GPIOTE_Type *p_reg, uint32_t mask, uint32_t channels_number)
 Function for processing the specified GPIOTE events.
 
NRFY_STATIC_INLINE void nrfy_gpiote_task_trigger (NRF_GPIOTE_Type *p_reg, nrf_gpiote_task_t task)
 
NRFY_STATIC_INLINE uint32_t nrfy_gpiote_task_address_get (NRF_GPIOTE_Type const *p_reg, nrf_gpiote_task_t task)
 
NRFY_STATIC_INLINE bool nrfy_gpiote_event_check (NRF_GPIOTE_Type const *p_reg, nrf_gpiote_event_t event)
 
NRFY_STATIC_INLINE void nrfy_gpiote_event_clear (NRF_GPIOTE_Type *p_reg, nrf_gpiote_event_t event)
 
NRFY_STATIC_INLINE uint32_t nrfy_gpiote_event_address_get (NRF_GPIOTE_Type const *p_reg, nrf_gpiote_event_t event)
 
NRFY_STATIC_INLINE void nrfy_gpiote_int_enable (NRF_GPIOTE_Type *p_reg, uint32_t mask)
 
NRFY_STATIC_INLINE void nrfy_gpiote_int_disable (NRF_GPIOTE_Type *p_reg, uint32_t mask)
 
NRFY_STATIC_INLINE uint32_t nrfy_gpiote_int_enable_check (NRF_GPIOTE_Type const *p_reg, uint32_t mask)
 
NRFY_STATIC_INLINE void nrfy_gpiote_subscribe_set (NRF_GPIOTE_Type *p_reg, nrf_gpiote_task_t task, uint8_t channel)
 
NRFY_STATIC_INLINE void nrfy_gpiote_subscribe_clear (NRF_GPIOTE_Type *p_reg, nrf_gpiote_task_t task)
 
NRFY_STATIC_INLINE void nrfy_gpiote_publish_set (NRF_GPIOTE_Type *p_reg, nrf_gpiote_event_t event, uint8_t channel)
 
NRFY_STATIC_INLINE void nrfy_gpiote_publish_clear (NRF_GPIOTE_Type *p_reg, nrf_gpiote_event_t event)
 
NRFY_STATIC_INLINE void nrfy_gpiote_event_enable (NRF_GPIOTE_Type *p_reg, uint32_t idx)
 
NRFY_STATIC_INLINE void nrfy_gpiote_event_disable (NRF_GPIOTE_Type *p_reg, uint32_t idx)
 
NRFY_STATIC_INLINE void nrfy_gpiote_event_configure (NRF_GPIOTE_Type *p_reg, uint32_t idx, uint32_t pin, nrf_gpiote_polarity_t polarity)
 
NRFY_STATIC_INLINE uint32_t nrfy_gpiote_event_pin_get (NRF_GPIOTE_Type const *p_reg, uint32_t idx)
 
NRFY_STATIC_INLINE nrf_gpiote_polarity_t nrfy_gpiote_event_polarity_get (NRF_GPIOTE_Type const *p_reg, uint32_t idx)
 
NRFY_STATIC_INLINE void nrfy_gpiote_task_enable (NRF_GPIOTE_Type *p_reg, uint32_t idx)
 
NRFY_STATIC_INLINE void nrfy_gpiote_task_disable (NRF_GPIOTE_Type *p_reg, uint32_t idx)
 
NRFY_STATIC_INLINE void nrfy_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)
 
NRFY_STATIC_INLINE void nrfy_gpiote_task_force (NRF_GPIOTE_Type *p_reg, uint32_t idx, nrf_gpiote_outinit_t init_val)
 
NRFY_STATIC_INLINE void nrfy_gpiote_te_default (NRF_GPIOTE_Type *p_reg, uint32_t idx)
 
NRFY_STATIC_INLINE bool nrfy_gpiote_te_is_enabled (NRF_GPIOTE_Type const *p_reg, uint32_t idx)
 
NRFY_STATIC_INLINE nrf_gpiote_task_t nrfy_gpiote_out_task_get (uint8_t index)
 
NRFY_STATIC_INLINE nrf_gpiote_task_t nrfy_gpiote_set_task_get (uint8_t index)
 
NRFY_STATIC_INLINE nrf_gpiote_task_t nrfy_gpiote_clr_task_get (uint8_t index)
 
NRFY_STATIC_INLINE nrf_gpiote_event_t nrfy_gpiote_in_event_get (uint8_t index)
 
NRFY_STATIC_INLINE void nrfy_gpiote_latency_set (NRF_GPIOTE_Type *p_reg, nrf_gpiote_latency_t latency)
 
NRFY_STATIC_INLINE nrf_gpiote_latency_t nrfy_gpiote_latency_get (NRF_GPIOTE_Type const *p_reg)
 

Detailed Description

Hardware access layer with cache and barrier support for managing the GPIOTE peripheral.

Macro Definition Documentation

◆ NRFY_GPIOTE_HAS_LATENCY

#define NRFY_GPIOTE_HAS_LATENCY   1
See also
NRF_GPIOTE_HAS_LATENCY Presence of the latency setting.

Function Documentation

◆ nrfy_gpiote_clr_task_get()

NRFY_STATIC_INLINE nrf_gpiote_task_t nrfy_gpiote_clr_task_get ( uint8_t  index)
See also
nrf_gpiote_clr_task_get Function for getting the CLR task associated with the specified GPIOTE channel.
Parameters
[in]indexChannel index.
Returns
Requested CLR task.

◆ nrfy_gpiote_event_address_get()

NRFY_STATIC_INLINE uint32_t nrfy_gpiote_event_address_get ( NRF_GPIOTE_Type const *  p_reg,
nrf_gpiote_event_t  event 
)
See also
nrf_gpiote_event_address_get 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.

◆ nrfy_gpiote_event_check()

NRFY_STATIC_INLINE bool nrfy_gpiote_event_check ( NRF_GPIOTE_Type const *  p_reg,
nrf_gpiote_event_t  event 
)
See also
nrf_gpiote_event_check 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.

◆ nrfy_gpiote_event_clear()

NRFY_STATIC_INLINE void nrfy_gpiote_event_clear ( NRF_GPIOTE_Type *  p_reg,
nrf_gpiote_event_t  event 
)
See also
nrf_gpiote_event_clear Function for clearing the specified GPIOTE event.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent.

◆ nrfy_gpiote_event_configure()

NRFY_STATIC_INLINE void nrfy_gpiote_event_configure ( NRF_GPIOTE_Type *  p_reg,
uint32_t  idx,
uint32_t  pin,
nrf_gpiote_polarity_t  polarity 
)
See also
nrf_gpiote_event_configure 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.

◆ nrfy_gpiote_event_disable()

NRFY_STATIC_INLINE void nrfy_gpiote_event_disable ( NRF_GPIOTE_Type *  p_reg,
uint32_t  idx 
)
See also
nrf_gpiote_event_disable Function for disabling a GPIOTE event.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]idxTask-Event index.

◆ nrfy_gpiote_event_enable()

NRFY_STATIC_INLINE void nrfy_gpiote_event_enable ( NRF_GPIOTE_Type *  p_reg,
uint32_t  idx 
)
See also
nrf_gpiote_event_enable Function for enabling a GPIOTE event.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]idxTask-Event index.

◆ nrfy_gpiote_event_pin_get()

NRFY_STATIC_INLINE uint32_t nrfy_gpiote_event_pin_get ( NRF_GPIOTE_Type const *  p_reg,
uint32_t  idx 
)
See also
nrf_gpiote_event_pin_get 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.

◆ nrfy_gpiote_event_polarity_get()

NRFY_STATIC_INLINE nrf_gpiote_polarity_t nrfy_gpiote_event_polarity_get ( NRF_GPIOTE_Type const *  p_reg,
uint32_t  idx 
)
See also
nrf_gpiote_event_polarity_get 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.

◆ nrfy_gpiote_events_process()

NRFY_STATIC_INLINE uint32_t nrfy_gpiote_events_process ( NRF_GPIOTE_Type *  p_reg,
uint32_t  mask,
uint32_t  channels_number 
)

Function for processing the specified GPIOTE events.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of events to be processed, created by NRFY_EVENT_TO_INT_BITMASK().
[in]channels_numberNumber of channels for specified GPIOTE peripheral.
Returns
Mask of events that were generated and processed. To be checked against the result of NRFY_EVENT_TO_INT_BITMASK().

◆ nrfy_gpiote_in_event_get()

NRFY_STATIC_INLINE nrf_gpiote_event_t nrfy_gpiote_in_event_get ( uint8_t  index)
See also
nrf_gpiote_in_event_get Function for getting the IN event associated with the specified GPIOTE channel.
Parameters
[in]indexChannel index.
Returns
Requested IN event.

◆ nrfy_gpiote_int_disable()

NRFY_STATIC_INLINE void nrfy_gpiote_int_disable ( NRF_GPIOTE_Type *  p_reg,
uint32_t  mask 
)
See also
nrf_gpiote_int_disable Function for disabling interrupts.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be disabled. Use nrf_gpiote_int_t values for bit masking.

◆ nrfy_gpiote_int_enable()

NRFY_STATIC_INLINE void nrfy_gpiote_int_enable ( NRF_GPIOTE_Type *  p_reg,
uint32_t  mask 
)
See also
nrf_gpiote_int_enable Function for enabling interrupts.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be enabled. Use nrf_gpiote_int_t values for bit masking.

◆ nrfy_gpiote_int_enable_check()

NRFY_STATIC_INLINE uint32_t nrfy_gpiote_int_enable_check ( NRF_GPIOTE_Type const *  p_reg,
uint32_t  mask 
)
See also
nrf_gpiote_int_enable_check 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. Use nrf_gpiote_int_t values for bit masking.
Returns
Mask of enabled interrupts.

◆ nrfy_gpiote_int_init()

NRFY_STATIC_INLINE void nrfy_gpiote_int_init ( NRF_GPIOTE_Type *  p_reg,
uint32_t  mask,
uint8_t  irq_priority,
bool  enable,
uint32_t  channels_number 
)

Function for initializing the specified GPIOTE interrupts.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be initialized.
[in]irq_priorityInterrupt priority.
[in]enableTrue if the interrupts are to be enabled, false otherwise.
[in]channels_numberNumber of channels for specified GPIOTE peripheral.

◆ nrfy_gpiote_latency_get()

NRFY_STATIC_INLINE nrf_gpiote_latency_t nrfy_gpiote_latency_get ( NRF_GPIOTE_Type const *  p_reg)
See also
nrf_gpiote_latency_get Function for retrieving the latency setting.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Latency setting.

◆ nrfy_gpiote_latency_set()

NRFY_STATIC_INLINE void nrfy_gpiote_latency_set ( NRF_GPIOTE_Type *  p_reg,
nrf_gpiote_latency_t  latency 
)
See also
nrf_gpiote_latency_set 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.

◆ nrfy_gpiote_out_task_get()

NRFY_STATIC_INLINE nrf_gpiote_task_t nrfy_gpiote_out_task_get ( uint8_t  index)
See also
nrf_gpiote_out_task_get Function for getting the OUT task associated with the specified GPIOTE channel.
Parameters
[in]indexChannel index.
Returns
Requested OUT task.

◆ nrfy_gpiote_publish_clear()

NRFY_STATIC_INLINE void nrfy_gpiote_publish_clear ( NRF_GPIOTE_Type *  p_reg,
nrf_gpiote_event_t  event 
)
See also
nrf_gpiote_publish_clear 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.

◆ nrfy_gpiote_publish_set()

NRFY_STATIC_INLINE void nrfy_gpiote_publish_set ( NRF_GPIOTE_Type *  p_reg,
nrf_gpiote_event_t  event,
uint8_t  channel 
)
See also
nrf_gpiote_publish_set 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.

◆ nrfy_gpiote_set_task_get()

NRFY_STATIC_INLINE nrf_gpiote_task_t nrfy_gpiote_set_task_get ( uint8_t  index)
See also
nrf_gpiote_set_task_get Function for getting the SET task associated with the specified GPIOTE channel.
Parameters
[in]indexChannel index.
Returns
Requested SET task.

◆ nrfy_gpiote_subscribe_clear()

NRFY_STATIC_INLINE void nrfy_gpiote_subscribe_clear ( NRF_GPIOTE_Type *  p_reg,
nrf_gpiote_task_t  task 
)
See also
nrf_gpiote_subscribe_clear 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.

◆ nrfy_gpiote_subscribe_set()

NRFY_STATIC_INLINE void nrfy_gpiote_subscribe_set ( NRF_GPIOTE_Type *  p_reg,
nrf_gpiote_task_t  task,
uint8_t  channel 
)
See also
nrf_gpiote_subscribe_set 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.

◆ nrfy_gpiote_task_address_get()

NRFY_STATIC_INLINE uint32_t nrfy_gpiote_task_address_get ( NRF_GPIOTE_Type const *  p_reg,
nrf_gpiote_task_t  task 
)
See also
nrf_gpiote_task_address_get 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.

◆ nrfy_gpiote_task_configure()

NRFY_STATIC_INLINE void nrfy_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 
)
See also
nrf_gpiote_task_configure 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.

◆ nrfy_gpiote_task_disable()

NRFY_STATIC_INLINE void nrfy_gpiote_task_disable ( NRF_GPIOTE_Type *  p_reg,
uint32_t  idx 
)
See also
nrf_gpiote_task_disable Function for disabling a GPIOTE task.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]idxTask-Event index.

◆ nrfy_gpiote_task_enable()

NRFY_STATIC_INLINE void nrfy_gpiote_task_enable ( NRF_GPIOTE_Type *  p_reg,
uint32_t  idx 
)
See also
nrf_gpiote_task_enable Function for enabling a GPIOTE task.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]idxTask-Event index.

◆ nrfy_gpiote_task_force()

NRFY_STATIC_INLINE void nrfy_gpiote_task_force ( NRF_GPIOTE_Type *  p_reg,
uint32_t  idx,
nrf_gpiote_outinit_t  init_val 
)
See also
nrf_gpiote_task_force 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.

◆ nrfy_gpiote_task_trigger()

NRFY_STATIC_INLINE void nrfy_gpiote_task_trigger ( NRF_GPIOTE_Type *  p_reg,
nrf_gpiote_task_t  task 
)
See also
nrf_gpiote_task_trigger Function for activating the specified GPIOTE task.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskTask.

◆ nrfy_gpiote_te_default()

NRFY_STATIC_INLINE void nrfy_gpiote_te_default ( NRF_GPIOTE_Type *  p_reg,
uint32_t  idx 
)
See also
nrf_gpiote_te_default 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.

◆ nrfy_gpiote_te_is_enabled()

NRFY_STATIC_INLINE bool nrfy_gpiote_te_is_enabled ( NRF_GPIOTE_Type const *  p_reg,
uint32_t  idx 
)
See also
nrf_gpiote_te_is_enabled 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