nrfx 2.5
Data Structures | Macros | Typedefs | Functions
EGU driver

Event Generator Unit (EGU) peripheral driver. More...

Data Structures

struct  nrfx_egu_t
 Structure for the EGU driver instance. More...
 

Macros

#define NRFX_EGU_INSTANCE(id)
 Macro for creating an EGU driver instance. More...
 

Typedefs

typedef void(* nrfx_egu_event_handler_t) (uint8_t event_idx, void *p_context)
 EGU driver event handler. More...
 

Functions

nrfx_err_t nrfx_egu_init (nrfx_egu_t const *p_instance, uint8_t interrupt_priority, nrfx_egu_event_handler_t event_handler, void *p_context)
 Function for initializing the EGU driver instance. More...
 
void nrfx_egu_int_enable (nrfx_egu_t const *p_instance, uint32_t mask)
 Function for enabling interrupts on specified events of a given EGU driver instance. More...
 
void nrfx_egu_int_disable (nrfx_egu_t const *p_instance, uint32_t mask)
 Function for disabling interrupts on specified events of a given EGU driver instance. More...
 
void nrfx_egu_trigger (nrfx_egu_t const *p_instance, uint8_t event_idx)
 Function for triggering an event specified by event_idx of a given EGU driver instance. More...
 
void nrfx_egu_uninit (nrfx_egu_t const *p_instance)
 Function for uninitializing the EGU driver instance. More...
 

Detailed Description

Event Generator Unit (EGU) peripheral driver.

Macro Definition Documentation

◆ NRFX_EGU_INSTANCE

#define NRFX_EGU_INSTANCE (   id)
Value:
{ \
.p_reg = NRFX_CONCAT_2(NRF_EGU, id), \
.drv_inst_idx = NRFX_CONCAT_3(NRFX_EGU, id, _INST_IDX), \
}
#define NRFX_CONCAT_2(p1, p2)
Macro for concatenating two tokens in macro expansion.
Definition: nrfx_common.h:67
#define NRFX_CONCAT_3(p1, p2, p3)
Macro for concatenating three tokens in macro expansion.
Definition: nrfx_common.h:88

Macro for creating an EGU driver instance.

Typedef Documentation

◆ nrfx_egu_event_handler_t

typedef void(* nrfx_egu_event_handler_t) (uint8_t event_idx, void *p_context)

EGU driver event handler.

Parameters
[in]event_idxIndex of the event that generated the interrupt.
[in]p_contextContext passed to the event handler. Set on initialization.

Function Documentation

◆ nrfx_egu_init()

nrfx_err_t nrfx_egu_init ( nrfx_egu_t const *  p_instance,
uint8_t  interrupt_priority,
nrfx_egu_event_handler_t  event_handler,
void *  p_context 
)

Function for initializing the EGU driver instance.

Parameters
[in]p_instancePointer to the driver instance structure.
[in]interrupt_priorityInterrupt priority.
[in]event_handlerEvent handler provided by the user. In case of providing NULL, event notifications are not done and EGU interrupts are disabled.
[in]p_contextContext passed to the event handler.
Return values
NRFX_SUCCESSInitialization was successful.
NRFX_ERROR_INVALID_STATEDriver is already initialized.

◆ nrfx_egu_int_disable()

void nrfx_egu_int_disable ( nrfx_egu_t const *  p_instance,
uint32_t  mask 
)

Function for disabling interrupts on specified events of a given EGU driver instance.

Parameters
[in]p_instancePointer to the driver instance structure.
[in]maskMask of events with interrupts to be disabled.

◆ nrfx_egu_int_enable()

void nrfx_egu_int_enable ( nrfx_egu_t const *  p_instance,
uint32_t  mask 
)

Function for enabling interrupts on specified events of a given EGU driver instance.

Parameters
[in]p_instancePointer to the driver instance structure.
[in]maskMask of events with interrupts to be enabled.

◆ nrfx_egu_trigger()

void nrfx_egu_trigger ( nrfx_egu_t const *  p_instance,
uint8_t  event_idx 
)

Function for triggering an event specified by event_idx of a given EGU driver instance.

Parameters
[in]p_instancePointer to the driver instance structure.
[in]event_idxIndex of the event to be triggered.

◆ nrfx_egu_uninit()

void nrfx_egu_uninit ( nrfx_egu_t const *  p_instance)

Function for uninitializing the EGU driver instance.

Parameters
[in]p_instancePointer to the driver instance structure.

Documentation feedback | Developer Zone | Subscribe | Updated