-
-
Notifications
You must be signed in to change notification settings - Fork 731
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
BlackBrix
commented
Jan 22, 2016
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
BlackBrix
commented
Feb 6, 2016
is it within the nightly build already ?
@ArduinoBot build this please
ArduinoBot
commented
Feb 9, 2016
✅ Build completed.
⬇️ Build URL: http://downloads.arduino.cc/PR/samd/package_samd-b52_index.json
i️ To test this build:
- Open the Preferences of the Arduino IDE.
- Add the Build URL above in the Additional Boards Manager URLs field, and click OK.
- Open the Boards Manager (menu Tools->Board->Board Manager...)
- Install Arduino SAMD core - Pull Request Enable digitalRead on output pins, only enable pull-up in digitalWrite if pin is not output #101
- Select one of the boards under SAMD Pull Request Enable digitalRead on output pins, only enable pull-up in digitalWrite if pin is not output #101 in Tools->Board menu
- Compile/Upload as usual
@dirk67 this change has not been merged into master yet, see @ArduinoBot's comment above for instructions on how to try out these changes.
BlackBrix
commented
Mar 12, 2016
(I am formerly @dirk67)
I tested this and get no errors.
I think this should merged into master now.
...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.