| nRF5 SDK v12.0.0 |

Choose documentation: | nRF5 SDK | S130 SoftDevice API | S132 SoftDevice API | S212 SoftDevice API | S332 SoftDevice API

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Enumerations | Functions
EGU (Event Generator Unit) abstraction
Peripheral drivers

nRF52 only: EGU (Event Generator Unit) module functions. More...

## 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
__STATIC_INLINE uint32_t | nrf_egu_channel_count (NRF_EGU_Type *NRF_EGUx)
| Function for getting max channel number of given EGU. More...
__STATIC_INLINE void | nrf_egu_task_trigger (NRF_EGU_Type *NRF_EGUx, nrf_egu_task_t egu_task)
| Function for triggering a specific EGU task. More...
__STATIC_INLINE uint32_t * | nrf_egu_task_address_get (NRF_EGU_Type *NRF_EGUx, nrf_egu_task_t egu_task)
| Function for returning the address of a specific EGU task register. More...
__STATIC_INLINE uint32_t * | nrf_egu_task_trigger_addres_get (NRF_EGU_Type *NRF_EGUx, uint8_t channel)
| Function for returning the address of a specific EGU TRIGGER task register. More...
__STATIC_INLINE nrf_egu_task_t | nrf_egu_task_trigger_get (NRF_EGU_Type *NRF_EGUx, uint8_t channel)
| Function for returning the specific EGU TRIGGER task. More...
__STATIC_INLINE bool | nrf_egu_event_check (NRF_EGU_Type *NRF_EGUx, nrf_egu_event_t egu_event)
| Function for returning the state of a specific EGU event. More...
__STATIC_INLINE void | nrf_egu_event_clear (NRF_EGU_Type *NRF_EGUx, nrf_egu_event_t egu_event)
| Function for clearing a specific EGU event. More...
__STATIC_INLINE uint32_t * | nrf_egu_event_address_get (NRF_EGU_Type *NRF_EGUx, nrf_egu_event_t egu_event)
| Function for returning the address of a specific EGU event register. More...
__STATIC_INLINE uint32_t * | nrf_egu_event_triggered_addres_get (NRF_EGU_Type *NRF_EGUx, uint8_t channel)
| Function for returning the address of a specific EGU TRIGGERED event register. More...
__STATIC_INLINE nrf_egu_event_t | nrf_egu_event_triggered_get (NRF_EGU_Type *NRF_EGUx, uint8_t channel)
| Function for returning the specific EGU TRIGGERED event. More...
__STATIC_INLINE void | nrf_egu_int_enable (NRF_EGU_Type *NRF_EGUx, uint32_t egu_int_mask)
| Function for enabling one or more specific EGU interrupts. More...
__STATIC_INLINE bool | nrf_egu_int_enable_check (NRF_EGU_Type *NRF_EGUx, uint32_t egu_int_mask)
| Function for retrieving the state of one or more EGU interrupts. More...
__STATIC_INLINE void | nrf_egu_int_disable (NRF_EGU_Type *NRF_EGUx, uint32_t egu_int_mask)
| Function for disabling one or more specific EGU interrupts. More...
__STATIC_INLINE nrf_egu_int_mask_t | nrf_egu_int_get (NRF_EGU_Type *NRF_EGUx, uint8_t channel)
| Function for retrieving one or more specific EGU interrupts. More...

## Detailed Description

nRF52 only: EGU (Event Generator Unit) module functions.

## Enumeration Type Documentation

enum nrf_egu_event_t

EGU events.

Enumerator
NRF_EGU_EVENT_TRIGGERED0 | Event number 0 generated by triggering the corresponding TRIGGER[0] task.
NRF_EGU_EVENT_TRIGGERED1 | Event number 1 generated by triggering the corresponding TRIGGER[1] task.
NRF_EGU_EVENT_TRIGGERED2 | Event number 2 generated by triggering the corresponding TRIGGER[2] task.
NRF_EGU_EVENT_TRIGGERED3 | Event number 3 generated by triggering the corresponding TRIGGER[3] task.
NRF_EGU_EVENT_TRIGGERED4 | Event number 4 generated by triggering the corresponding TRIGGER[4] task.
NRF_EGU_EVENT_TRIGGERED5 | Event number 5 generated by triggering the corresponding TRIGGER[5] task.
NRF_EGU_EVENT_TRIGGERED6 | Event number 6 generated by triggering the corresponding TRIGGER[6] task.
NRF_EGU_EVENT_TRIGGERED7 | Event number 7 generated by triggering the corresponding TRIGGER[7] task.
NRF_EGU_EVENT_TRIGGERED8 | Event number 8 generated by triggering the corresponding TRIGGER[8] task.
NRF_EGU_EVENT_TRIGGERED9 | Event number 9 generated by triggering the corresponding TRIGGER[9] task.
NRF_EGU_EVENT_TRIGGERED10 | Event number 10 generated by triggering the corresponding TRIGGER[10] task.
NRF_EGU_EVENT_TRIGGERED11 | Event number 11 generated by triggering the corresponding TRIGGER[11] task.
NRF_EGU_EVENT_TRIGGERED12 | Event number 12 generated by triggering the corresponding TRIGGER[12] task.
NRF_EGU_EVENT_TRIGGERED13 | Event number 13 generated by triggering the corresponding TRIGGER[13] task.
NRF_EGU_EVENT_TRIGGERED14 | Event number 14 generated by triggering the corresponding TRIGGER[14] task.
NRF_EGU_EVENT_TRIGGERED15 | Event number 15 generated by triggering the corresponding TRIGGER[15] task.

enum nrf_egu_int_mask_t

EGU interrupts.

Enumerator
NRF_EGU_INT_TRIGGERED0 | Interrupt on EVENTS_TRIGGERED[0] event.
NRF_EGU_INT_TRIGGERED1 | Interrupt on EVENTS_TRIGGERED[1] event.
NRF_EGU_INT_TRIGGERED2 | Interrupt on EVENTS_TRIGGERED[2] event.
NRF_EGU_INT_TRIGGERED3 | Interrupt on EVENTS_TRIGGERED[3] event.
NRF_EGU_INT_TRIGGERED4 | Interrupt on EVENTS_TRIGGERED[4] event.
NRF_EGU_INT_TRIGGERED5 | Interrupt on EVENTS_TRIGGERED[5] event.
NRF_EGU_INT_TRIGGERED6 | Interrupt on EVENTS_TRIGGERED[6] event.
NRF_EGU_INT_TRIGGERED7 | Interrupt on EVENTS_TRIGGERED[7] event.
NRF_EGU_INT_TRIGGERED8 | Interrupt on EVENTS_TRIGGERED[8] event.
NRF_EGU_INT_TRIGGERED9 | Interrupt on EVENTS_TRIGGERED[9] event.
NRF_EGU_INT_TRIGGERED10 | Interrupt on EVENTS_TRIGGERED[10] event.
NRF_EGU_INT_TRIGGERED11 | Interrupt on EVENTS_TRIGGERED[11] event.
NRF_EGU_INT_TRIGGERED12 | Interrupt on EVENTS_TRIGGERED[12] event.
NRF_EGU_INT_TRIGGERED13 | Interrupt on EVENTS_TRIGGERED[13] event.
NRF_EGU_INT_TRIGGERED14 | Interrupt on EVENTS_TRIGGERED[14] event.
NRF_EGU_INT_TRIGGERED15 | Interrupt on EVENTS_TRIGGERED[15] event.

enum nrf_egu_task_t

EGU tasks.

Enumerator
NRF_EGU_TASK_TRIGGER0 | Trigger 0 for triggering the corresponding TRIGGERED[0] event.
NRF_EGU_TASK_TRIGGER1 | Trigger 1 for triggering the corresponding TRIGGERED[1] event.
NRF_EGU_TASK_TRIGGER2 | Trigger 2 for triggering the corresponding TRIGGERED[2] event.
NRF_EGU_TASK_TRIGGER3 | Trigger 3 for triggering the corresponding TRIGGERED[3] event.
NRF_EGU_TASK_TRIGGER4 | Trigger 4 for triggering the corresponding TRIGGERED[4] event.
NRF_EGU_TASK_TRIGGER5 | Trigger 5 for triggering the corresponding TRIGGERED[5] event.
NRF_EGU_TASK_TRIGGER6 | Trigger 6 for triggering the corresponding TRIGGERED[6] event.
NRF_EGU_TASK_TRIGGER7 | Trigger 7 for triggering the corresponding TRIGGERED[7] event.
NRF_EGU_TASK_TRIGGER8 | Trigger 8 for triggering the corresponding TRIGGERED[8] event.
NRF_EGU_TASK_TRIGGER9 | Trigger 9 for triggering the corresponding TRIGGERED[9] event.
NRF_EGU_TASK_TRIGGER10 | Trigger 10 for triggering the corresponding TRIGGERED[10] event.
NRF_EGU_TASK_TRIGGER11 | Trigger 11 for triggering the corresponding TRIGGERED[11] event.
NRF_EGU_TASK_TRIGGER12 | Trigger 12 for triggering the corresponding TRIGGERED[12] event.
NRF_EGU_TASK_TRIGGER13 | Trigger 13 for triggering the corresponding TRIGGERED[13] event.
NRF_EGU_TASK_TRIGGER14 | Trigger 14 for triggering the corresponding TRIGGERED[14] event.
NRF_EGU_TASK_TRIGGER15 | Trigger 15 for triggering the corresponding TRIGGERED[15] event.

## Function Documentation

__STATIC_INLINE uint32_t nrf_egu_channel_count | ( | NRF_EGU_Type * | NRF_EGUx | ) |

Function for getting max channel number of given EGU.

Parameters

  NRF_EGUx | EGU instance.

Returns
  number of available channels.

__STATIC_INLINE uint32_t* nrf_egu_event_address_get | ( | NRF_EGU_Type * | NRF_EGUx,
|  | nrf_egu_event_t | egu_event
| ) |  |

Function for returning the address of a specific EGU event register.

Parameters

  NRF_EGUx | EGU instance.
  egu_event | EGU event.

__STATIC_INLINE bool nrf_egu_event_check | ( | NRF_EGU_Type * | NRF_EGUx,
|  | nrf_egu_event_t | egu_event
| ) |  |

Function for returning the state of a specific EGU event.

Parameters

  NRF_EGUx | EGU instance.
  egu_event | EGU event to check.

__STATIC_INLINE void nrf_egu_event_clear | ( | NRF_EGU_Type * | NRF_EGUx,
|  | nrf_egu_event_t | egu_event
| ) |  |

Function for clearing a specific EGU event.

Parameters

  NRF_EGUx | EGU instance.
  egu_event | EGU event to clear.

__STATIC_INLINE uint32_t* nrf_egu_event_triggered_addres_get | ( | NRF_EGU_Type * | NRF_EGUx,
|  | uint8_t | channel
| ) |  |

Function for returning the address of a specific EGU TRIGGERED event register.

Parameters

  NRF_EGUx | EGU instance.
  channel | Channel number.

__STATIC_INLINE nrf_egu_event_t nrf_egu_event_triggered_get | ( | NRF_EGU_Type * | NRF_EGUx,
|  | uint8_t | channel
| ) |  |

Function for returning the specific EGU TRIGGERED event.

Parameters

  NRF_EGUx | EGU instance.
  channel | Channel number.

__STATIC_INLINE void nrf_egu_int_disable | ( | NRF_EGU_Type * | NRF_EGUx,
|  | uint32_t | egu_int_mask
| ) |  |

Function for disabling one or more specific EGU interrupts.

Parameters

  NRF_EGUx | EGU instance.
  egu_int_mask | Interrupts to disable.

__STATIC_INLINE void nrf_egu_int_enable | ( | NRF_EGU_Type * | NRF_EGUx,
|  | uint32_t | egu_int_mask
| ) |  |

Function for enabling one or more specific EGU interrupts.

Parameters

  NRF_EGUx | EGU instance.
  egu_int_mask | Interrupts to enable.

__STATIC_INLINE bool nrf_egu_int_enable_check | ( | NRF_EGU_Type * | NRF_EGUx,
|  | uint32_t | egu_int_mask
| ) |  |

Function for retrieving the state of one or more EGU interrupts.

Parameters

  NRF_EGUx | EGU instance.
  egu_int_mask | Interrupts to check.

Return values

  true | If all of the specified interrupts are enabled.
  false | If at least one of the specified interrupts is disabled.

__STATIC_INLINE nrf_egu_int_mask_t nrf_egu_int_get | ( | NRF_EGU_Type * | NRF_EGUx,
|  | uint8_t | channel
| ) |  |

Function for retrieving one or more specific EGU interrupts.

Parameters

  NRF_EGUx | EGU instance.
  channel | Channel number.

Returns
  EGU interrupt mask.

__STATIC_INLINE uint32_t* nrf_egu_task_address_get | ( | NRF_EGU_Type * | NRF_EGUx,
|  | nrf_egu_task_t | egu_task
| ) |  |

Function for returning the address of a specific EGU task register.

Parameters

  NRF_EGUx | EGU instance.
  egu_task | EGU task.

__STATIC_INLINE void nrf_egu_task_trigger | ( | NRF_EGU_Type * | NRF_EGUx,
|  | nrf_egu_task_t | egu_task
| ) |  |

Function for triggering a specific EGU task.

Parameters

  NRF_EGUx | EGU instance.
  egu_task | EGU task.

__STATIC_INLINE uint32_t* nrf_egu_task_trigger_addres_get | ( | NRF_EGU_Type * | NRF_EGUx,
|  | uint8_t | channel
| ) |  |

Function for returning the address of a specific EGU TRIGGER task register.

Parameters

  NRF_EGUx | EGU instance.
  channel | Channel number.

__STATIC_INLINE nrf_egu_task_t nrf_egu_task_trigger_get | ( | NRF_EGU_Type * | NRF_EGUx,
|  | uint8_t | channel
| ) |  |

Function for returning the specific EGU TRIGGER task.

Parameters

  NRF_EGUx | EGU instance.
  channel | Channel number.