Skip to content

Incorrect parameter type in digitalRead() reference page #6505

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

Closed
per1234 opened this issue Jul 16, 2017 · 2 comments
Closed

Incorrect parameter type in digitalRead() reference page #6505

per1234 opened this issue Jul 16, 2017 · 2 comments
Labels
Component: Documentation Related to Arduino's documentation content

Comments

@per1234
Copy link
Collaborator

per1234 commented Jul 16, 2017

https://www.arduino.cc/en/Reference/DigitalRead

Parameters
pin: the number of the digital pin you want to read (int)

Actually the pin parameter is uint8_t (from https://github.com/arduino/Arduino/blob/1.8.3/hardware/arduino/avr/cores/arduino/Arduino.h#L135):

int digitalRead(uint8_t);

but maybe it's best to call it "byte" in the reference page.

@per1234 per1234 added the Component: Documentation Related to Arduino's documentation content label Jul 16, 2017
@oqibidipo
Copy link

Actually the pin parameter is uint8_t

... except in SAM and SAMD cores it is uint32_t.

@per1234
Copy link
Collaborator Author

per1234 commented Nov 14, 2017

The arduino/reference-en version of the reference page no longer documents the parameter type (which I must admit was my doing). That was not at all a good solution to this issue but it does mean this can now be closed in favor of the more general arduino/reference-en#15.

@per1234 per1234 closed this as completed Nov 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Documentation Related to Arduino's documentation content
Projects
None yet
Development

No branches or pull requests

2 participants