-
Notifications
You must be signed in to change notification settings - Fork 226
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Pin configuration change in loop #269
Comments
The methods are But we're working on a more ergonomic way to do this, take a look at MR #205. If this fits your usecase and you can provide some feedback on the API, I can merge those changes so they become generally available. |
Sorry but not sure which should i use. Should i use solution from link or i should try to do something like this:
what i see under this link this convention should work for rust or am i missing something? |
Both work. I would recommend using the PR #205 code I linked as this API is more flexible and can work in more situations. But the code which you shared is not technically wrong either, it is just more restricted in what you can do with it. |
First i want to test first solution but when im trying to compile it im getting:
Some problem with borrow checker, but im creating everytime in loop new value so why it doesnt want to switch? |
Your last line is wrong I think. It needs to be just led = ledin.into_opendrain_high(); (without |
greate now its compiling, thank you. closing ticket, when i will have problem with second solution will update its ticket |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
I need to switch pin configuration "on the fly" how to do that with this library? Standard in rust is what i read is something like that:
But when i try it with this library im getting on
eled.into_input();
"no such method". How it should be handled here?The text was updated successfully, but these errors were encountered: