]> Repositories - Adafruit_Blinka-hackapet.git/blobdiff - src/adafruit_blinka/microcontroller/pico_u2if/analogio.py
initial working feather
[Adafruit_Blinka-hackapet.git] / src / adafruit_blinka / microcontroller / pico_u2if / analogio.py
diff --git a/src/adafruit_blinka/microcontroller/pico_u2if/analogio.py b/src/adafruit_blinka/microcontroller/pico_u2if/analogio.py
deleted file mode 100644 (file)
index 2ae480f..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-"""
-`analogio` - Analog input and output control
-=================================================
-See `CircuitPython:analogio` in CircuitPython for more details.
-* Author(s): Carter Nelson
-"""
-from adafruit_blinka import ContextManaged
-from .pico_u2if import pico_u2if
-
-
-class AnalogIn(ContextManaged):
-    """Analog Input Class"""
-
-    def __init__(self, pin):
-        # per their pinout, why only two?
-        if pin.id not in (26, 27):
-            raise ValueError("Pin does not support ADC.")
-        self.pin_id = pin.id
-        pico_u2if.adc_init_pin(self.pin_id)
-
-    @property
-    def value(self):
-        """Read the ADC and return the value"""
-        return pico_u2if.adc_get_value(self.pin_id) << 4
-
-    # pylint: disable=no-self-use
-    @value.setter
-    def value(self, value):
-        # emulate what CircuitPython does
-        raise AttributeError("'AnalogIn' object has no attribute 'value'")
-
-    # pylint: enable=no-self-use
-
-    def deinit(self):
-        pass