Lines Matching refs:channel

53 	uint32_t channel = event_idx;  in mbox_dispatcher()  local
55 if (!is_rx_channel_valid(dev, channel)) { in mbox_dispatcher()
59 if (!(data->enabled_mask & BIT(channel))) { in mbox_dispatcher()
63 if (data->cb[channel] != NULL) { in mbox_dispatcher()
64 data->cb[channel](dev, channel, data->user_data[channel], NULL); in mbox_dispatcher()
68 static int mbox_nrf_send(const struct device *dev, uint32_t channel, in mbox_nrf_send() argument
75 if (!is_tx_channel_valid(dev, channel)) { in mbox_nrf_send()
79 nrfx_ipc_signal(channel); in mbox_nrf_send()
84 static int mbox_nrf_register_callback(const struct device *dev, uint32_t channel, in mbox_nrf_register_callback() argument
89 if (channel >= IPC_CONF_NUM) { in mbox_nrf_register_callback()
93 data->cb[channel] = cb; in mbox_nrf_register_callback()
94 data->user_data[channel] = user_data; in mbox_nrf_register_callback()
110 static int mbox_nrf_set_enabled(const struct device *dev, uint32_t channel, bool enable) in mbox_nrf_set_enabled() argument
114 if (!is_rx_channel_valid(dev, channel)) { in mbox_nrf_set_enabled()
118 if ((enable == 0 && (!(data->enabled_mask & BIT(channel)))) || in mbox_nrf_set_enabled()
119 (enable != 0 && (data->enabled_mask & BIT(channel)))) { in mbox_nrf_set_enabled()
123 if (enable && (data->cb[channel] == NULL)) { in mbox_nrf_set_enabled()
132 data->enabled_mask |= BIT(channel); in mbox_nrf_set_enabled()
134 nrfx_ipc_receive_event_enable(channel); in mbox_nrf_set_enabled()
136 nrfx_ipc_receive_event_disable(channel); in mbox_nrf_set_enabled()
138 data->enabled_mask &= ~BIT(channel); in mbox_nrf_set_enabled()