File tree Expand file tree Collapse file tree 3 files changed +91
-0
lines changed Expand file tree Collapse file tree 3 files changed +91
-0
lines changed Original file line number Diff line number Diff line change @@ -743,6 +743,8 @@ endif
743
743
@$(MD5SUM) test.hex
744
744
$(TINYGO) build -size short -o test.hex -target=pico2 examples/blinky1
745
745
@$(MD5SUM) test.hex
746
+ $(TINYGO) build -size short -o test.hex -target=tiny2350 examples/blinky1
747
+ @$(MD5SUM) test.hex
746
748
# test pwm
747
749
$(TINYGO) build -size short -o test.hex -target=itsybitsy-m0 examples/pwm
748
750
@$(MD5SUM) test.hex
Original file line number Diff line number Diff line change
1
+ //go:build tiny2350
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
+ GP12 Pin = GPIO12
16
+ GP13 Pin = GPIO13
17
+ GP18 Pin = GPIO18
18
+ GP19 Pin = GPIO19
19
+ GP20 Pin = GPIO20
20
+ GP26 Pin = GPIO26
21
+ GP27 Pin = GPIO27
22
+ GP28 Pin = GPIO28
23
+ GP29 Pin = GPIO29
24
+
25
+ // Onboard LED
26
+ LED_RED Pin = GPIO18
27
+ LED_GREEN Pin = GPIO19
28
+ LED_BLUE Pin = GPIO20
29
+ LED = LED_RED
30
+
31
+ // Onboard crystal oscillator frequency, in MHz.
32
+ xoscFreq = 12 // MHz
33
+ )
34
+
35
+ // I2C Default pins on Tiny2350.
36
+ const (
37
+ I2C0_SDA_PIN = GP12
38
+ I2C0_SCL_PIN = GP13
39
+
40
+ I2C1_SDA_PIN = GP2
41
+ I2C1_SCL_PIN = GP3
42
+ )
43
+
44
+ // SPI default pins
45
+ const (
46
+ // Default Serial Clock Bus 0 for SPI communications
47
+ SPI0_SCK_PIN = GPIO6
48
+ // Default Serial Out Bus 0 for SPI communications
49
+ SPI0_SDO_PIN = GPIO7 // Tx
50
+ // Default Serial In Bus 0 for SPI communications
51
+ SPI0_SDI_PIN = GPIO4 // Rx
52
+
53
+ // Default Serial Clock Bus 1 for SPI communications
54
+ SPI1_SCK_PIN = GPIO26
55
+ // Default Serial Out Bus 1 for SPI communications
56
+ SPI1_SDO_PIN = GPIO27 // Tx
57
+ // Default Serial In Bus 1 for SPI communications
58
+ SPI1_SDI_PIN = GPIO28 // Rx
59
+ )
60
+
61
+ // UART pins
62
+ const (
63
+ UART0_TX_PIN = GPIO0
64
+ UART0_RX_PIN = GPIO1
65
+ UART1_TX_PIN = GPIO4
66
+ UART1_RX_PIN = GPIO5
67
+ UART_TX_PIN = UART0_TX_PIN
68
+ UART_RX_PIN = UART0_RX_PIN
69
+ )
70
+
71
+ var DefaultUART = UART0
72
+
73
+ // USB identifiers
74
+ const (
75
+ usb_STRING_PRODUCT = "Tiny2350"
76
+ usb_STRING_MANUFACTURER = "Pimoroni"
77
+ )
78
+
79
+ var (
80
+ usb_VID uint16 = 0x2E8A
81
+ usb_PID uint16 = 0x000F
82
+ )
Original file line number Diff line number Diff line change
1
+ {
2
+ "inherits" : [
3
+ " rp2350"
4
+ ],
5
+ "build-tags" : [" tiny2350" ],
6
+ "serial-port" : [" 2e8a:000f" ]
7
+ }
You can’t perform that action at this time.
0 commit comments