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 missing ValidFunction implementation for DynFunction. #738

Merged

Conversation

ithinuel
Copy link
Member

This missing impl effectively prevented anyone from using a Pin<_, DynFunction, _>.

@ithinuel ithinuel force-pushed the add-missing-validfunction-dynfunction-impl branch from 434ff38 to 7eaf033 Compare December 21, 2023 17:43
This missing impl effectively prevented anyone from using a
`Pin<_, DynFunction, _>`.
@ithinuel ithinuel force-pushed the add-missing-validfunction-dynfunction-impl branch from 7eaf033 to a8f6b2f Compare December 21, 2023 17:45
@thejpster
Copy link
Member

This now works:

let mut uart0_tx = pins
        .gpio0
        .reconfigure::<gpio::DynFunction, gpio::DynPullType>()
        .into_dyn_pin();

A helper method like into_really_dynamic_pin() or erase_all_the_type_state() would be useful :)

@thejpster thejpster merged commit 3969e41 into rp-rs:main Dec 21, 2023
8 checks passed
@ithinuel ithinuel deleted the add-missing-validfunction-dynfunction-impl branch December 22, 2023 09:17
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