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

     1  //go:build adafruit_esp32_feather_v2
     2  
     3  package machine
     4  
     5  const GPIO20 Pin = 20
     6  
     7  const (
     8  	IO0  = GPIO0
     9  	IO2  = GPIO2
    10  	IO4  = GPIO4
    11  	IO5  = GPIO5
    12  	IO7  = GPIO7
    13  	IO8  = GPIO8
    14  	IO12 = GPIO12
    15  	IO13 = GPIO13
    16  	IO14 = GPIO14
    17  	IO15 = GPIO15
    18  	IO19 = GPIO19
    19  	IO20 = GPIO20
    20  	IO21 = GPIO21
    21  	IO22 = GPIO22
    22  	IO25 = GPIO25
    23  	IO26 = GPIO26
    24  	IO27 = GPIO27
    25  	IO32 = GPIO32
    26  	IO33 = GPIO33
    27  	IO34 = GPIO34
    28  	IO35 = GPIO35
    29  	IO36 = GPIO36
    30  	IO37 = GPIO37
    31  	IO38 = GPIO38
    32  	IO39 = GPIO39
    33  )
    34  
    35  // Digital pins
    36  const (
    37  	D12 = IO12
    38  	D13 = IO13
    39  	D14 = IO14
    40  	D15 = IO15
    41  	D27 = IO27
    42  	D32 = IO32
    43  	D33 = IO33
    44  	D37 = IO37
    45  )
    46  
    47  // Analog pins
    48  const (
    49  	A0 = IO26
    50  	A1 = IO25
    51  	A2 = IO34
    52  	A3 = IO39
    53  	A4 = IO36
    54  	A5 = IO4
    55  )
    56  
    57  // Built-in LEDs and Button
    58  const (
    59  	WS2812             = IO0
    60  	NEOPIXEL           = WS2812
    61  	NEOPIXEL_I2C_POWER = IO2
    62  	LED                = IO13
    63  	BUTTON             = IO38
    64  )
    65  
    66  // SPI pins
    67  const (
    68  	SPI_SCK_PIN  = IO5
    69  	SPI_MOSI_PIN = IO19
    70  	SPI_MISO_PIN = IO21
    71  
    72  	SPI_SDO_PIN = SPI_MOSI_PIN
    73  	SPI_SDI_PIN = SPI_MISO_PIN
    74  
    75  	// Silk labels
    76  	SCK = SPI_SCK_PIN
    77  	MO  = SPI_MOSI_PIN
    78  	MI  = SPI_MISO_PIN
    79  )
    80  
    81  // I2C pins
    82  const (
    83  	I2C_SCL_PIN = IO20
    84  	I2C_SDA_PIN = IO22
    85  
    86  	// Silk labels
    87  	SCL = I2C_SCL_PIN
    88  	SDA = I2C_SDA_PIN
    89  )
    90  
    91  // ADC pins
    92  const (
    93  	ADC1_0 = IO36
    94  	ADC1_1 = IO37
    95  	ADC1_2 = IO38
    96  	ADC1_3 = IO39
    97  	ADC1_4 = IO32
    98  	ADC1_5 = IO33
    99  	ADC1_6 = IO34
   100  	ADC1_7 = IO35
   101  
   102  	ADC2_0 = IO4
   103  	ADC2_1 = IO0
   104  	ADC2_2 = IO2
   105  	ADC2_3 = IO15
   106  	ADC2_4 = IO13
   107  	ADC2_5 = IO12
   108  	ADC2_6 = IO14
   109  	ADC2_7 = IO27
   110  	ADC2_8 = IO25
   111  	ADC2_9 = IO26
   112  )
   113  
   114  // UART pins
   115  const (
   116  	UART_TX_PIN = IO19
   117  	UART_RX_PIN = IO22
   118  
   119  	UART2_TX_PIN = IO8
   120  	UART2_RX_PIN = IO7
   121  
   122  	// Silk labels
   123  	RX = UART2_RX_PIN
   124  	TX = UART2_TX_PIN
   125  )