aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2024-10-21 11:59:09 +0200
committerRon Evans <[email protected]>2024-10-22 11:21:48 +0100
commite615c253194aa6d64289ed4dffab9b1be8887e31 (patch)
treea824692e31e8f1c44f4d6e75ff3293db61922c90 /src
parentb2fbbeb771fab6eeafec00515940fe6d1d0614a7 (diff)
downloadtinygo-e615c253194aa6d64289ed4dffab9b1be8887e31.tar.gz
tinygo-e615c253194aa6d64289ed4dffab9b1be8887e31.zip
targets: add WaveShare ESP-C3-32S-Kit
I've had this board for a while now, but never added proper TinyGo support. So here is a PR to do just that.
Diffstat (limited to 'src')
-rw-r--r--src/machine/board_esp-c3-32s-kit.go40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/machine/board_esp-c3-32s-kit.go b/src/machine/board_esp-c3-32s-kit.go
new file mode 100644
index 000000000..09385aa3d
--- /dev/null
+++ b/src/machine/board_esp-c3-32s-kit.go
@@ -0,0 +1,40 @@
+//go:build esp_c3_32s_kit
+
+package machine
+
+// See:
+// * https://www.waveshare.com/w/upload/8/8f/Esp32-c3s_specification.pdf
+// * https://www.waveshare.com/w/upload/4/46/Nodemcu-esp-c3-32s-kit-schematics.pdf
+
+// Digital Pins
+const (
+ IO0 = GPIO0
+ IO1 = GPIO1
+ IO2 = GPIO2
+ IO3 = GPIO3
+ IO4 = GPIO4
+ IO5 = GPIO5
+ IO6 = GPIO6
+ IO7 = GPIO7
+ IO8 = GPIO8
+ IO9 = GPIO9
+ IO18 = GPIO18
+ IO19 = GPIO19
+)
+
+const (
+ LED_RED = IO3
+ LED_GREEN = IO4
+ LED_BLUE = IO5
+
+ LED = LED_RED
+
+ LED1 = LED_RED
+ LED2 = LED_GREEN
+)
+
+// I2C pins
+const (
+ SDA_PIN = NoPin
+ SCL_PIN = NoPin
+)