github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/machine/board_qtpy_esp32c3.go (about) 1 //go:build qtpy_esp32c3 2 3 // This file contains the pin mappings for the Adafruit QtPy ESP32C3 boards. 4 // 5 // https://learn.adafruit.com/adafruit-qt-py-esp32-c3-wifi-dev-board/pinouts 6 package machine 7 8 // Digital Pins 9 const ( 10 D0 = GPIO4 11 D1 = GPIO3 12 D2 = GPIO1 13 D3 = GPIO0 14 ) 15 16 // Analog pins (ADC1) 17 const ( 18 A0 = GPIO4 19 A1 = GPIO3 20 A2 = GPIO1 21 A3 = GPIO0 22 ) 23 24 // UART pins 25 const ( 26 RX_PIN = GPIO20 27 TX_PIN = GPIO21 28 29 UART_RX_PIN = RX_PIN 30 UART_TX_PIN = TX_PIN 31 ) 32 33 // I2C pins 34 const ( 35 SDA_PIN = GPIO5 36 SCL_PIN = GPIO6 37 38 I2C0_SDA_PIN = SDA_PIN 39 I2C0_SCL_PIN = SCL_PIN 40 ) 41 42 // SPI pins 43 const ( 44 SCK_PIN = GPIO10 45 MI_PIN = GPIO8 46 MO_PIN = GPIO7 47 48 SPI_SCK_PIN = SCK_PIN 49 SPI_SDI_PIN = MI_PIN 50 SPI_SDO_PIN = MO_PIN 51 ) 52 53 const ( 54 NEOPIXEL = GPIO2 55 WS2812 = GPIO2 56 57 // also used for boot button. 58 // set it to be an input-with-pullup 59 BUTTON = GPIO9 60 )