github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/machine/board_makerfabs-esp32c3spi35.go (about) 1 //go:build makerfabs_esp32c3spi35 2 3 // This file contains the pin mappings for the Makerfabs ESP32C3SPI35 board. 4 // 5 // The Makerfabs ESP32C3SPI35 is an LCD Touchscreen development board powered 6 // by the Espressif ESP32-C3 SoC featuring an open-source RISC-V architecture. 7 // 8 // Specifications: 9 // SoC: ESP32-C3-MINI-1-N4, 4MB Flash, RISCV-32bit, 160MHz, 400KB SRAM 10 // Wireless: WiFi & Bluetooth 5.0 (BLE) 11 // LCD: 3.5inch TFT LCD (480x320) 12 // LCD Driver: ILI9488 SPI 13 // Touch Panel: Capacitive 14 // Touch Panel Driver: FT6236 15 // MicroSD Card Slot 16 // Mabee Interface 17 // Dual USB Type-C (one for USB-to-UART and one for native USB) 18 // 19 // Website: https://www.makerfabs.com/ep32-c3-risc-v-spi-tft-touch.html 20 // Wiki: https://wiki.makerfabs.com/ESP32_C3_SPI_3.5_TFT_with_Touch.html 21 // GitHub: https://github.com/Makerfabs/Makerfabs-ESP32-C3-SPI-TFT-with-Touch 22 // Schematic: https://github.com/Makerfabs/Makerfabs-ESP32-C3-SPI-TFT-with-Touch/raw/main/Hardware/ESP32-C3%20TFT%20Touch%20v1.1(3.5''%20ili9488).PDF 23 // Datasheet: https://www.espressif.com/sites/default/files/documentation/esp32-c3-mini-1_datasheet_en.pdf 24 25 package machine 26 27 // Digital pins 28 const ( 29 // Pin // Function 30 // ----- // --------------------- 31 D0 = GPIO0 // Touchscreen CS 32 D1 = GPIO1 // MicroSD CS 33 D2 = GPIO2 // I2C SDA 34 D3 = GPIO3 // I2C SCL 35 D4 = GPIO4 // SPI CS 36 D5 = GPIO5 // SPI SCK 37 D6 = GPIO6 // SPI SDO 38 D7 = GPIO7 // SPI SDI 39 D8 = GPIO8 // Touchscreen Backlight 40 D9 = GPIO9 // Boot Button 41 D10 = GPIO10 // TFT D/C 42 D18 = GPIO18 // USB DM 43 D19 = GPIO19 // USB DP 44 D20 = GPIO20 // UART RX 45 D21 = GPIO21 // UART TX 46 ) 47 48 // Button pin 49 const ( 50 BUTTON = BUTTON_BOOT 51 BUTTON_BOOT = D9 52 ) 53 54 // TFT pins 55 const ( 56 TFT_BL_PIN = D8 57 TFT_CS_PIN = SPI_CS_PIN 58 TFT_DC_PIN = D10 59 TFT_SCK_PIN = SPI_SCK_PIN 60 TFT_SDI_PIN = SPI_SDI_PIN 61 TFT_SDO_PIN = SPI_SDO_PIN 62 ) 63 64 // Touchscreen pins 65 const ( 66 TS_CS_PIN = D0 67 TS_SDA_PIN = I2C_SDA_PIN 68 TS_SCL_PIN = I2C_SCL_PIN 69 ) 70 71 // MicroSD pins 72 const ( 73 SD_CS_PIN = D1 74 SD_SCK_PIN = SPI_SCK_PIN 75 SD_SDI_PIN = SPI_SDI_PIN 76 SD_SDO_PIN = SPI_SDO_PIN 77 ) 78 79 // USBCDC pins 80 const ( 81 USBCDC_DM_PIN = D18 82 USBCDC_DP_PIN = D19 83 ) 84 85 // UART pins 86 const ( 87 UART_RX_PIN = D20 88 UART_TX_PIN = D21 89 ) 90 91 // I2C pins 92 const ( 93 I2C_SDA_PIN = D2 94 I2C_SCL_PIN = D3 95 ) 96 97 // SPI pins 98 const ( 99 SPI_CS_PIN = D4 100 SPI_SCK_PIN = D5 101 SPI_SDI_PIN = D7 102 SPI_SDO_PIN = D6 103 )