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