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