1 # Pins dont exist in CPython so...lets make our own!
3 def __init__(self, name, bcm_number):
5 self._number = bcm_number
12 D9 = Pin("MISO/D9", 9)
13 D10 = Pin("MOSI/D10", 10)
14 D11 = Pin("SCLK/D11", 11)
15 MISO = Pin("MISO/D9", 9)
16 MOSI = Pin("MOSI/D10", 10)
17 SCLK = Pin("SCLK/D11", 11)
18 D14 = Pin("TXD/D14", 14)
19 D15 = Pin("RXD/D15", 15)
20 TXD = Pin("TXD/D14", 14)
21 RXD = Pin("RXD/D15", 15)
22 D17 = Pin("BCM 17", 17)
23 D18 = Pin("BCM 18", 18)
24 D19 = Pin("BCM 19", 19)
25 D20 = Pin("BCM 20", 20)
26 MISO_2 = Pin("MISO_2/19", 19)
27 MOSI_2 = Pin("MOSI_2/20", 20)
28 SCLK_2 = Pin("SCLK_2/21", 21)
29 D21 = Pin("BCM 21", 21)
30 D22 = Pin("BCM 22", 22)
31 D23 = Pin("BCM 23", 23)
32 D24 = Pin("BCM 24", 24)
33 D27 = Pin("BCM 27", 27)
35 # ordered as spiId, sckId, mosiId, misoId
36 spiPorts = ((1, SCLK, MOSI, MISO), (2, SCLK_2, MOSI_2, MISO_2))
38 # ordered as uartId, txId, rxId