Skip to content

Conversation

@MarcelRobitaille
Copy link
Contributor

Fix #693

The pinMode(pin_size_t pin, PinMode mode) function can be passed a pin number that is out of range, crashing the microcontroller. This PR adds the same test found in digitalWrite(pin_size_t pin, PinStatus val) and digitalRead(pin_size_t pin) to ensure that the pin is in range.

@CLAassistant
Copy link

CLAassistant commented Jun 16, 2023

CLA assistant check
All committers have signed the CLA.

@MarcelRobitaille
Copy link
Contributor Author

@facchinm Could you take a look?

@facchinm
Copy link
Member

facchinm commented Jul 3, 2023

Thank you for the ping @MarcelRobitaille , I lost the notification apparently 🙂

@facchinm facchinm merged commit f57f3fc into arduino:main Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pinMode does not accept NC / unused pin

3 participants