Event Generator Unit (EGU) peripheral driver.
More...
Event Generator Unit (EGU) peripheral driver.
◆ NRFX_EGU_INST_HANDLER_GET
#define NRFX_EGU_INST_HANDLER_GET |
( |
|
idx | ) |
NRFX_CONCAT_3(nrfx_egu_, idx, _irq_handler) |
Macro returning EGU interrupt handler.
param[in] idx EGU index.
- Returns
- Interrupt handler.
◆ NRFX_EGU_INSTANCE
#define NRFX_EGU_INSTANCE |
( |
|
id | ) |
|
Value:{ \
}
#define NRFX_CONCAT_2(p1, p2)
Macro for concatenating two tokens in macro expansion.
Definition: nrfx_common.h:134
#define NRFX_CONCAT_3(p1, p2, p3)
Macro for concatenating three tokens in macro expansion.
Definition: nrfx_common.h:155
Macro for creating an EGU driver instance.
◆ 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_idx | Index of the event that generated the interrupt. |
[in] | p_context | Context passed to the event handler. Set on initialization. |
◆ nrfx_egu_event_address_get()
Function for getting the address of the specified EGU event.
- Parameters
-
[in] | p_instance | Pointer to the driver instance structure. |
[in] | event | EGU event. |
- Returns
- Event address.
◆ nrfx_egu_init()
Function for initializing the EGU driver instance.
- Parameters
-
[in] | p_instance | Pointer to the driver instance structure. |
[in] | interrupt_priority | Interrupt priority. |
[in] | event_handler | Event handler provided by the user. In case of providing NULL, event notifications are not done and EGU interrupts are disabled. |
[in] | p_context | Context passed to the event handler. |
- Return values
-
NRFX_SUCCESS | Initialization was successful. |
NRFX_ERROR_ALREADY | The driver is already initialized. |
NRFX_ERROR_INVALID_STATE | The driver is already initialized. Deprecated - use NRFX_ERROR_ALREADY instead. |
◆ nrfx_egu_init_check()
bool nrfx_egu_init_check |
( |
nrfx_egu_t const * |
p_instance | ) |
|
Function for checking if the EGU driver instance is initialized.
- Parameters
-
[in] | p_instance | Pointer to the driver instance structure. |
- Return values
-
true | Instance is already initialized. |
false | Instance is not 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_instance | Pointer to the driver instance structure. |
[in] | mask | Mask 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_instance | Pointer to the driver instance structure. |
[in] | mask | Mask of events with interrupts to be enabled. |
◆ nrfx_egu_task_address_get()
Function for getting the address of the specified EGU task.
- Parameters
-
[in] | p_instance | Pointer to the driver instance structure. |
[in] | task | EGU task. |
- Returns
- Task address.
◆ 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_instance | Pointer to the driver instance structure. |
[in] | event_idx | Index 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_instance | Pointer to the driver instance structure. |