X-Git-Url: https://git.ayoreis.com/Adafruit_Blinka-hackapet.git/blobdiff_plain/e581ddf6e329e49b0c7c48c3c0ac967aa6a30571..c2bc4a90827f28abb6b51eae659a1f80a65c0497:/src/adafruit_blinka/microcontroller/generic_agnostic_board/pin.py diff --git a/src/adafruit_blinka/microcontroller/generic_agnostic_board/pin.py b/src/adafruit_blinka/microcontroller/generic_agnostic_board/pin.py index c527759..5830c30 100644 --- a/src/adafruit_blinka/microcontroller/generic_agnostic_board/pin.py +++ b/src/adafruit_blinka/microcontroller/generic_agnostic_board/pin.py @@ -71,6 +71,8 @@ class Pin: PULL_UP = 1 PULL_DOWN = 2 + # pylint: disable=no-self-use + def return_toggle(self): """Returns the pin's expected value, toggling between True and False""" toggle_state = not self.previous_value @@ -150,10 +152,10 @@ class Pin: self.current_value = self.pin_behavior.get(self.id)() # is pin a pull up and pin is LOW? - if self._pull == Pin.PULL_UP and self.current_value == False: + if self._pull == Pin.PULL_UP and self.current_value is False: self.current_value = False # is pin a pull down and pin is HIGH? - if self._pull == Pin.PULL_DOWN and self.current_value == True: + if self._pull == Pin.PULL_DOWN and self.current_value is True: self.current_value = False return self.current_value @@ -202,7 +204,10 @@ A2 = Pin(9) A3 = Pin(10) A4 = Pin(12) +# Special digital pins for pixels D7 = Pin(11) +D8 = Pin(13) +D9 = Pin(14) # I2C pins SDA = Pin() @@ -215,6 +220,9 @@ MOSI = Pin() MISO = Pin() CS = Pin() +spiPorts = ((0, SCK, MOSI, MISO),) + + # UART pins UART_TX = Pin() UART_RX = Pin()