Skip to content

Tx: make abort() function public. #52

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

projectgus
Copy link

Allows access to abort function after splitting the driver. The equivalent function in FdCan<I, M> is already public, so I think this is safe.

Thanks for all your work developing fdcan, it's much appreciated!

Equivalent function in FdCan<I, M> is already public.
@projectgus
Copy link
Author

projectgus commented Sep 6, 2024

I'm going out on a limb here, but alternative way to look at this, maybe, is that Mailbox is only part of two public APIs:

  • The abort() function on the main struct
  • The PTX callback in transmit_preserve()

... and it's not really needed for anything else. So an alternative breaking change could be:

  • Convert Mailbox to an internal enum
  • Replace abort() with a public function that aborts all transmits (as I don't see how the crate user picks which Mailbox to abort, my code aborts all of them anyway).
  • Change the PTX signature to not pass the Mailbox (as, again, needed anywhere else in the existing API).

This would be a breaking change though, and quite opinionated change for a newcomer like me to suggest. I'd be up for contributing this though, FWIW. 😁

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant