Hardware access layer for managing the Event Generator Unit (EGU) peripheral. More...
Macros | |
#define | NRF_EGU_INST_GET(idx) NRFX_CONCAT(NRF_, EGU, idx) |
Macro getting pointer to the structure of registers of the EGU peripheral. | |
Enumerations | |
enum | nrf_egu_task_t { NRF_EGU_TASK_TRIGGER0 = offsetof(NRF_EGU_Type, TASKS_TRIGGER[0]) , NRF_EGU_TASK_TRIGGER1 = offsetof(NRF_EGU_Type, TASKS_TRIGGER[1]) , NRF_EGU_TASK_TRIGGER2 = offsetof(NRF_EGU_Type, TASKS_TRIGGER[2]) , NRF_EGU_TASK_TRIGGER3 = offsetof(NRF_EGU_Type, TASKS_TRIGGER[3]) , NRF_EGU_TASK_TRIGGER4 = offsetof(NRF_EGU_Type, TASKS_TRIGGER[4]) , NRF_EGU_TASK_TRIGGER5 = offsetof(NRF_EGU_Type, TASKS_TRIGGER[5]) , NRF_EGU_TASK_TRIGGER6 = offsetof(NRF_EGU_Type, TASKS_TRIGGER[6]) , NRF_EGU_TASK_TRIGGER7 = offsetof(NRF_EGU_Type, TASKS_TRIGGER[7]) , NRF_EGU_TASK_TRIGGER8 = offsetof(NRF_EGU_Type, TASKS_TRIGGER[8]) , NRF_EGU_TASK_TRIGGER9 = offsetof(NRF_EGU_Type, TASKS_TRIGGER[9]) , NRF_EGU_TASK_TRIGGER10 = offsetof(NRF_EGU_Type, TASKS_TRIGGER[10]) , NRF_EGU_TASK_TRIGGER11 = offsetof(NRF_EGU_Type, TASKS_TRIGGER[11]) , NRF_EGU_TASK_TRIGGER12 = offsetof(NRF_EGU_Type, TASKS_TRIGGER[12]) , NRF_EGU_TASK_TRIGGER13 = offsetof(NRF_EGU_Type, TASKS_TRIGGER[13]) , NRF_EGU_TASK_TRIGGER14 = offsetof(NRF_EGU_Type, TASKS_TRIGGER[14]) , NRF_EGU_TASK_TRIGGER15 = offsetof(NRF_EGU_Type, TASKS_TRIGGER[15]) } |
EGU tasks. More... | |
enum | nrf_egu_event_t { NRF_EGU_EVENT_TRIGGERED0 = offsetof(NRF_EGU_Type, EVENTS_TRIGGERED[0]) , NRF_EGU_EVENT_TRIGGERED1 = offsetof(NRF_EGU_Type, EVENTS_TRIGGERED[1]) , NRF_EGU_EVENT_TRIGGERED2 = offsetof(NRF_EGU_Type, EVENTS_TRIGGERED[2]) , NRF_EGU_EVENT_TRIGGERED3 = offsetof(NRF_EGU_Type, EVENTS_TRIGGERED[3]) , NRF_EGU_EVENT_TRIGGERED4 = offsetof(NRF_EGU_Type, EVENTS_TRIGGERED[4]) , NRF_EGU_EVENT_TRIGGERED5 = offsetof(NRF_EGU_Type, EVENTS_TRIGGERED[5]) , NRF_EGU_EVENT_TRIGGERED6 = offsetof(NRF_EGU_Type, EVENTS_TRIGGERED[6]) , NRF_EGU_EVENT_TRIGGERED7 = offsetof(NRF_EGU_Type, EVENTS_TRIGGERED[7]) , NRF_EGU_EVENT_TRIGGERED8 = offsetof(NRF_EGU_Type, EVENTS_TRIGGERED[8]) , NRF_EGU_EVENT_TRIGGERED9 = offsetof(NRF_EGU_Type, EVENTS_TRIGGERED[9]) , NRF_EGU_EVENT_TRIGGERED10 = offsetof(NRF_EGU_Type, EVENTS_TRIGGERED[10]) , NRF_EGU_EVENT_TRIGGERED11 = offsetof(NRF_EGU_Type, EVENTS_TRIGGERED[11]) , NRF_EGU_EVENT_TRIGGERED12 = offsetof(NRF_EGU_Type, EVENTS_TRIGGERED[12]) , NRF_EGU_EVENT_TRIGGERED13 = offsetof(NRF_EGU_Type, EVENTS_TRIGGERED[13]) , NRF_EGU_EVENT_TRIGGERED14 = offsetof(NRF_EGU_Type, EVENTS_TRIGGERED[14]) , NRF_EGU_EVENT_TRIGGERED15 = offsetof(NRF_EGU_Type, EVENTS_TRIGGERED[15]) } |
EGU events. More... | |
enum | nrf_egu_int_mask_t { NRF_EGU_INT_TRIGGERED0 = EGU_INTENSET_TRIGGERED0_Msk , NRF_EGU_INT_TRIGGERED1 = EGU_INTENSET_TRIGGERED1_Msk , NRF_EGU_INT_TRIGGERED2 = EGU_INTENSET_TRIGGERED2_Msk , NRF_EGU_INT_TRIGGERED3 = EGU_INTENSET_TRIGGERED3_Msk , NRF_EGU_INT_TRIGGERED4 = EGU_INTENSET_TRIGGERED4_Msk , NRF_EGU_INT_TRIGGERED5 = EGU_INTENSET_TRIGGERED5_Msk , NRF_EGU_INT_TRIGGERED6 = EGU_INTENSET_TRIGGERED6_Msk , NRF_EGU_INT_TRIGGERED7 = EGU_INTENSET_TRIGGERED7_Msk , NRF_EGU_INT_TRIGGERED8 = EGU_INTENSET_TRIGGERED8_Msk , NRF_EGU_INT_TRIGGERED9 = EGU_INTENSET_TRIGGERED9_Msk , NRF_EGU_INT_TRIGGERED10 = EGU_INTENSET_TRIGGERED10_Msk , NRF_EGU_INT_TRIGGERED11 = EGU_INTENSET_TRIGGERED11_Msk , NRF_EGU_INT_TRIGGERED12 = EGU_INTENSET_TRIGGERED12_Msk , NRF_EGU_INT_TRIGGERED13 = EGU_INTENSET_TRIGGERED13_Msk , NRF_EGU_INT_TRIGGERED14 = EGU_INTENSET_TRIGGERED14_Msk , NRF_EGU_INT_TRIGGERED15 = EGU_INTENSET_TRIGGERED15_Msk , NRF_EGU_INT_ALL = 0xFFFFuL } |
EGU interrupts. More... | |
Functions | |
NRF_STATIC_INLINE uint32_t | nrf_egu_channel_count (NRF_EGU_Type const *p_reg) |
Function for getting the maximum channel number of the given EGU. | |
NRF_STATIC_INLINE void | nrf_egu_task_trigger (NRF_EGU_Type *p_reg, nrf_egu_task_t egu_task) |
Function for triggering the specified EGU task. | |
NRF_STATIC_INLINE uint32_t | nrf_egu_task_address_get (NRF_EGU_Type const *p_reg, nrf_egu_task_t egu_task) |
Function for returning the address of the specified EGU task register. | |
NRF_STATIC_INLINE nrf_egu_task_t | nrf_egu_trigger_task_get (uint8_t channel) |
Function for returning the specified EGU TRIGGER task. | |
NRF_STATIC_INLINE bool | nrf_egu_event_check (NRF_EGU_Type const *p_reg, nrf_egu_event_t egu_event) |
Function for retrieving the state of the EGU event. | |
NRF_STATIC_INLINE void | nrf_egu_event_clear (NRF_EGU_Type *p_reg, nrf_egu_event_t egu_event) |
Function for clearing the specified EGU event. | |
NRF_STATIC_INLINE uint32_t | nrf_egu_event_address_get (NRF_EGU_Type const *p_reg, nrf_egu_event_t egu_event) |
Function for returning the address of the specified EGU event register. | |
NRF_STATIC_INLINE nrf_egu_event_t | nrf_egu_triggered_event_get (uint8_t channel) |
Function for returning the specified EGU TRIGGERED event. | |
NRF_STATIC_INLINE void | nrf_egu_int_enable (NRF_EGU_Type *p_reg, uint32_t mask) |
Function for enabling one or more of the EGU interrupts. | |
NRF_STATIC_INLINE uint32_t | nrf_egu_int_enable_check (NRF_EGU_Type const *p_reg, uint32_t mask) |
Function for retrieving the state of one or more of the EGU interrupts. | |
NRF_STATIC_INLINE void | nrf_egu_int_disable (NRF_EGU_Type *p_reg, uint32_t mask) |
Function for disabling one or more of the EGU interrupts. | |
NRF_STATIC_INLINE nrf_egu_int_mask_t | nrf_egu_channel_int_get (uint8_t channel) |
Function for retrieving the state of interrupt of the specified EGU channel. | |
NRF_STATIC_INLINE void | nrf_egu_subscribe_set (NRF_EGU_Type *p_reg, nrf_egu_task_t task, uint8_t channel) |
Function for setting the subscribe configuration for a given EGU task. | |
NRF_STATIC_INLINE void | nrf_egu_subscribe_clear (NRF_EGU_Type *p_reg, nrf_egu_task_t task) |
Function for clearing the subscribe configuration for a given EGU task. | |
NRF_STATIC_INLINE void | nrf_egu_publish_set (NRF_EGU_Type *p_reg, nrf_egu_event_t event, uint8_t channel) |
Function for setting the publish configuration for a given EGU event. | |
NRF_STATIC_INLINE void | nrf_egu_publish_clear (NRF_EGU_Type *p_reg, nrf_egu_event_t event) |
Function for clearing the publish configuration for a given EGU event. | |
Hardware access layer for managing the Event Generator Unit (EGU) peripheral.
#define NRF_EGU_INST_GET | ( | idx | ) | NRFX_CONCAT(NRF_, EGU, idx) |
Macro getting pointer to the structure of registers of the EGU peripheral.
[in] | idx | EGU instance index. |
enum nrf_egu_event_t |
EGU events.
enum nrf_egu_int_mask_t |
EGU interrupts.
enum nrf_egu_task_t |
EGU tasks.
NRF_STATIC_INLINE uint32_t nrf_egu_channel_count | ( | NRF_EGU_Type const * | p_reg | ) |
Function for getting the maximum channel number of the given EGU.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE nrf_egu_int_mask_t nrf_egu_channel_int_get | ( | uint8_t | channel | ) |
Function for retrieving the state of interrupt of the specified EGU channel.
[in] | channel | Channel number. |
NRF_STATIC_INLINE uint32_t nrf_egu_event_address_get | ( | NRF_EGU_Type const * | p_reg, |
nrf_egu_event_t | egu_event | ||
) |
Function for returning the address of the specified EGU event register.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | egu_event | EGU event. |
NRF_STATIC_INLINE bool nrf_egu_event_check | ( | NRF_EGU_Type const * | p_reg, |
nrf_egu_event_t | egu_event | ||
) |
Function for retrieving the state of the EGU event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | egu_event | EGU event to be checked. |
true | The event has been generated. |
false | The event has not been generated. |
NRF_STATIC_INLINE void nrf_egu_event_clear | ( | NRF_EGU_Type * | p_reg, |
nrf_egu_event_t | egu_event | ||
) |
Function for clearing the specified EGU event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | egu_event | EGU event to clear. |
NRF_STATIC_INLINE void nrf_egu_int_disable | ( | NRF_EGU_Type * | p_reg, |
uint32_t | mask | ||
) |
Function for disabling one or more of the EGU interrupts.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | mask | Mask of interrupts to be disabled. Use nrf_egu_int_mask_t values for bit masking. |
NRF_STATIC_INLINE void nrf_egu_int_enable | ( | NRF_EGU_Type * | p_reg, |
uint32_t | mask | ||
) |
Function for enabling one or more of the EGU interrupts.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | mask | Mask of interrupts to be enabled. Use nrf_egu_int_mask_t values for bit masking. |
NRF_STATIC_INLINE uint32_t nrf_egu_int_enable_check | ( | NRF_EGU_Type const * | p_reg, |
uint32_t | mask | ||
) |
Function for retrieving the state of one or more of the EGU interrupts.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | mask | Mask of interrupts to be checked. Use nrf_egu_int_mask_t values for bit masking. |
NRF_STATIC_INLINE void nrf_egu_publish_clear | ( | NRF_EGU_Type * | p_reg, |
nrf_egu_event_t | event | ||
) |
Function for clearing the publish configuration for a given EGU event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | event | Event for which to clear the configuration. |
NRF_STATIC_INLINE void nrf_egu_publish_set | ( | NRF_EGU_Type * | p_reg, |
nrf_egu_event_t | event, | ||
uint8_t | channel | ||
) |
Function for setting the publish configuration for a given EGU event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | event | Event for which to set the configuration. |
[in] | channel | Channel through which to publish the event. |
NRF_STATIC_INLINE void nrf_egu_subscribe_clear | ( | NRF_EGU_Type * | p_reg, |
nrf_egu_task_t | task | ||
) |
Function for clearing the subscribe configuration for a given EGU task.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | task | Task for which to clear the configuration. |
NRF_STATIC_INLINE void nrf_egu_subscribe_set | ( | NRF_EGU_Type * | p_reg, |
nrf_egu_task_t | task, | ||
uint8_t | channel | ||
) |
Function for setting the subscribe configuration for a given EGU task.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | task | Task for which to set the configuration. |
[in] | channel | Channel through which to subscribe events. |
NRF_STATIC_INLINE uint32_t nrf_egu_task_address_get | ( | NRF_EGU_Type const * | p_reg, |
nrf_egu_task_t | egu_task | ||
) |
Function for returning the address of the specified EGU task register.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | egu_task | EGU task. |
NRF_STATIC_INLINE void nrf_egu_task_trigger | ( | NRF_EGU_Type * | p_reg, |
nrf_egu_task_t | egu_task | ||
) |
Function for triggering the specified EGU task.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | egu_task | EGU task. |
NRF_STATIC_INLINE nrf_egu_task_t nrf_egu_trigger_task_get | ( | uint8_t | channel | ) |
Function for returning the specified EGU TRIGGER task.
[in] | channel | Channel number. |
NRF_STATIC_INLINE nrf_egu_event_t nrf_egu_triggered_event_get | ( | uint8_t | channel | ) |
Function for returning the specified EGU TRIGGERED event.
[in] | channel | Channel number. |