Release (machine.)Pin resources?
Posted: Mon Aug 08, 2022 4:57 pm
I happen to be working with a Pico image. Was looking for a way to release or clean up Pin allocation? For example in Pi OS, GPIO.cleanup(). But for (machine.)Pin, no method?
>>> from machine import Pin
>>> dir(Pin)
['__class__', '__name__', 'value', '__bases__', '__dict__', 'ALT', 'IN', 'IRQ_FALLING', 'IRQ_RISING', 'OPEN_DRAIN', 'OUT', 'PULL_DOWN', 'PULL_UP', 'high', 'init', 'irq', 'low', 'off', 'on', 'toggle']
Was expecting, maybe, 'deinit'?
>>> from machine import Pin
>>> dir(Pin)
['__class__', '__name__', 'value', '__bases__', '__dict__', 'ALT', 'IN', 'IRQ_FALLING', 'IRQ_RISING', 'OPEN_DRAIN', 'OUT', 'PULL_DOWN', 'PULL_UP', 'high', 'init', 'irq', 'low', 'off', 'on', 'toggle']
Was expecting, maybe, 'deinit'?