-
Notifications
You must be signed in to change notification settings - Fork 177
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
don't touch pullups on reset while init PinDriver #344
Conversation
@Vollbrecht My only concern here is that in the ESP IDF code, they state that they don't leave the pin floating "for powersafe reasons" (whatever that means). Yet here, we would be doing exactly that. Thoughts? |
we don't do that here, we use the normal Drop function for power safety - with a pull-up if we actually drop the Pin. But on transition /creating a new driver we use the function (that is essentially a replica) but don't touch the pullup's |
OK. So:
Are we OK with the glitch on driver drop? |
Well its depatable -
Yeah in C land you are not forced to call the function at all - in that case the user has the choice what is happening. Here we kinda dictate how things should be run. So yes in that eye it probably would be nice as a user to have control over what kind of drop one wants. |
Though from an overall perspective it would only makes sense if the droped value has an owned Pin and not a ref Pin, because in that case we would allow the user to create a new driver, and he would potentially have the same problem again. That might be the case for someone or might not, and its hard to tell for every case. Definitely an opinionated choice here |
Just out of curiosity, if pins are pulled an opinionated direction by esp-idf when they are reset for "power saving reasons", why aren't they pulled an opinionated direction on boot? I only have this problem with pins I have specifically chosen to use/invoke the driver of. Would it make sense to, in addition to this fix which fixes the bug on pindriver init, to make "drop" go into an undefined state (no bug, no pull), and add something like "drop_into_pullup" and "drop_into_pulldown" as other means of destruction? EDIT: Realized |
@Vollbrecht Would you be willing to resolve the conflict so that we can merge this? (I think conflicts are due to the removal of the |
ivan i am a sinner clippy + fmt clippy more sinning in RTC
c2badfe
to
7c0e52f
Compare
Looks great, thanks! |
addresses #343