X-Git-Url: https://git.ayoreis.com/Adafruit_Blinka-hackapet.git/blobdiff_plain/a4185d68816bf26745ba40ec2cc4783373fa432e..94b8f61cb28cb7cab038744ebc60d0dcbbb9e4e5:/src/adafruit_blinka/microcontroller/nova/pin.py diff --git a/src/adafruit_blinka/microcontroller/nova/pin.py b/src/adafruit_blinka/microcontroller/nova/pin.py index 2046e22..235e4ec 100644 --- a/src/adafruit_blinka/microcontroller/nova/pin.py +++ b/src/adafruit_blinka/microcontroller/nova/pin.py @@ -36,7 +36,7 @@ class Pin: if val is None: return int(Pin._nova.getIOpinValue(self.id).split('VALUE ')[1]) # write - elif val in (self.LOW, self.HIGH): + if val in (self.LOW, self.HIGH): Pin._nova.setIOpinValue(self.id, val) else: raise RuntimeError("Invalid value for pin") @@ -48,14 +48,13 @@ IO2 = Pin(2) IO3 = Pin(3) IO4 = Pin(4) -# create None type pins for I2C and SPI since they are expected to be defined SCL = IO2 SDA = IO0 SCK = SCLK = IO3 MOSI = IO4 MISO = IO2 -SS0 = IO0 -SS1 = IO1 +SS0 = IO0 +SS1 = IO1 PWM0 = IO0 # No PWM support on IO1 @@ -64,10 +63,10 @@ PWM3 = IO3 PWM4 = IO4 # orderd as (channel, pin), id -pwmOuts = ( ((1, 0), PWM0), ((1, 2), PWM2), ((1, 3), PWM3), ((1, 4), PWM4) ) +pwmOuts = (((1, 0), PWM0), ((1, 2), PWM2), ((1, 3), PWM3), ((1, 4), PWM4)) UART1_TX = IO4 UART1_RX = IO3 # ordered as uartId, txId, rxId -uartPorts = ( (0, UART1_TX, UART1_RX), ) \ No newline at end of file +uartPorts = ((0, UART1_TX, UART1_RX), )