-
Notifications
You must be signed in to change notification settings - Fork 157
Closed
Labels
Description
Working on a F765 I want to use all 3 available CAN interfaces, but ran into the issue, that there is no way to configure the filters of the 3rd CAN interface. The current implementation of mode::platform::CanFilter is made for CAN1 and CAN2 only (and on the F7 it is also missing the method to set the first bank of CAN2).
I'd like to propose the following changes:
- modm::platform::CanFilter is only to define the filter and mask types as well as the enums.
- Introduce a modm::platform::Can12Filter derived from above to set filter on CAN1 and CAN2. Including adding the missing method to configure dual CAN (1 and 2).
- Introduce a modm::platform::Can3Filter derived from above to set filter on CAN3.
Only for the MCU which provide more than one CAN interface. If there's a single CAN interface only no changes would be introduced.
I know it would break existing code as a rename from modm::platform::CanFilter to modm::platform::Can12Filter would be required. Any objections? Any better ideas?
Reactions are currently unavailable