EGU driver¶
-
group
nrfx_egu
Event Generator Unit (EGU) peripheral driver.
Defines
-
NRFX_EGU_INSTANCE
(id)¶ Macro for creating an EGU driver instance.
Typedefs
-
typedef void (*
nrfx_egu_event_handler_t
)(uint8_t event_idx, void *p_context)¶ EGU driver event handler.
- Parameters
event_idx – [in] Index of the event that generated the interrupt.
p_context – [in] Context passed to the event handler. Set on initialization.
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.
- Parameters
p_instance – [in] Pointer to the driver instance structure.
interrupt_priority – [in] Interrupt priority.
event_handler – [in] Event handler provided by the user. In case of providing NULL, event notifications are not done and EGU interrupts are disabled.
p_context – [in] Context passed to the event handler.
- Returns NRFX_SUCCESS
Initialization was successful.
- Returns NRFX_ERROR_INVALID_STATE
Driver is already initialized.
-
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
p_instance – [in] Pointer to the driver instance structure.
mask – [in] Mask of events with interrupts to be enabled.
-
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
p_instance – [in] Pointer to the driver instance structure.
mask – [in] Mask of events with interrupts to be disabled.
-
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
p_instance – [in] Pointer to the driver instance structure.
event_idx – [in] Index of the event to be triggered.
-
void
nrfx_egu_uninit
(nrfx_egu_t const *p_instance)¶ Function for uninitializing the EGU driver instance.
- Parameters
p_instance – [in] Pointer to the driver instance structure.
-
struct
nrfx_egu_t
¶ - #include <nrfx_egu.h>
Structure for the EGU driver instance.
-