Lines Matching refs:mailbox_idx
22 static void mcp251xfd_canframe_to_txobj(const struct can_frame *src, int mailbox_idx, in mcp251xfd_canframe_to_txobj() argument
46 dst->flags |= FIELD_PREP(MCP251XFD_OBJ_FLAGS_SEQ_MASK, mailbox_idx); in mcp251xfd_canframe_to_txobj()
159 static int mcp251xfd_fifo_write(const struct device *dev, int mailbox_idx, in mcp251xfd_fifo_write() argument
184 mcp251xfd_canframe_to_txobj(msg, mailbox_idx, txobj); in mcp251xfd_fifo_write()
487 uint8_t mailbox_idx; in mcp251xfd_send() local
518 for (mailbox_idx = 0; mailbox_idx < MCP251XFD_TX_QUEUE_ITEMS; mailbox_idx++) { in mcp251xfd_send()
519 if ((BIT(mailbox_idx) & dev_data->mailbox_usage) == 0) { in mcp251xfd_send()
520 dev_data->mailbox_usage |= BIT(mailbox_idx); in mcp251xfd_send()
525 if (mailbox_idx >= MCP251XFD_TX_QUEUE_ITEMS) { in mcp251xfd_send()
531 dev_data->mailbox[mailbox_idx].cb = callback; in mcp251xfd_send()
532 dev_data->mailbox[mailbox_idx].cb_arg = callback_arg; in mcp251xfd_send()
534 ret = mcp251xfd_fifo_write(dev, mailbox_idx, msg); in mcp251xfd_send()
537 dev_data->mailbox_usage &= ~BIT(mailbox_idx); in mcp251xfd_send()
538 dev_data->mailbox[mailbox_idx].cb = NULL; in mcp251xfd_send()
1316 uint8_t mailbox_idx; in mcp251xfd_tef_fifo_handler() local
1318 mailbox_idx = FIELD_GET(MCP251XFD_OBJ_FLAGS_SEQ_MASK, tefobj->flags); in mcp251xfd_tef_fifo_handler()
1319 if (mailbox_idx >= MCP251XFD_TX_QUEUE_ITEMS) { in mcp251xfd_tef_fifo_handler()
1325 callback = dev_data->mailbox[mailbox_idx].cb; in mcp251xfd_tef_fifo_handler()
1327 callback(dev, 0, dev_data->mailbox[mailbox_idx].cb_arg); in mcp251xfd_tef_fifo_handler()
1330 dev_data->mailbox_usage &= ~BIT(mailbox_idx); in mcp251xfd_tef_fifo_handler()
1331 dev_data->mailbox[mailbox_idx].cb = NULL; in mcp251xfd_tef_fifo_handler()