github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/machine/board_esp32-coreboard-v2.go (about)

     1  //go:build esp32_coreboard_v2
     2  
     3  package machine
     4  
     5  const (
     6  	CLK  = GPIO6
     7  	CMD  = GPIO11
     8  	IO0  = GPIO0
     9  	IO1  = GPIO1
    10  	IO2  = GPIO2
    11  	IO3  = GPIO3
    12  	IO4  = GPIO4
    13  	IO5  = GPIO5
    14  	IO9  = GPIO9
    15  	IO10 = GPIO10
    16  	IO16 = GPIO16
    17  	IO17 = GPIO17
    18  	IO18 = GPIO18
    19  	IO19 = GPIO19
    20  	IO21 = GPIO21
    21  	IO22 = GPIO22
    22  	IO23 = GPIO23
    23  	IO25 = GPIO25
    24  	IO26 = GPIO26
    25  	IO27 = GPIO27
    26  	IO32 = GPIO32
    27  	IO33 = GPIO33
    28  	IO34 = GPIO34
    29  	IO35 = GPIO35
    30  	IO36 = GPIO36
    31  	IO39 = GPIO39
    32  	RXD  = GPIO3
    33  	SD0  = GPIO7
    34  	SD1  = GPIO8
    35  	SD2  = GPIO9
    36  	SD3  = GPIO10
    37  	SVN  = GPIO39
    38  	SVP  = GPIO36
    39  	TCK  = GPIO13
    40  	TD0  = GPIO15
    41  	TDI  = GPIO12
    42  	TMS  = GPIO14
    43  	TXD  = GPIO1
    44  )
    45  
    46  // Built-in LED on some ESP32 boards.
    47  const LED = IO2
    48  
    49  // SPI pins
    50  const (
    51  	SPI0_SCK_PIN = IO18
    52  	SPI0_SDO_PIN = IO23
    53  	SPI0_SDI_PIN = IO19
    54  	SPI0_CS0_PIN = IO5
    55  )
    56  
    57  // I2C pins
    58  const (
    59  	SDA_PIN = IO21
    60  	SCL_PIN = IO22
    61  )
    62  
    63  // ADC pins
    64  const (
    65  	ADC0 Pin = IO34
    66  	ADC1 Pin = IO35
    67  	ADC2 Pin = IO36
    68  	ADC3 Pin = IO39
    69  )
    70  
    71  // UART0 pins
    72  const (
    73  	UART_TX_PIN = IO1
    74  	UART_RX_PIN = IO3
    75  )
    76  
    77  // UART1 pins
    78  const (
    79  	UART1_TX_PIN = IO9
    80  	UART1_RX_PIN = IO10
    81  )
    82  
    83  // PWM pins
    84  const (
    85  	PWM0_PIN Pin = IO2
    86  	PWM1_PIN Pin = IO0
    87  	PWM2_PIN Pin = IO4
    88  )