Hardware access layer for managing the Interprocessor Communication (IPC) peripheral. More...
Enumerations | |
enum | nrf_ipc_task_t { NRF_IPC_TASK_SEND_0 = offsetof(NRF_IPC_Type, TASKS_SEND[0]), NRF_IPC_TASK_SEND_1 = offsetof(NRF_IPC_Type, TASKS_SEND[1]), NRF_IPC_TASK_SEND_2 = offsetof(NRF_IPC_Type, TASKS_SEND[2]), NRF_IPC_TASK_SEND_3 = offsetof(NRF_IPC_Type, TASKS_SEND[3]), NRF_IPC_TASK_SEND_4 = offsetof(NRF_IPC_Type, TASKS_SEND[4]), NRF_IPC_TASK_SEND_5 = offsetof(NRF_IPC_Type, TASKS_SEND[5]), NRF_IPC_TASK_SEND_6 = offsetof(NRF_IPC_Type, TASKS_SEND[6]), NRF_IPC_TASK_SEND_7 = offsetof(NRF_IPC_Type, TASKS_SEND[7]), NRF_IPC_TASK_SEND_8 = offsetof(NRF_IPC_Type, TASKS_SEND[8]), NRF_IPC_TASK_SEND_9 = offsetof(NRF_IPC_Type, TASKS_SEND[9]), NRF_IPC_TASK_SEND_10 = offsetof(NRF_IPC_Type, TASKS_SEND[10]), NRF_IPC_TASK_SEND_11 = offsetof(NRF_IPC_Type, TASKS_SEND[11]), NRF_IPC_TASK_SEND_12 = offsetof(NRF_IPC_Type, TASKS_SEND[12]), NRF_IPC_TASK_SEND_13 = offsetof(NRF_IPC_Type, TASKS_SEND[13]), NRF_IPC_TASK_SEND_14 = offsetof(NRF_IPC_Type, TASKS_SEND[14]), NRF_IPC_TASK_SEND_15 = offsetof(NRF_IPC_Type, TASKS_SEND[15]) } |
IPC tasks. More... | |
enum | nrf_ipc_event_t { NRF_IPC_EVENT_RECEIVE_0 = offsetof(NRF_IPC_Type, EVENTS_RECEIVE[0]), NRF_IPC_EVENT_RECEIVE_1 = offsetof(NRF_IPC_Type, EVENTS_RECEIVE[1]), NRF_IPC_EVENT_RECEIVE_2 = offsetof(NRF_IPC_Type, EVENTS_RECEIVE[2]), NRF_IPC_EVENT_RECEIVE_3 = offsetof(NRF_IPC_Type, EVENTS_RECEIVE[3]), NRF_IPC_EVENT_RECEIVE_4 = offsetof(NRF_IPC_Type, EVENTS_RECEIVE[4]), NRF_IPC_EVENT_RECEIVE_5 = offsetof(NRF_IPC_Type, EVENTS_RECEIVE[5]), NRF_IPC_EVENT_RECEIVE_6 = offsetof(NRF_IPC_Type, EVENTS_RECEIVE[6]), NRF_IPC_EVENT_RECEIVE_7 = offsetof(NRF_IPC_Type, EVENTS_RECEIVE[7]), NRF_IPC_EVENT_RECEIVE_8 = offsetof(NRF_IPC_Type, EVENTS_RECEIVE[8]), NRF_IPC_EVENT_RECEIVE_9 = offsetof(NRF_IPC_Type, EVENTS_RECEIVE[9]), NRF_IPC_EVENT_RECEIVE_10 = offsetof(NRF_IPC_Type, EVENTS_RECEIVE[10]), NRF_IPC_EVENT_RECEIVE_11 = offsetof(NRF_IPC_Type, EVENTS_RECEIVE[11]), NRF_IPC_EVENT_RECEIVE_12 = offsetof(NRF_IPC_Type, EVENTS_RECEIVE[12]), NRF_IPC_EVENT_RECEIVE_13 = offsetof(NRF_IPC_Type, EVENTS_RECEIVE[13]), NRF_IPC_EVENT_RECEIVE_14 = offsetof(NRF_IPC_Type, EVENTS_RECEIVE[14]), NRF_IPC_EVENT_RECEIVE_15 = offsetof(NRF_IPC_Type, EVENTS_RECEIVE[15]) } |
IPC events. More... | |
enum | nrf_ipc_channel_t { NRF_IPC_CHANNEL_0 = IPC_RECEIVE_CNF_CHEN0_Msk, NRF_IPC_CHANNEL_1 = IPC_RECEIVE_CNF_CHEN1_Msk, NRF_IPC_CHANNEL_2 = IPC_RECEIVE_CNF_CHEN2_Msk, NRF_IPC_CHANNEL_3 = IPC_RECEIVE_CNF_CHEN3_Msk, NRF_IPC_CHANNEL_4 = IPC_RECEIVE_CNF_CHEN4_Msk, NRF_IPC_CHANNEL_5 = IPC_RECEIVE_CNF_CHEN5_Msk, NRF_IPC_CHANNEL_6 = IPC_RECEIVE_CNF_CHEN6_Msk, NRF_IPC_CHANNEL_7 = IPC_RECEIVE_CNF_CHEN7_Msk, NRF_IPC_CHANNEL_8 = IPC_RECEIVE_CNF_CHEN8_Msk, NRF_IPC_CHANNEL_9 = IPC_RECEIVE_CNF_CHEN9_Msk, NRF_IPC_CHANNEL_10 = IPC_RECEIVE_CNF_CHEN10_Msk, NRF_IPC_CHANNEL_11 = IPC_RECEIVE_CNF_CHEN11_Msk, NRF_IPC_CHANNEL_12 = IPC_RECEIVE_CNF_CHEN12_Msk, NRF_IPC_CHANNEL_13 = IPC_RECEIVE_CNF_CHEN13_Msk, NRF_IPC_CHANNEL_14 = IPC_RECEIVE_CNF_CHEN14_Msk, NRF_IPC_CHANNEL_15 = IPC_RECEIVE_CNF_CHEN15_Msk } |
IPC channel positions. More... | |
enum | nrf_ipc_int_mask_t { NRF_IPC_INT_RECEIVE_0 = IPC_INTEN_RECEIVE0_Msk, NRF_IPC_INT_RECEIVE_1 = IPC_INTEN_RECEIVE1_Msk, NRF_IPC_INT_RECEIVE_2 = IPC_INTEN_RECEIVE2_Msk, NRF_IPC_INT_RECEIVE_3 = IPC_INTEN_RECEIVE3_Msk, NRF_IPC_INT_RECEIVE_4 = IPC_INTEN_RECEIVE4_Msk, NRF_IPC_INT_RECEIVE_5 = IPC_INTEN_RECEIVE5_Msk, NRF_IPC_INT_RECEIVE_6 = IPC_INTEN_RECEIVE6_Msk, NRF_IPC_INT_RECEIVE_7 = IPC_INTEN_RECEIVE7_Msk, NRF_IPC_INT_RECEIVE_8 = IPC_INTEN_RECEIVE8_Msk, NRF_IPC_INT_RECEIVE_9 = IPC_INTEN_RECEIVE9_Msk, NRF_IPC_INT_RECEIVE_10 = IPC_INTEN_RECEIVE10_Msk, NRF_IPC_INT_RECEIVE_11 = IPC_INTEN_RECEIVE11_Msk, NRF_IPC_INT_RECEIVE_12 = IPC_INTEN_RECEIVE12_Msk, NRF_IPC_INT_RECEIVE_13 = IPC_INTEN_RECEIVE13_Msk, NRF_IPC_INT_RECEIVE_14 = IPC_INTEN_RECEIVE14_Msk, NRF_IPC_INT_RECEIVE_15 = IPC_INTEN_RECEIVE15_Msk } |
IPC interrupts. More... | |
Functions | |
NRF_STATIC_INLINE void | nrf_ipc_task_trigger (NRF_IPC_Type *p_reg, nrf_ipc_task_t task) |
Function for triggering the specified IPC task. More... | |
NRF_STATIC_INLINE uint32_t | nrf_ipc_task_address_get (NRF_IPC_Type const *p_reg, nrf_ipc_task_t task) |
Function for getting the address of the specified IPC task register. More... | |
NRF_STATIC_INLINE void | nrf_ipc_event_clear (NRF_IPC_Type *p_reg, nrf_ipc_event_t event) |
Function for clearing the specified IPC event. More... | |
NRF_STATIC_INLINE bool | nrf_ipc_event_check (NRF_IPC_Type const *p_reg, nrf_ipc_event_t event) |
Function for retrieving the state of the IPC event. More... | |
NRF_STATIC_INLINE uint32_t | nrf_ipc_event_address_get (NRF_IPC_Type const *p_reg, nrf_ipc_event_t event) |
Function for getting the address of the specified IPC event register. More... | |
NRF_STATIC_INLINE void | nrf_ipc_int_enable (NRF_IPC_Type *p_reg, uint32_t mask) |
Function for enabling specified interrupts. More... | |
NRF_STATIC_INLINE void | nrf_ipc_int_disable (NRF_IPC_Type *p_reg, uint32_t mask) |
Function for disabling specified interrupts. More... | |
NRF_STATIC_INLINE uint32_t | nrf_ipc_int_enable_check (NRF_IPC_Type const *p_reg, uint32_t mask) |
Function for checking if the specified interrupts are enabled. More... | |
NRF_STATIC_INLINE uint32_t | nrf_ipc_int_pending_get (NRF_IPC_Type const *p_reg) |
Function for retrieving the state of pending interrupts of the receive event. More... | |
NRF_STATIC_INLINE void | nrf_ipc_subscribe_set (NRF_IPC_Type *p_reg, nrf_ipc_task_t task, uint8_t channel) |
Function for setting the DPPI subscribe configuration for a given IPC task. More... | |
NRF_STATIC_INLINE void | nrf_ipc_subscribe_clear (NRF_IPC_Type *p_reg, nrf_ipc_task_t task) |
Function for clearing the DPPI subscribe configuration for a given IPC task. More... | |
NRF_STATIC_INLINE void | nrf_ipc_publish_set (NRF_IPC_Type *p_reg, nrf_ipc_event_t event, uint8_t channel) |
Function for setting the DPPI publish configuration for a given IPC event. More... | |
NRF_STATIC_INLINE void | nrf_ipc_publish_clear (NRF_IPC_Type *p_reg, nrf_ipc_event_t event) |
Function for clearing the DPPI publish configuration for a given IPC event. More... | |
NRF_STATIC_INLINE void | nrf_ipc_send_config_set (NRF_IPC_Type *p_reg, uint8_t index, uint32_t channels_mask) |
Function for setting the configuration of the specified send task. More... | |
NRF_STATIC_INLINE uint32_t | nrf_ipc_send_config_get (NRF_IPC_Type *const p_reg, uint8_t index) |
Function for getting the configuration of the specified send task. More... | |
NRF_STATIC_INLINE void | nrf_ipc_receive_config_set (NRF_IPC_Type *p_reg, uint8_t index, uint32_t channels_mask) |
Function for assigning receive event to the IPC channels. More... | |
NRF_STATIC_INLINE uint32_t | nrf_ipc_receive_config_get (NRF_IPC_Type *const p_reg, uint8_t index) |
Function for getting receive event configuration. More... | |
NRF_STATIC_INLINE void | nrf_ipc_gpmem_set (NRF_IPC_Type *p_reg, uint8_t index, uint32_t data) |
Function for storing data in general purpose memory cell. More... | |
NRF_STATIC_INLINE uint32_t | nrf_ipc_gpmem_get (NRF_IPC_Type const *p_reg, uint8_t index) |
Function for getting value of the general purpose memory cell. More... | |
NRF_STATIC_INLINE nrf_ipc_task_t | nrf_ipc_send_task_get (uint8_t index) |
Function for getting SEND task by its index. More... | |
NRF_STATIC_INLINE nrf_ipc_event_t | nrf_ipc_receive_event_get (uint8_t index) |
Function for getting RECEIVE event by its index. More... | |
Hardware access layer for managing the Interprocessor Communication (IPC) peripheral.
enum nrf_ipc_channel_t |
IPC channel positions.
enum nrf_ipc_event_t |
IPC events.
enum nrf_ipc_int_mask_t |
IPC interrupts.
enum nrf_ipc_task_t |
IPC tasks.
NRF_STATIC_INLINE uint32_t nrf_ipc_event_address_get | ( | NRF_IPC_Type const * | p_reg, |
nrf_ipc_event_t | event | ||
) |
Function for getting the address of the specified IPC event register.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | event | Specified event. |
NRF_STATIC_INLINE bool nrf_ipc_event_check | ( | NRF_IPC_Type const * | p_reg, |
nrf_ipc_event_t | event | ||
) |
Function for retrieving the state of the IPC event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | event | Event to be checked. |
true | The event has been generated. |
false | The event has not been generated. |
NRF_STATIC_INLINE void nrf_ipc_event_clear | ( | NRF_IPC_Type * | p_reg, |
nrf_ipc_event_t | event | ||
) |
Function for clearing the specified IPC event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | event | Event to clear. |
NRF_STATIC_INLINE uint32_t nrf_ipc_gpmem_get | ( | NRF_IPC_Type const * | p_reg, |
uint8_t | index | ||
) |
Function for getting value of the general purpose memory cell.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | index | Index of the general purpose memory cell. |
NRF_STATIC_INLINE void nrf_ipc_gpmem_set | ( | NRF_IPC_Type * | p_reg, |
uint8_t | index, | ||
uint32_t | data | ||
) |
Function for storing data in general purpose memory cell.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | index | Index of the general purpose memory cell. |
[in] | data | Data to be stored. |
NRF_STATIC_INLINE void nrf_ipc_int_disable | ( | NRF_IPC_Type * | p_reg, |
uint32_t | mask | ||
) |
Function for disabling specified interrupts.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | mask | Mask of interrupts to be disabled. |
NRF_STATIC_INLINE void nrf_ipc_int_enable | ( | NRF_IPC_Type * | p_reg, |
uint32_t | mask | ||
) |
Function for enabling specified interrupts.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | mask | Mask of interrupts to be enabled. |
NRF_STATIC_INLINE uint32_t nrf_ipc_int_enable_check | ( | NRF_IPC_Type const * | p_reg, |
uint32_t | mask | ||
) |
Function for checking if the specified interrupts are enabled.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | mask | Mask of interrupts to be checked. |
NRF_STATIC_INLINE uint32_t nrf_ipc_int_pending_get | ( | NRF_IPC_Type const * | p_reg | ) |
Function for retrieving the state of pending interrupts of the receive event.
States of pending interrupt are saved as a bitmask. First position corresponds with EVENTS_RECEIVE[0] event, second one with EVENTS_RECEIVE[1] etc. One set at particular position means that interrupt for event is pending.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_ipc_publish_clear | ( | NRF_IPC_Type * | p_reg, |
nrf_ipc_event_t | event | ||
) |
Function for clearing the DPPI publish configuration for a given IPC 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_ipc_publish_set | ( | NRF_IPC_Type * | p_reg, |
nrf_ipc_event_t | event, | ||
uint8_t | channel | ||
) |
Function for setting the DPPI publish configuration for a given IPC event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | event | Event for which to set the configuration. |
[in] | channel | DPPI channel through which to publish the event. |
NRF_STATIC_INLINE uint32_t nrf_ipc_receive_config_get | ( | NRF_IPC_Type *const | p_reg, |
uint8_t | index | ||
) |
Function for getting receive event configuration.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | index | Index of the receive event configuration. |
NRF_STATIC_INLINE void nrf_ipc_receive_config_set | ( | NRF_IPC_Type * | p_reg, |
uint8_t | index, | ||
uint32_t | channels_mask | ||
) |
Function for assigning receive event to the IPC channels.
channels_mask
bitmask must be created with nrf_ipc_channel_t values: NRF_IPC_CHANNEL_0 | NRF_IPC_CHANNEL_1 | ... | NRF_IPC_CHANNEL_n
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | index | Index of the receive event configuration. |
[in] | channels_mask | Bitmask with IPC channels from which the receive event will generate interrupts. |
NRF_STATIC_INLINE nrf_ipc_event_t nrf_ipc_receive_event_get | ( | uint8_t | index | ) |
Function for getting RECEIVE event by its index.
[in] | index | Index of the RECEIVE event. |
NRF_STATIC_INLINE uint32_t nrf_ipc_send_config_get | ( | NRF_IPC_Type *const | p_reg, |
uint8_t | index | ||
) |
Function for getting the configuration of the specified send task.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | index | Index of the send event configuration. |
Bitmask | of channels enabled for this task. |
NRF_STATIC_INLINE void nrf_ipc_send_config_set | ( | NRF_IPC_Type * | p_reg, |
uint8_t | index, | ||
uint32_t | channels_mask | ||
) |
Function for setting the configuration of the specified send task.
channels_mask
bitmask must be created with nrf_ipc_channel_t values: NRF_IPC_CHANNEL_0 | NRF_IPC_CHANNEL_1 | ... | NRF_IPC_CHANNEL_n
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | index | Index of the send task. |
[in] | channels_mask | Bitmask specifying channels that are to be enabled for this task. |
NRF_STATIC_INLINE nrf_ipc_task_t nrf_ipc_send_task_get | ( | uint8_t | index | ) |
Function for getting SEND task by its index.
[in] | index | Index of the SEND task. |
NRF_STATIC_INLINE void nrf_ipc_subscribe_clear | ( | NRF_IPC_Type * | p_reg, |
nrf_ipc_task_t | task | ||
) |
Function for clearing the DPPI subscribe configuration for a given IPC 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_ipc_subscribe_set | ( | NRF_IPC_Type * | p_reg, |
nrf_ipc_task_t | task, | ||
uint8_t | channel | ||
) |
Function for setting the DPPI subscribe configuration for a given IPC task.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | task | Task for which to set the configuration. |
[in] | channel | DPPI channel through which to subscribe events. |
NRF_STATIC_INLINE uint32_t nrf_ipc_task_address_get | ( | NRF_IPC_Type const * | p_reg, |
nrf_ipc_task_t | task | ||
) |
Function for getting the address of the specified IPC task register.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | task | Specified task. |
NRF_STATIC_INLINE void nrf_ipc_task_trigger | ( | NRF_IPC_Type * | p_reg, |
nrf_ipc_task_t | task | ||
) |
Function for triggering the specified IPC task.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | task | Task to be triggered. |