-
-
Notifications
You must be signed in to change notification settings - Fork 726
Enable digitalRead on output pins, only enable pull-up in digitalWrite if pin is not output #101
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
Conversation
@ArduinoBot build this please |
digitalWrite: if the pin is in OUTPUT mode, please do not enable/disable/modify the pull-up at all will it be this way ? |
@dirk67 yes, this is on of the goals of this pull request, in particular see: https://github.com/sandeepmistry/ArduinoCore-samd/blob/digital-read-write-pullup/cores/arduino/wiring_digital.c#L89-L92 |
is it within the nightly build already ? |
@ArduinoBot build this please |
✅ Build completed. ⬇️ Build URL: ℹ️ To test this build:
|
@dirk67 this change has not been merged into master yet, see @ArduinoBot's comment above for instructions on how to try out these changes. |
(I am formerly @dirk67) |
…digitalWrite if pin is not output. arduino#56 arduino#79 arduino#94 arduino#101
Resolves #56 and #94.
pinMode
:digitalRead
to read current value (maintains AVR behaviour).digitalWrite
:HIGH
is passed in, disable pull-up ifLOW
passed in. (This is similar to [samd] fixing issue #28 #41, but it did not set OUT which is needed to enable pull-up - as per table 22-1 in the SAMD21 datasheet).If this is merged #41 can be closed.