Skip to content

Commit 4f39be9

Browse files
authored
targets: esp32c3-supermini (#4518)
1 parent 7305a44 commit 4f39be9

File tree

3 files changed

+63
-0
lines changed

3 files changed

+63
-0
lines changed

GNUmakefile

+2
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,8 @@ endif
828828
ifneq ($(XTENSA), 0)
829829
$(TINYGO) build -size short -o test.bin -target=esp32-mini32 examples/blinky1
830830
@$(MD5SUM) test.bin
831+
$(TINYGO) build -size short -o test.bin -target=esp32c3-supermini examples/blinky1
832+
@$(MD5SUM) test.bin
831833
$(TINYGO) build -size short -o test.bin -target=nodemcu examples/blinky1
832834
@$(MD5SUM) test.bin
833835
$(TINYGO) build -size short -o test.bin -target m5stack-core2 examples/machinetest
+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
//go:build esp32c3_supermini
2+
3+
// This file contains the pin mappings for the ESP32 supermini boards.
4+
//
5+
// - https://web.archive.org/web/20240805232453/https://dl.artronshop.co.th/ESP32-C3%20SuperMini%20datasheet.pdf
6+
7+
package machine
8+
9+
// Digital Pins
10+
const (
11+
IO0 = GPIO0
12+
IO1 = GPIO1
13+
IO2 = GPIO2
14+
IO3 = GPIO3
15+
IO4 = GPIO4
16+
IO5 = GPIO5
17+
IO6 = GPIO6
18+
IO7 = GPIO7
19+
IO8 = GPIO8
20+
IO9 = GPIO9
21+
IO10 = GPIO10
22+
IO20 = GPIO20
23+
IO21 = GPIO21
24+
)
25+
26+
// Built-in LED
27+
const LED = GPIO8
28+
29+
// Analog pins
30+
const (
31+
A0 = GPIO0
32+
A1 = GPIO1
33+
A2 = GPIO2
34+
A3 = GPIO3
35+
A4 = GPIO4
36+
A5 = GPIO5
37+
)
38+
39+
// UART pins
40+
const (
41+
UART_RX_PIN = GPIO20
42+
UART_TX_PIN = GPIO21
43+
)
44+
45+
// I2C pins
46+
const (
47+
SDA_PIN = GPIO8
48+
SCL_PIN = GPIO9
49+
)
50+
51+
// SPI pins
52+
const (
53+
SPI_MISO_PIN = GPIO5
54+
SPI_MOSI_PIN = GPIO6
55+
SPI_SS_PIN = GPIO7
56+
SPI_SCK_PIN = GPIO4
57+
)

targets/esp32c3-supermini.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"inherits": ["esp32c3"],
3+
"build-tags": ["esp32c3_supermini"]
4+
}

0 commit comments

Comments
 (0)