Searched refs:filter_idx (Results 1 – 2 of 2) sorted by relevance
/Zephyr-latest/drivers/can/ |
D | can_xmc4xxx.c | 356 int filter_idx; in can_xmc4xxx_add_rx_filter() local 365 for (filter_idx = 0; filter_idx < CONFIG_CAN_MAX_FILTER; filter_idx++) { in can_xmc4xxx_add_rx_filter() 366 if ((BIT(filter_idx) & dev_data->filter_usage) == 0) { in can_xmc4xxx_add_rx_filter() 371 if (filter_idx >= CONFIG_CAN_MAX_FILTER) { in can_xmc4xxx_add_rx_filter() 372 filter_idx = -ENOSPC; in can_xmc4xxx_add_rx_filter() 377 ret = can_xmc4xxx_init_fifo(dev, filter, &dev_data->rx_fifos[filter_idx], false); in can_xmc4xxx_add_rx_filter() 385 ret = can_xmc4xxx_init_fifo(dev, filter, &dev_data->rtr_fifos[filter_idx], true); in can_xmc4xxx_add_rx_filter() 387 can_xmc4xxx_deinit_fifo(dev, &dev_data->rx_fifos[filter_idx]); in can_xmc4xxx_add_rx_filter() 394 dev_data->filter_usage |= BIT(filter_idx); in can_xmc4xxx_add_rx_filter() 395 dev_data->rx_callbacks[filter_idx].function = callback; in can_xmc4xxx_add_rx_filter() [all …]
|
D | can_mcp251xfd.c | 554 int filter_idx; in mcp251xfd_add_rx_filter() local 559 for (filter_idx = 0; filter_idx < CONFIG_CAN_MAX_FILTER ; filter_idx++) { in mcp251xfd_add_rx_filter() 560 if ((BIT(filter_idx) & dev_data->filter_usage) == 0) { in mcp251xfd_add_rx_filter() 565 if (filter_idx >= CONFIG_CAN_MAX_FILTER) { in mcp251xfd_add_rx_filter() 566 filter_idx = -ENOSPC; in mcp251xfd_add_rx_filter() 581 ret = mcp251xfd_write(dev, MCP251XFD_REG_FLTOBJ(filter_idx), MCP251XFD_REG_SIZE); in mcp251xfd_add_rx_filter() 598 ret = mcp251xfd_write(dev, MCP251XFD_REG_FLTMASK(filter_idx), MCP251XFD_REG_SIZE); in mcp251xfd_add_rx_filter() 608 ret = mcp251xfd_write(dev, MCP251XFD_REG_BYTE_FLTCON(filter_idx), 1); in mcp251xfd_add_rx_filter() 614 dev_data->filter_usage |= BIT(filter_idx); in mcp251xfd_add_rx_filter() 615 dev_data->filter[filter_idx] = *filter; in mcp251xfd_add_rx_filter() [all …]
|