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

Fix failing bsp_pins! invocation with no aliases #605

Merged
merged 5 commits into from
Jun 10, 2022

Conversation

bradleyharden
Copy link
Contributor

@bradleyharden bradleyharden commented Apr 24, 2022

When no aliases are included in a call of bsp_pins!, the resulting
pin_alias! macro expands to a completely empty macro definition, which
is invalid.

Add identity "aliases" for each given pin name. This has two benefits.
First, it prevents the empty macro case above. And second, it precludes
any possibility of collisions between names and aliases, since all names
are now checked before resolving aliases.

Closes #599

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)

When no aliases are included in a call of `bsp_pins!`, the resulting
`pin_alias!` macro expands to a completely empty macro definition, which
is invalid.

Add identity "aliases" for each given pin name. This has two benefits.
First, it prevents the empty macro case above. And second, it precludes
any possibility of collisions between names and aliases, since all names
are now checked before resolving aliases.

Closes atsamd-rs#599
@TDHolmes
Copy link
Contributor

Clever!

@jbeaurivage
Copy link
Contributor

@bradleyharden, do you want this to be merged? I think all that's needed is rebasing onto master.

@bradleyharden
Copy link
Contributor Author

Yes, I was waiting to hear from @datagrok, but I'm fairly confident it fixes the problem.

@bradleyharden
Copy link
Contributor Author

This failed because of some strange rustup error, but I can't restart the job?

@jbeaurivage jbeaurivage merged commit 2dad831 into atsamd-rs:master Jun 10, 2022
@datagrok
Copy link

Sorry for the delay. This does indeed fix the problem on my repo, @bradleyharden! Thanks!

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.

bsp_pins! macro error when no pin definitions include aliases
4 participants