embassy icon indicating copy to clipboard operation
embassy copied to clipboard

Use stm32-metapac for BXCAN.

Open cschuhen opened this issue 1 year ago • 6 comments

  1. Copy bxcan crate into hal
  2. Make it work with internal crate
  3. Port register access to stm32-metapac
  4. Remove bxcan internal PAC.

cschuhen avatar Mar 03 '24 06:03 cschuhen

@Dirbaio, When you get a chance, can I get trusted on this please?

cschuhen avatar Mar 05 '24 10:03 cschuhen

@Dirbaio, I tried my best to split the commits up to make it easy to review. If you want, I can collapse some of them before merging.

  • The first 4 changesets really just copy in the bxcan crate and get it working. Should be pretty much exactly binary compatible. Mainly things like module 'paths' and imports.
  • The changeset with title "Port registers access to using Embassy PAC" is the meat of this PR. It's the part that was manual and I could have stuffed something up.
  • The last two just clean a couple of things up and get it passing stuff.

BTW: Also tested on real bus with STM32F103.

cschuhen avatar Mar 05 '24 11:03 cschuhen

is this ready for review? (asking because PR title still says "draft")

Dirbaio avatar Mar 06 '24 18:03 Dirbaio

Yes, you are right. I forgot to do the filters module and then forgot to remove the bxcan crate's internal PAC after it was working with stm32-metapac. I have pushed updates, it should be ready to review now.

cschuhen avatar Mar 06 '24 23:03 cschuhen

b.t.w. The current build failures seem unrelated.

cschuhen avatar Mar 06 '24 23:03 cschuhen

Please note, I have pushed another branch to my repo that represents a 'squashed down' version of this PR: https://github.com/embassy-rs/embassy/compare/main...cschuhen:embassy:feature/bxcan_pac_collapsed Probably bxcan_pac_collapsed is better for actual merge but bxcan_pac is better for review purposes (and my development if further changes are required) Both arrive at the same destination.

cschuhen avatar Mar 06 '24 23:03 cschuhen

Thank-you!

cschuhen avatar Mar 13 '24 07:03 cschuhen