arduino / arduino/ArduinoCore-samd
Feature request: Add INPUT_PULLDOWN support to pinPeripheral()
- Dominant language
- C
- Stars
- 502
- Forks
- 740
- PR merge metrics
- No merged PRs in 30d
Description
The pinPeripheral() function in wiring_private.c has support for "PIO_INPUT", "PIO_INPUT_PULLUP" and "PIO_OUTPUT". It lacks support for the "PULL DOWN" configuration.
Interestingly, pinMode() does support "INPUT_PULLDOWN".
I propose that we add:
if ( ulPeripheral == PIO_INPUT_PULLDOWN )
{
pinMode( ulPin, INPUT_PULLDOWN ) ;
}
We will also need to add PIO_INPUT_PULLDOWN to the EPioType in WVariant.h.
I would be happy to submit a PR for this. Before I do, I have one question regarding suggestions of how best to set up my environment to use the ArduinoCore-samd Git repo instead of the core that is installed with the IDE.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with wiring_private.c to review how pinPeripheral() handles the existing PIO_INPUT and PIO_INPUT_PULLUP cases, then inspect EPioType in WVariant.h. Confirm the existing pinMode() INPUT_PULLDOWN support and ensure the new peripheral type is recognized; the work is done when both files support INPUT_PULLDOWN consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- arduino, c
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100