You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I pass 20, which is an ADC pin, into analogInputToDigitalPin(p) it would return -1 due to the first check as 20 is not less than NUM_ANALOG_INPUTS which is 20.
If I pass 19, which is an ADC pin, into analogInputToDigitalPin(p) it would return 20.
This is unlike digitalPinToInterrupt, which returns the same pin number.
There is also no check that the value is greater or equal to 0
These functions assume that all pins with the same type of functions are all sequentially located.
I don't see GPIO 20 referred to as pin 19 in this table
The text was updated successfully, but these errors were encountered:
ESP32
pins_arduino.h
definition, tested on ESP32-S3 Dev Module on Arduino IDEThe macro here checks if the pin are less than a number.
If I pass 20, which is an ADC pin, into
analogInputToDigitalPin(p)
it would return -1 due to the first check as 20 is not less thanNUM_ANALOG_INPUTS
which is 20.If I pass 19, which is an ADC pin, into
analogInputToDigitalPin(p)
it would return 20.This is unlike
digitalPinToInterrupt
, which returns the same pin number.There is also no check that the value is greater or equal to 0
These functions assume that all pins with the same type of functions are all sequentially located.
I don't see GPIO 20 referred to as pin 19 in this table
The text was updated successfully, but these errors were encountered: