I am writing a script that should query if an input pin is configured as pull-up or pull-down using the RPi.GPIO package.
When configuring each output I can call
GPIO.setup(11, GPIO.IN, pull_up_down=GPIO.PUD_UP)
# or
GPIO.setup(12, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
This is done by user input at runtime. After that my application needs to check if the user configured everything properly (one can never be sure!).
Is there anything like GPIO.gpio_function(pin)
but that will output the pull state of the input?
(It would be a plus if it also returned the initial state of an output.)
Thanks in advance for taking the time to read!