]> Repositories - Adafruit_Blinka-hackapet.git/blob - src/adafruit_blinka/microcontroller/stm32/stm32f405/pin.py
Merge pull request #929 from makermelissa/main
[Adafruit_Blinka-hackapet.git] / src / adafruit_blinka / microcontroller / stm32 / stm32f405 / pin.py
1 # SPDX-FileCopyrightText: 2021 Melissa LeBlanc-Williams for Adafruit Industries
2 #
3 # SPDX-License-Identifier: MIT
4 """STM32F405 pins"""
5
6 from ...generic_micropython import Pin
7
8 A0 = Pin("A0")
9 A1 = Pin("A1")
10 A2 = Pin("A2")
11 A3 = Pin("A3")
12 A4 = Pin("A4")
13 A5 = Pin("A5")
14 A6 = Pin("A6")
15 A7 = Pin("A7")
16 A8 = Pin("A8")
17 A9 = Pin("A9")
18 A10 = Pin("A10")
19 A11 = Pin("A11")
20 A12 = Pin("A12")
21 A13 = Pin("A13")
22 A14 = Pin("A14")
23 A15 = Pin("A15")
24 B0 = Pin("B0")
25 B1 = Pin("B1")
26 B2 = Pin("B2")
27 B3 = Pin("B3")
28 B4 = Pin("B4")
29 B5 = Pin("B5")
30 B6 = Pin("B6")
31 B7 = Pin("B7")
32 B8 = Pin("B8")
33 B9 = Pin("B9")
34 B10 = Pin("B10")
35 B11 = Pin("B11")
36 B12 = Pin("B12")
37 B13 = Pin("B13")
38 B14 = Pin("B14")
39 B15 = Pin("B15")
40 C0 = Pin("C0")
41 C1 = Pin("C1")
42 C2 = Pin("C2")
43 C3 = Pin("C3")
44 C4 = Pin("C4")
45 C5 = Pin("C5")
46 C6 = Pin("C6")
47 C7 = Pin("C7")
48 C8 = Pin("C8")
49 C9 = Pin("C9")
50 C10 = Pin("C10")
51 C11 = Pin("C11")
52 C12 = Pin("C12")
53 C13 = Pin("C13")
54 D2 = Pin("D2")
55
56 # ordered as spiId, sckId, mosiId, misoId
57 spiPorts = ((1, B13, B15, B14), (2, A5, A7, A6))
58
59 # ordered as uartId, txId, rxId
60 uartPorts = (
61     (1, B6, B7),
62     (2, A2, A3),
63     (3, B10, B11),
64     (4, A0, A1),
65     (6, C6, C7),
66 )
67
68 i2cPorts = (
69     (1, B6, B7),
70     (2, B10, B11),
71 )