github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/machine/board_xiao-esp32c3.go (about)

     1  //go:build xiao_esp32c3
     2  
     3  // This file contains the pin mappings for the Seeed XIAO ESP32C3 boards.
     4  //
     5  // Seeed Studio XIAO ESP32C3 is an IoT mini development board based on
     6  // the Espressif ESP32-C3 WiFi/Bluetooth dual-mode chip.
     7  //
     8  // - https://www.seeedstudio.com/Seeed-XIAO-ESP32C3-p-5431.html
     9  // - https://wiki.seeedstudio.com/XIAO_ESP32C3_Getting_Started/
    10  
    11  package machine
    12  
    13  // Digital Pins
    14  const (
    15  	D0  = GPIO2
    16  	D1  = GPIO3
    17  	D2  = GPIO4
    18  	D3  = GPIO5
    19  	D4  = GPIO6
    20  	D5  = GPIO7
    21  	D6  = GPIO21
    22  	D7  = GPIO20
    23  	D8  = GPIO8
    24  	D9  = GPIO9
    25  	D10 = GPIO10
    26  )
    27  
    28  // Analog pins
    29  const (
    30  	A0 = GPIO2
    31  	A1 = GPIO3
    32  	A2 = GPIO4
    33  	A3 = GPIO5
    34  )
    35  
    36  // UART pins
    37  const (
    38  	UART_RX_PIN = GPIO20
    39  	UART_TX_PIN = GPIO21
    40  )
    41  
    42  // I2C pins
    43  const (
    44  	SDA_PIN = GPIO6
    45  	SCL_PIN = GPIO7
    46  )
    47  
    48  // SPI pins
    49  const (
    50  	SPI_SCK_PIN = GPIO8
    51  	SPI_SDI_PIN = GPIO9
    52  	SPI_SDO_PIN = GPIO10
    53  )