linux-embedded-hal icon indicating copy to clipboard operation
linux-embedded-hal copied to clipboard

CAN trait implementation

Open marcelbuesing opened this issue 2 years ago • 8 comments

I think it would be great to add implementations for the new embedded-hal CAN traits via socketcan. Would you be open for a PR for this?

marcelbuesing avatar Dec 09 '21 11:12 marcelbuesing

That would definitely be interesting!

eldruin avatar Dec 09 '21 12:12 eldruin

Ok I basically created a fork of the socketcan crate, you can find the fork here. Sadly the original crate is no longer maintained but works quite well for me and still sees significant download numbers on crates.io. I reduced the dependencies and removed modules which were not necessary for this use case. A simple example is here. It already works but still needs some minor cleanup.

My suggestion would be to move this project/fork copy to the rust-embedded organization and basically move all the code that is currently in the embedded_hal_impl module to the linux-embedded-hal crate referencing the socketcan crate in the rust-embedded organization, analogous to gpio-cdev or sysfs_gpio. If this an option for the rust-embedded org would this be ok for your @mbr ? I see great potential in e.g. getting started with the embedded-hal socketcan implementation and then e.g. migrating to bxcan in projects.

marcelbuesing avatar Dec 13 '21 12:12 marcelbuesing

hey thanks for your effort! seems like a fundamental crate so if @mbr (cc. @fpagliughi) are up for handing socketcan over it's a :+1: from me, any other opinions ~~@rust-embedded/tools~~ @rust-embedded/embedded-linux (whoops)?

ryankurte avatar Dec 14 '21 19:12 ryankurte

(maybe @rust-embedded/embedded-linux ?)

adamgreig avatar Dec 14 '21 19:12 adamgreig

Seems logical to me as well :+1:

nastevens avatar Dec 29 '21 19:12 nastevens

Ok since there is no response from the socketcan maintainers, how about a new crate name: linux-socketcan?

marcelbuesing avatar Feb 10 '22 13:02 marcelbuesing

Hey All. Apologies. I agreed to share maintainer responsibilities for the socketcan crate last year, then got pretty sick, missed a few months of work, and let my opensource projects go dormant for a while. But I've been catching up recently, and have a CAN project starting soon, so can begin contributing.

fpagliughi avatar Feb 10 '22 14:02 fpagliughi

BTW... I'll have to track down @mbr. I believe he gave me write access to the GitHub repo, but not crates.io...

fpagliughi avatar Feb 10 '22 15:02 fpagliughi