github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/machine/board_esp32-c3-devkit-rust-1.go (about) 1 //go:build esp32_c3_devkit_rust_1 2 3 // This file contains the pin mappings for the Espressif ESP32-C3 Development Board for Rust. 4 // 5 // The Espressif ESP32-C3-DevKit-RUST-1 development board is powered 6 // by the Espressif ESP32-C3 SoC featuring an open-source RISC-V architecture. 7 // 8 // Specifications: 9 // SoC: ESP32-C3-MINI-1, 4MB Flash, RISCV-32bit, 160MHz, 400KB SRAM 10 // Wireless: WiFi & Bluetooth 5.0 (BLE) 11 // ICM-42670-P 6-Axis IMU (I2C Addr 0x68) 12 // SHTC3 Humidity and Temperature Sensor (I2C Addr 0x70) 13 // WS2812B LED 14 15 // GitHub: https://github.com/esp-rs/esp-rust-board 16 // Schematic: https://github.com/esp-rs/esp-rust-board/blob/master/hardware/esp-rust-board/schematic/esp-rust-board.pdf 17 // Datasheet: https://www.espressif.com/sites/default/files/documentation/esp32-c3_datasheet_en.pdf 18 19 package machine 20 21 // Digital pins 22 const ( 23 // Pin // Function 24 // ----- // --------------- 25 D0 = GPIO0 // 26 D1 = GPIO1 // 27 D2 = GPIO2 // WS2812 28 D3 = GPIO3 // 29 D4 = GPIO4 // MTMS 30 D5 = GPIO5 // MTDI 31 D6 = GPIO6 // MTCK 32 D7 = GPIO7 // Red LED / MTDO 33 D8 = GPIO8 // I2C SCL 34 D9 = GPIO9 // Boot Button 35 D10 = GPIO10 // I2C SDA 36 D18 = GPIO18 // USB DM 37 D19 = GPIO19 // USB DP 38 D20 = GPIO20 // UART RX 39 D21 = GPIO21 // UART TX 40 ) 41 42 // Analog pins 43 const ( 44 A0 = GPIO0 45 A1 = GPIO1 46 A2 = GPIO2 47 A3 = GPIO3 48 A4 = GPIO4 49 A5 = GPIO5 50 ) 51 52 // Button pin 53 const ( 54 BUTTON = BUTTON_BOOT 55 BUTTON_BOOT = D9 56 ) 57 58 // LED pins 59 const ( 60 LED = LED_BUILTIN 61 WS2812 = D2 62 LED_BUILTIN = D7 63 ) 64 65 // I2C pins 66 const ( 67 I2C_SCL_PIN = D8 68 I2C_SDA_PIN = D10 69 ) 70 71 // USBCDC pins 72 const ( 73 USBCDC_DM_PIN = D18 74 USBCDC_DP_PIN = D19 75 ) 76 77 // UART pins 78 const ( 79 UART_RX_PIN = D20 80 UART_TX_PIN = D21 81 )