Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add Board support package for Adafruit Feather M4 CAN #622

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

chipsoft
Copy link

Summary

Add Board support package for Adafruit Feather M4 CAN (NeoPixel support), add examples for Blinky and NeoPixel

Checklist

  • CHANGELOG.md for the BSP or HAL updated
  • All new or modified code is well documented, especially public items
  • No new warnings or clippy suggestions have been introduced (see CI or check locally)

If Adding a new Board

  • Board CI added to crates.json
  • Board is properly following "Tier 2" conventions, unless otherwise decided to be "Tier 1"

@sajattack
Copy link
Member

sajattack commented Jun 18, 2022

I think this would be better as a #[cfg(feature = "can"] like we did for the radio variants of feather m0

#[cfg(all(feature = "rfm", not(feature = "express"), not(feature = "adalogger")))]
rather than an entirely separate BSP. Also I don't think we have CAN support in the HAL so I'm not sure how different it would be from the regular feather_m4. If the board is completely different and not compatible with the regular feather_m4, let me know, but I suspect it's just a minor variant.

@chipsoft
Copy link
Author

I think this would be better as a #[cfg(feature = "can"] like we did for the radio variants of feather m0

#[cfg(all(feature = "rfm", not(feature = "express"), not(feature = "adalogger")))]

rather than an entirely separate BSP. Also I don't think we have CAN support in the HAL so I'm not sure how different it would be from the regular feather_m4. If the board is completely different and not compatible with the regular feather_m4, let me know, but I suspect it's just a minor variant.

I've been experimenting with the Adafruit Feather M4 CAN board and found that the NeoPixel example doesn't work. The problem turned out to be that the NeoPixel on the Adafruit Feather M4 CAN board is connected differently than on the Adafruit Feather M4 board, and the power supply to the NeoPixel is controlled by a microcontroller. The ultimate goal of all my experimentation is to run full CAN/CANFD work on this board using Rust.

@sajattack
Copy link
Member

Yeah I still think you could remap the neopixel and add the CAN pins under a feature flag.

@bradleyharden
Copy link
Contributor

I agree with @sajattack. I would strongly prefer not to create a new BSP if it can work as a feature flag. The duplicated code becomes much more of a liability, especially if it gets out of sync with the existing feather_m4

@jbeaurivage jbeaurivage added the board support Related to support for a particular board label May 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
board support Related to support for a particular board
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants