]> Repositories - Adafruit_Blinka-hackapet.git/blobdiff - src/adafruit_blinka/microcontroller/nova/pin.py
Merge pull request #216 from binhollc/master
[Adafruit_Blinka-hackapet.git] / src / adafruit_blinka / microcontroller / nova / pin.py
index 5a58372150b7929f1fca72f602f3b5202f9a7767..235e4ec749bd84cbf11b777864f37de15795510a 100644 (file)
@@ -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,10 +48,25 @@ IO2 = Pin(2)
 IO3 = Pin(3)
 IO4 = Pin(4)
 
+SCL = IO2
+SDA = IO0
+SCK = SCLK = IO3
+MOSI = IO4
+MISO = IO2
+SS0 = IO0
+SS1 = IO1
+
 PWM0 = IO0
 # No PWM support on IO1
 PWM2 = IO2
 PWM3 = IO3
 PWM4 = IO4
 
-pwmOuts = ( ((1, 0), PWM0), ((1, 2), PWM2), ((1, 3), PWM3), ((1, 4), PWM4) )
\ No newline at end of file
+# orderd as (channel, pin), id
+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), )