]> Repositories - Adafruit_Blinka-hackapet.git/blob - src/adafruit_blinka/microcontroller/bcm2712/pin.py
saw/sine are inputs, not outputs
[Adafruit_Blinka-hackapet.git] / src / adafruit_blinka / microcontroller / bcm2712 / pin.py
1 # SPDX-FileCopyrightText: 2023 Melissa LeBlanc-Williams for Adafruit Industries
2 #
3 # SPDX-License-Identifier: MIT
4 """Broadcom BCM2712 pin names"""
5 from adafruit_blinka.microcontroller.generic_linux.libgpiod_pin import Pin
6
7 # Pi 1B rev1 only?
8 D0 = Pin((4, 0))
9 D1 = Pin((4, 1))
10
11 D2 = Pin((4, 2))
12 SDA = Pin((4, 2))
13 D3 = Pin((4, 3))
14 SCL = Pin((4, 3))
15
16 D4 = Pin((4, 4))
17 D5 = Pin((4, 5))
18 D6 = Pin((4, 6))
19
20 D7 = Pin((4, 7))
21 CE1 = Pin((4, 7))
22 D8 = Pin((4, 8))
23 CE0 = Pin((4, 8))
24 D9 = Pin((4, 9))
25 MISO = Pin((4, 9))
26 D10 = Pin((4, 10))
27 MOSI = Pin((4, 10))
28 D11 = Pin((4, 11))
29 SCLK = Pin((4, 11))  # Raspberry Pi naming
30 SCK = Pin((4, 11))  # CircuitPython naming
31
32 D12 = Pin((4, 12))
33 D13 = Pin((4, 13))
34
35 D14 = Pin((4, 14))
36 TXD = Pin((4, 14))
37 D15 = Pin((4, 15))
38 RXD = Pin((4, 15))
39
40 D16 = Pin((4, 16))
41 D17 = Pin((4, 17))
42 D18 = Pin((4, 18))
43 D19 = Pin((4, 19))
44 MISO_1 = Pin((4, 19))
45 D20 = Pin((4, 20))
46 MOSI_1 = Pin((4, 20))
47 D21 = Pin((4, 21))
48 SCLK_1 = Pin((4, 21))
49 SCK_1 = Pin((4, 21))
50 D22 = Pin((4, 22))
51 D23 = Pin((4, 23))
52 D24 = Pin((4, 24))
53 D25 = Pin((4, 25))
54 D26 = Pin((4, 26))
55 D27 = Pin((4, 27))
56 D28 = Pin((4, 28))
57 D29 = Pin((4, 29))
58 D30 = Pin((4, 30))
59 D31 = Pin((4, 31))
60 D32 = Pin((4, 32))
61 D33 = Pin((4, 33))
62 D34 = Pin((4, 34))
63 D35 = Pin((4, 35))
64 D36 = Pin((4, 36))
65 D37 = Pin((4, 37))
66 D38 = Pin((4, 38))
67 D39 = Pin((4, 39))
68 D40 = Pin((4, 40))
69 MISO_2 = Pin((4, 40))
70 D41 = Pin((4, 41))
71 MOSI_2 = Pin((4, 41))
72 D42 = Pin((4, 42))
73 SCLK_2 = Pin((4, 42))
74 SCK_2 = Pin((4, 43))
75 D43 = Pin((4, 43))
76 D44 = Pin((4, 44))
77 D45 = Pin((4, 45))
78
79 # ordered as spiId, sckId, mosiId, misoId
80 spiPorts = (
81     (0, SCLK, MOSI, MISO),
82     (1, SCLK_1, MOSI_1, MISO_1),
83     (2, SCLK_2, MOSI_2, MISO_2),
84 )
85
86 # ordered as uartId, txId, rxId
87 uartPorts = ((1, TXD, RXD),)
88
89 # These are the known hardware I2C ports / pins.
90 # For software I2C ports created with the i2c-gpio overlay, see:
91 #     https://github.com/adafruit/Adafruit_Python_Extended_Bus
92 i2cPorts = (
93     (1, SCL, SDA),
94     (0, D1, D0),  # both pi 1 and pi 2 i2c ports!
95 )