# pylint: disable=ungrouped-imports,wrong-import-position
-if detector.board.any_raspberry_pi_2_or_3:
+if detector.chip.BCM2XXX:
from adafruit_blinka.microcontroller.bcm283x.pin import Pin
-elif detector.board.BEAGLEBONE_BLACK:
+elif detector.chip.AM33XX:
from adafruit_blinka.microcontroller.am335x.pin import Pin
-elif detector.board.ORANGE_PI_PC:
+elif detector.chip.SUN8I:
from adafruit_blinka.microcontroller.allwinner_h3.pin import Pin
-elif detector.board.PYBOARD:
+elif detector.chip.SAMA5:
+ from adafruit_blinka.microcontroller.sama5.pin import Pin
+elif detector.chip.TEGRAXXX:
+ from adafruit_blinka.microcontroller.tegra.pin import Pin
+elif detector.chip.STM32:
from machine import Pin
from adafruit_blinka import Enum, ContextManaged
def deinit(self):
del self._pin
+ def cleanup(self, channel=None):
+ if channel == self:
+ Pin.cleanup(self._pin, self._pin)
+ else:
+ Pin.cleanup(self, channel)
+
@property
def direction(self):
return self.__direction