File tree Expand file tree Collapse file tree 3 files changed +106
-0
lines changed Expand file tree Collapse file tree 3 files changed +106
-0
lines changed Original file line number Diff line number Diff line change @@ -747,6 +747,8 @@ endif
747747 @$(MD5SUM) test.hex
748748 $(TINYGO) build -size short -o test.hex -target=tiny2350 examples/blinky1
749749 @$(MD5SUM) test.hex
750+ $(TINYGO) build -size short -o test.hex -target=pico-plus2 examples/blinky1
751+ @$(MD5SUM) test.hex
750752 $(TINYGO) build -size short -o test.hex -target=waveshare-rp2040-tiny examples/echo
751753 @$(MD5SUM) test.hex
752754 # test pwm
Original file line number Diff line number Diff line change 1+ //go:build pico_plus2
2+
3+ package machine
4+
5+ // GPIO pins
6+ const (
7+ GP0 Pin = GPIO0
8+ GP1 Pin = GPIO1
9+ GP2 Pin = GPIO2
10+ GP3 Pin = GPIO3
11+ GP4 Pin = GPIO4
12+ GP5 Pin = GPIO5
13+ GP6 Pin = GPIO6
14+ GP7 Pin = GPIO7
15+ GP8 Pin = GPIO8
16+ GP9 Pin = GPIO9
17+ GP10 Pin = GPIO10
18+ GP11 Pin = GPIO11
19+ GP12 Pin = GPIO12
20+ GP13 Pin = GPIO13
21+ GP14 Pin = GPIO14
22+ GP15 Pin = GPIO15
23+ GP16 Pin = GPIO16
24+ GP17 Pin = GPIO17
25+ GP18 Pin = GPIO18
26+ GP19 Pin = GPIO19
27+ GP20 Pin = GPIO20
28+ GP21 Pin = GPIO21
29+ GP22 Pin = GPIO22
30+ GP26 Pin = GPIO26
31+ GP27 Pin = GPIO27
32+ GP28 Pin = GPIO28
33+ GP32 Pin = GPIO32
34+ GP33 Pin = GPIO33
35+ GP34 Pin = GPIO34
36+ GP35 Pin = GPIO35
37+ GP36 Pin = GPIO36
38+
39+ // Onboard LED
40+ LED Pin = GPIO25
41+
42+ // Onboard crystal oscillator frequency, in MHz.
43+ xoscFreq = 12 // MHz
44+ )
45+
46+ // I2C Default pins on Raspberry Pico.
47+ const (
48+ I2C0_SDA_PIN = GP4
49+ I2C0_SCL_PIN = GP5
50+
51+ I2C1_SDA_PIN = GP2
52+ I2C1_SCL_PIN = GP3
53+ )
54+
55+ // SPI default pins
56+ const (
57+ // Default Serial Clock Bus 0 for SPI communications
58+ SPI0_SCK_PIN = GPIO18
59+ // Default Serial Out Bus 0 for SPI communications
60+ SPI0_SDO_PIN = GPIO19 // Tx
61+ // Default Serial In Bus 0 for SPI communications
62+ SPI0_SDI_PIN = GPIO16 // Rx
63+
64+ // Default Serial Clock Bus 1 for SPI communications
65+ SPI1_SCK_PIN = GPIO10
66+ // Default Serial Out Bus 1 for SPI communications
67+ SPI1_SDO_PIN = GPIO11 // Tx
68+ // Default Serial In Bus 1 for SPI communications
69+ SPI1_SDI_PIN = GPIO12 // Rx
70+ )
71+
72+ // UART pins
73+ const (
74+ UART0_TX_PIN = GPIO0
75+ UART0_RX_PIN = GPIO1
76+ UART1_TX_PIN = GPIO8
77+ UART1_RX_PIN = GPIO9
78+ UART_TX_PIN = UART0_TX_PIN
79+ UART_RX_PIN = UART0_RX_PIN
80+ )
81+
82+ var DefaultUART = UART0
83+
84+ // USB identifiers
85+ const (
86+ usb_STRING_PRODUCT = "Pico Plus2"
87+ usb_STRING_MANUFACTURER = "Pimoroni"
88+ )
89+
90+ var (
91+ usb_VID uint16 = 0x2E8A
92+ usb_PID uint16 = 0x000F
93+ )
Original file line number Diff line number Diff line change 1+ {
2+ "inherits" : [
3+ " rp2350b"
4+ ],
5+ "build-tags" : [" pico_plus2" ],
6+ "ldflags" : [
7+ " --defsym=__flash_size=16M"
8+ ],
9+ "serial-port" : [" 2e8a:000F" ],
10+ "default-stack-size" : 8192
11+ }
You can’t perform that action at this time.
0 commit comments