Skip to content

Commit bf5da4c

Browse files
committed
Add a Round Carrier board file to the RP2040 Stamp build
1 parent 97ceba8 commit bf5da4c

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
from board import *
2+
import busio
3+
4+
5+
_SPI = None
6+
_UART = None
7+
_I2C = None
8+
9+
10+
D0 = GP0
11+
SDA = D0
12+
D1 = GP1
13+
SCL = D1
14+
D8 = GP8
15+
CIPO = D8
16+
MISO = D8
17+
D9 = GP9
18+
CS = D9
19+
D10 = GP10
20+
SCK = D10
21+
D11 = GP11
22+
COPI = D11
23+
MOSI = D11
24+
D14 = GP14
25+
D15 = GP15
26+
D16 = GP16
27+
TX = D16
28+
D17 = GP17
29+
RX = D17
30+
D26 = GP26
31+
A0 = D26
32+
D27 = GP27
33+
A1 = D27
34+
D28 = GP28
35+
A2 = D28
36+
D29 = GP29
37+
A3 = D29
38+
D24 = GP24
39+
NEOPIXEL = D24
40+
D25 = GP25
41+
LED = D25
42+
43+
44+
def SPI():
45+
global _SPI
46+
47+
if not _SPI:
48+
_SPI = busio.SPI(SCK, COPI, CIPO)
49+
50+
return _SPI
51+
52+
53+
def UART():
54+
global _UART
55+
56+
if not _UART:
57+
_UART = busio.UART(TX, RX)
58+
59+
return _UART
60+
61+
62+
def I2C():
63+
global _I2C
64+
65+
if not _I2C:
66+
_I2C = busio.I2C(SCL, SDA)
67+
68+
return _I2C

0 commit comments

Comments
 (0)