IPC driver
- group nrfx_ipc
Interprocessor Communication (IPC) peripheral driver.
Typedefs
-
typedef void (*nrfx_ipc_handler_t)(uint8_t event_idx, void *p_context)
IPC driver handler type.
- Param event_idx:
[in] IPC event index.
- Param p_context:
[in] Context passed to the interrupt handler, set on initialization.
Functions
-
nrfx_err_t nrfx_ipc_init(uint8_t irq_priority, nrfx_ipc_handler_t handler, void *p_context)
Function for initializing the IPC driver.
- Parameters:
irq_priority – Interrupt priority.
handler – Event handler provided by the user. Must not be NULL.
p_context – Context passed to event handler.
- Return values:
NRFX_SUCCESS – Initialization was successful.
NRFX_ERROR_ALREADY – Driver is already initialized.
-
void nrfx_ipc_config_load(nrfx_ipc_config_t const *p_config)
Function for loading configuration directly into IPC peripheral.
- Parameters:
p_config – Pointer to the structure with the initial configuration.
-
NRFX_STATIC_INLINE void nrfx_ipc_signal(uint8_t send_index)
Function for convey signal on configured channels.
Events connected to the IPC channels configured within this signal will be set and can generate interrupts when configured.
- Parameters:
send_index – Index of the SEND task to trigger.
-
NRFX_STATIC_INLINE void nrfx_ipc_gpmem_set(uint8_t mem_index, uint32_t data)
Function for storing data in the general purpose memory register.
- Parameters:
mem_index – Index of the memory cell.
data – Data to be saved.
-
NRFX_STATIC_INLINE uint32_t nrfx_ipc_gpmem_get(uint8_t mem_index)
Function for getting data from the general purpose memory register.
- Parameters:
mem_index – Index of the memory cell.
- Returns:
Saved data.
-
void nrfx_ipc_uninit(void)
Function for uninitializing the IPC module.
-
bool nrfx_ipc_init_check(void)
Function for checking if the IPC driver is initialized.
- Return values:
true – Driver is already initialized.
false – Driver is not initialized.
-
void nrfx_ipc_receive_event_enable(uint8_t event_index)
Function for enabling events to generate interrupt.
- Parameters:
event_index – Index of event to be enabled.
-
void nrfx_ipc_receive_event_disable(uint8_t event_index)
Function for disabling events from generate interrupt.
- Parameters:
event_index – Index of event to be disabled.
-
void nrfx_ipc_receive_event_group_enable(uint32_t event_bitmask)
Function for enabling set of events to generate interrupt.
- Parameters:
event_bitmask – Bitmask with events to be enabled.
-
void nrfx_ipc_receive_event_group_disable(uint32_t event_bitmask)
Function for disabling set of events from generate interrupt.
- Parameters:
event_bitmask – Bitmask with events to be disabled.
-
void nrfx_ipc_receive_event_channel_assign(uint8_t event_index, uint8_t channel_index)
Function for assigning event to the IPC channel.
- Parameters:
event_index – Index of the event to be configured.
channel_index – Index of the channel to which event will be connected.
-
void nrfx_ipc_send_task_channel_assign(uint8_t send_index, uint8_t channel_index)
Function for assigning signal to the IPC channel.
- Parameters:
send_index – Index of the signal to be configured.
channel_index – Index of the instance of channel.
-
NRFX_STATIC_INLINE void nrfx_ipc_receive_config_set(uint8_t event_index, uint32_t channel_bitmask)
Function for assigning event to the IPC channels.
- Parameters:
event_index – Index of the event to be configured.
channel_bitmask – Bitmask with channels to which event will be connected.
-
NRFX_STATIC_INLINE void nrfx_ipc_send_config_set(uint8_t send_index, uint32_t channel_bitmask)
Function for assigning signal to the IPC channels.
- Parameters:
send_index – Index of the signal to be configured.
channel_bitmask – Bitmask with channels to which signal will be connected.
-
struct nrfx_ipc_config_t
- #include <nrfx_ipc.h>
IPC configuration structure.
Public Members
-
uint32_t send_task_config[IPC_CONF_NUM]
Configuration of the connection between signals and IPC channels.
-
uint32_t receive_event_config[IPC_CONF_NUM]
Configuration of the connection between events and IPC channels.
-
uint32_t receive_events_enabled
Bitmask with events to be enabled to generate interrupt.
-
uint32_t send_task_config[IPC_CONF_NUM]
-
typedef void (*nrfx_ipc_handler_t)(uint8_t event_idx, void *p_context)