adafruit / Adafruit_Blinka

Add CircuitPython hardware API and libraries to MicroPython & CPython devices
https://learn.adafruit.com/circuitpython-on-raspberrypi-linux
MIT License
437 stars 327 forks source link

libgpiod_pin_1_x.py does not detect internal pulldowns #840

Open nolanwinter opened 3 weeks ago

nolanwinter commented 3 weeks ago

Board Name

NanoPi Neo

Steps

  1. Update the board to use the newest version of Blink.
  2. Create a digitalio input pin with a pull (pin.switch_to_input(Pull.DOWN)
  3. NotImplementedError is thrown.
  4. Downgrade blinka to version 8.23.0 (for example)
  5. Create a digitalio input pin with a pull (pin.switch_to_input(Pull.DOWN)
  6. No error is thrown.

Description

On the current version of blinka (presumably any version after commit 7e23a36), the ability to use the internal pulldown resistors in the NanoPi Neo is prevented by a NotImplementedError, yet it still works with the old version of Blinka so the error is getting thrown accidently.

Additional information

image image

makermelissa commented 3 weeks ago

Thanks. It was split because it seems to only work on 1 of 3 different version ranges at a time. Pullups probably just need to be added to the version 1.x handler.