drivers: mbox: nrfx: align implementation to nrfx 2.10 API
New API version changes the signature of user callback in the nrfx_ipc driver. Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
This commit is contained in:
parent
54941e055c
commit
56cab3b268
|
@ -45,27 +45,23 @@ static inline bool is_tx_channel_valid(const struct device *dev, uint32_t ch)
|
|||
return ((ch < IPC_CONF_NUM) && (conf->tx_mask & BIT(ch)));
|
||||
}
|
||||
|
||||
static void mbox_dispatcher(uint32_t event_mask, void *p_context)
|
||||
static void mbox_dispatcher(uint8_t event_idx, void *p_context)
|
||||
{
|
||||
struct mbox_nrf_data *data = (struct mbox_nrf_data *) p_context;
|
||||
const struct device *dev = data->dev;
|
||||
|
||||
while (event_mask) {
|
||||
uint32_t channel = __CLZ(__RBIT(event_mask));
|
||||
uint32_t channel = event_idx;
|
||||
|
||||
if (!is_rx_channel_valid(dev, channel)) {
|
||||
LOG_WRN("RX event on illegal channel");
|
||||
}
|
||||
if (!is_rx_channel_valid(dev, channel)) {
|
||||
LOG_WRN("RX event on illegal channel");
|
||||
}
|
||||
|
||||
if (!(data->enabled_mask & BIT(channel))) {
|
||||
LOG_WRN("RX event on disabled channel");
|
||||
}
|
||||
if (!(data->enabled_mask & BIT(channel))) {
|
||||
LOG_WRN("RX event on disabled channel");
|
||||
}
|
||||
|
||||
event_mask &= ~BIT(channel);
|
||||
|
||||
if (data->cb[channel] != NULL) {
|
||||
data->cb[channel](dev, channel, data->user_data[channel], NULL);
|
||||
}
|
||||
if (data->cb[channel] != NULL) {
|
||||
data->cb[channel](dev, channel, data->user_data[channel], NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue