mimxrt/machine_can: Split filter setting into collection and activation.

Making it a little bit more efficient with MIMXRT.

Signed-off-by: robert-hh <robert@hammelrath.com>
This commit is contained in:
robert-hh
2026-05-14 13:00:52 +02:00
committed by Damien George
parent d364b7e706
commit d8235ee080
+5 -3
View File
@@ -481,9 +481,11 @@ static void machine_can_port_set_filter(machine_can_obj_t *self, int filter_idx,
if (filter_idx < CAN_FILTER_MASK_NUM) {
FLEXCAN_SetRxIndividualMask(port->can_inst, filter_idx, mask << 1);
}
// TODO: Set a single filter instead of reloading all filters of the table
// multiple times.
FLEXCAN_SetRxFifoConfig(port->can_inst, port->flexcan_rx_fifo_config, true);
}
// Activate the filter table
static void machine_can_port_set_filter_done(machine_can_obj_t *self) {
FLEXCAN_SetRxFifoConfig(self->port->can_inst, self->port->flexcan_rx_fifo_config, true);
}
// Update interrupt configuration based on the new contents of 'self'