]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
Update digitalio docstrings to be more in line with CircuitPython
authorMelissa LeBlanc-Williams <melissa@adafruit.com>
Fri, 10 Sep 2021 15:15:42 +0000 (08:15 -0700)
committerMelissa LeBlanc-Williams <melissa@adafruit.com>
Fri, 10 Sep 2021 15:15:42 +0000 (08:15 -0700)
src/adafruit_blinka/microcontroller/generic_linux/spi.py
src/digitalio.py

index 454909210377ae7cdb8dd215f9dfa3518958a726..20607cdd091eb8aa7812375b77f2ebc5dc899d58 100755 (executable)
@@ -129,7 +129,7 @@ class SPI:
             self._spi.bits_per_word = self.bits
             data = self._spi.transfer(list(buffer_out[out_start : out_end + 1]))
             for i in range((in_end - in_start)):
             self._spi.bits_per_word = self.bits
             data = self._spi.transfer(list(buffer_out[out_start : out_end + 1]))
             for i in range((in_end - in_start)):
-                buffer_in[i + in_start] = data[i]
+                buffer_in[i + in_start] = data[i + 1]
             # self._spi.close()
         except FileNotFoundError:
             print("Could not open SPI device - check if SPI is enabled in kernel!")
             # self._spi.close()
         except FileNotFoundError:
             print("Could not open SPI device - check if SPI is enabled in kernel!")
index e77d910083583a1ba5b7a2a66047ceaae04d952b..ad05cb30dc9ac6b731d58f44fe1481f0ebde808d 100755 (executable)
@@ -176,7 +176,7 @@ class DigitalInOut(ContextManaged):
 
     @property
     def value(self):
 
     @property
     def value(self):
-        """Get or Set the Digital Pin Value"""
+        """The Digital Pin Value"""
         return self._pin.value() == 1
 
     @value.setter
         return self._pin.value() == 1
 
     @value.setter
@@ -188,7 +188,7 @@ class DigitalInOut(ContextManaged):
 
     @property
     def pull(self):
 
     @property
     def pull(self):
-        """Get or Set the Digital Pin Direction"""
+        """The pin pull direction"""
         if self.direction is Direction.INPUT:
             return self.__pull
         raise AttributeError("Not an input")
         if self.direction is Direction.INPUT:
             return self.__pull
         raise AttributeError("Not an input")
@@ -215,7 +215,7 @@ class DigitalInOut(ContextManaged):
 
     @property
     def drive_mode(self):
 
     @property
     def drive_mode(self):
-        """Get or Set the Digital Pin Drive Mode"""
+        """The Digital Pin Drive Mode"""
         if self.direction is Direction.OUTPUT:
             return self.__drive_mode  #
         raise AttributeError("Not an output")
         if self.direction is Direction.OUTPUT:
             return self.__drive_mode  #
         raise AttributeError("Not an output")