Skip to content

Conversation

@bryanniwa
Copy link

Closes #5034

@xoviat
Copy link
Contributor

xoviat commented Dec 11, 2025

build needs to pass

@bryanniwa
Copy link
Author

bryanniwa commented Dec 11, 2025

Yeah sorry, I created an issue with more information. Probably shouldn't have bothered with that and just put it all in the PR description. I was looking for some feedback on the idea before I nailed down all the tests and examples.
If you want, I can fix the build before you take a look anyway

@xoviat
Copy link
Contributor

xoviat commented Dec 11, 2025

It seems reasonable to me, so I will probably merge it if you fix the build. The only possible is concern is that some users may want to read from any fifo--the old behavior?

@cschuhen
Copy link

Personally I'm not a fan of this change as is. Sure it is possible to starve fifo1, but in that situation, things are kind of broken anyway. You will get overruns. This change is also quite unfriendly for many users who just want the next message without having to worry about the two FIFO's. Many users will just try to set up filters to split traffic between two to make the best use of the FIFO memory. Also, it becomes a breaking change.

If this change is really required, I'd prefer to not change the existing functions. We could add a family of *_fifo or *_from_fifo variants. In this case, one approach could be to add 'Any' to the enum and then the 'old' functions just wrap the new.

@bryanniwa
Copy link
Author

@cschuhen that seems reasonable to me; making it a breaking change is definitely not required. I still think it's useful to have access to the individual FIFOs so I'll probably do as you suggested and wrap the original commands while exposing a more specific method in case the user desires finer control.

I haven't had time to work on this recently so I'll finish it up this upcoming weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

STM32: Fifo selection for CAN bus

3 participants