]> Repositories - Adafruit_Blinka-hackapet.git/blobdiff - src/adafruit_blinka/microcontroller/generic_linux/libgpiod_pin.py
typo fix
[Adafruit_Blinka-hackapet.git] / src / adafruit_blinka / microcontroller / generic_linux / libgpiod_pin.py
index 51b87f9190823cb570647d5be436b20a80413a50..396a94c63e3510a61794281c984a42eabf7df1f3 100644 (file)
@@ -33,16 +33,16 @@ class Pin:
     def init(self, mode=IN, pull=None):
         if not self._line:
             self._line = self._chip.get_line(int(self.id))
-            print("init line: ", int(self.id), self._line)
+            #print("init line: ", int(self.id), self._line)
 
         if mode != None:
             if mode == self.IN:
                 flags = 0
                 if pull != None:
                     if pull == self.PULL_UP:
-                        flags |= gpiod.LINE_REQ_FLAG_ACTIVE_LOW
+                        raise NotImplementedError("Internal pullups not supported in libgpiod, use physical resistor instead!")
                     elif pull == self.PULL_DOWN:
-                        flags |= gpiod.LINE_REQ_FLAG_ACTIVE_HIGH
+                        raise NotImplementedError("Internal pulldowns not supported in libgpiod, use physical resistor instead!")                    
                     else:
                         raise RuntimeError("Invalid pull for pin: %s" % self.id)