aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2024-10-21 10:59:34 +0200
committerRon Evans <[email protected]>2024-10-22 09:23:31 +0100
commitb2fbbeb771fab6eeafec00515940fe6d1d0614a7 (patch)
tree694d7ae077157c7153b5d3e6e963f0be3fddf640
parentbcfe751f62302cbb17f11236dc03775122ab6974 (diff)
downloadtinygo-b2fbbeb771fab6eeafec00515940fe6d1d0614a7.tar.gz
tinygo-b2fbbeb771fab6eeafec00515940fe6d1d0614a7.zip
esp32c3: add smoke tests for a few boards
These boards probably haven't been working since the addition of I2C, because they were missing some constants in the machine package.
-rw-r--r--GNUmakefile6
-rw-r--r--src/machine/board_esp32-c3-devkit-rust-1.go4
-rw-r--r--src/machine/board_esp32c3-12f.go6
-rw-r--r--src/machine/board_makerfabs-esp32c3spi35.go8
4 files changed, 18 insertions, 6 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 110ab5463..75725d08c 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -841,6 +841,12 @@ endif
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target=xiao-esp32c3 examples/machinetest
@$(MD5SUM) test.bin
+ $(TINYGO) build -size short -o test.bin -target=esp32-c3-devkit-rust-1 examples/blinky1
+ @$(MD5SUM) test.bin
+ $(TINYGO) build -size short -o test.bin -target=esp32c3-12f examples/blinky1
+ @$(MD5SUM) test.bin
+ $(TINYGO) build -size short -o test.bin -target=makerfabs-esp32c3spi35 examples/machinetest
+ @$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.hex -target=hifive1b examples/blinky1
@$(MD5SUM) test.hex
$(TINYGO) build -size short -o test.hex -target=maixbit examples/blinky1
diff --git a/src/machine/board_esp32-c3-devkit-rust-1.go b/src/machine/board_esp32-c3-devkit-rust-1.go
index 3cba69d1b..8e47269f9 100644
--- a/src/machine/board_esp32-c3-devkit-rust-1.go
+++ b/src/machine/board_esp32-c3-devkit-rust-1.go
@@ -64,8 +64,8 @@ const (
// I2C pins
const (
- I2C_SCL_PIN = D8
- I2C_SDA_PIN = D10
+ SCL_PIN = D8
+ SDA_PIN = D10
)
// USBCDC pins
diff --git a/src/machine/board_esp32c3-12f.go b/src/machine/board_esp32c3-12f.go
index df28915a4..f023bb9d6 100644
--- a/src/machine/board_esp32c3-12f.go
+++ b/src/machine/board_esp32c3-12f.go
@@ -46,3 +46,9 @@ const (
UART_TX_PIN = TXD
UART_RX_PIN = RXD
)
+
+// I2C pins
+const (
+ SCL_PIN = NoPin
+ SDA_PIN = NoPin
+)
diff --git a/src/machine/board_makerfabs-esp32c3spi35.go b/src/machine/board_makerfabs-esp32c3spi35.go
index 8e4401f5f..6e4e6f4be 100644
--- a/src/machine/board_makerfabs-esp32c3spi35.go
+++ b/src/machine/board_makerfabs-esp32c3spi35.go
@@ -64,8 +64,8 @@ const (
// Touchscreen pins
const (
TS_CS_PIN = D0
- TS_SDA_PIN = I2C_SDA_PIN
- TS_SCL_PIN = I2C_SCL_PIN
+ TS_SDA_PIN = SDA_PIN
+ TS_SCL_PIN = SCL_PIN
)
// MicroSD pins
@@ -90,8 +90,8 @@ const (
// I2C pins
const (
- I2C_SDA_PIN = D2
- I2C_SCL_PIN = D3
+ SDA_PIN = D2
+ SCL_PIN = D3
)
// SPI pins