Skip to content

Commit

Permalink
add board: esp32c3-supermini
Browse files Browse the repository at this point in the history
  • Loading branch information
vaaski committed Jan 3, 2025
1 parent 0426a5f commit 5266530
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
2 changes: 2 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,8 @@ endif
ifneq ($(XTENSA), 0)
$(TINYGO) build -size short -o test.bin -target=esp32-mini32 examples/blinky1
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target=esp32-supermini examples/blinky1
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target=nodemcu examples/blinky1
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target m5stack-core2 examples/machinetest
Expand Down
56 changes: 56 additions & 0 deletions src/machine/board_esp32c3-supermini.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
//go:build esp32c3_supermini

// This file contains the pin mappings for the ESP32 supermini boards.
//
// - https://forum.arduino.cc/t/esp32-c3-supermini-pinout/1189850/7

package machine

// Digital Pins
const (
IO0 = GPIO0
IO1 = GPIO1
IO2 = GPIO2
IO3 = GPIO3
IO4 = GPIO4
IO5 = GPIO5
IO6 = GPIO6
IO7 = GPIO7
IO8 = GPIO8
IO9 = GPIO9
IO10 = GPIO10
IO20 = GPIO20
IO21 = GPIO21
)

// Built-in LED
const LED = GPIO8

// Analog pins
const (
A0 = GPIO0
A1 = GPIO1
A2 = GPIO2
A3 = GPIO3
A4 = GPIO4
A5 = GPIO5
)

// UART pins
const (
UART_RX_PIN = GPIO20
UART_TX_PIN = GPIO21
)

// I2C pins
const (
SDA_PIN = GPIO8
SCL_PIN = GPIO9
)

// SPI pins
const (
SPI_MISO_PIN = GPIO5
SPI_MOSI_PIN = GPIO6
SPI_SS_PIN = GPIO7
)
4 changes: 4 additions & 0 deletions targets/esp32c3-supermini.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"inherits": ["esp32c3"],
"build-tags": ["esp32c3_supermini"]
}

0 comments on commit 5266530

Please sign in to comment.