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

generic IntoAf #308

Merged
merged 5 commits into from
Jan 20, 2022
Merged

generic IntoAf #308

merged 5 commits into from
Jan 20, 2022

Conversation

burrbull
Copy link
Contributor

No description provided.

src/gpio.rs Show resolved Hide resolved
@Sh3Rm4n
Copy link
Member

Sh3Rm4n commented Jan 15, 2022

This looks really cool. Leveraging type inference to save time looking up the correct alternate function number is a great ergonomic boom! 🎉

I'll have a deeper look later this weekend (hopefully sometime today) but at first glance this looks good

@burrbull burrbull force-pushed the intoaf branch 2 times, most recently from 7db6509 to d40d2dc Compare January 15, 2022 07:49
Copy link
Member

@Sh3Rm4n Sh3Rm4n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This really looks like straight forward changes and a good improvement overall. Feel free to add the #[deprecated]. It might also be ok to remove the old into_af_... functions, but this could also wait for another release.

Thank you very much!

src/gpio.rs Show resolved Hide resolved
#[derive(Debug)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct $Gpiox;
#[doc = concat!("GPIO port ", stringify!($GPIOX), " (type state)")]
Copy link
Member

@Sh3Rm4n Sh3Rm4n Jan 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I assume this is the reason for the MSRV 1.52 -> 1.54 bump? Good to decrease the invocations of paste.

@burrbull
Copy link
Contributor Author

rebased

@Sh3Rm4n
Copy link
Member

Sh3Rm4n commented Jan 20, 2022

LGTM. Thank you very much!

@Sh3Rm4n Sh3Rm4n merged commit e069b0e into stm32-rs:master Jan 20, 2022
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.

2 participants