github.com/aykevl/tinygo@v0.5.0/src/machine/board_bluepill.go (about)

     1  // +build stm32,bluepill
     2  
     3  package machine
     4  
     5  // https://wiki.stm32duino.com/index.php?title=File:Bluepillpinout.gif
     6  const (
     7  	PA0  = portA + 0
     8  	PA1  = portA + 1
     9  	PA2  = portA + 2
    10  	PA3  = portA + 3
    11  	PA4  = portA + 4
    12  	PA5  = portA + 5
    13  	PA6  = portA + 6
    14  	PA7  = portA + 7
    15  	PA8  = portA + 8
    16  	PA9  = portA + 9
    17  	PA10 = portA + 10
    18  	PA11 = portA + 11
    19  	PA12 = portA + 12
    20  	PA13 = portA + 13
    21  	PA14 = portA + 14
    22  	PA15 = portA + 15
    23  	PB0  = portB + 0
    24  	PB1  = portB + 1
    25  	PB2  = portB + 2
    26  	PB3  = portB + 3
    27  	PB4  = portB + 4
    28  	PB5  = portB + 5
    29  	PB6  = portB + 6
    30  	PB7  = portB + 7
    31  	PB8  = portB + 8
    32  	PB9  = portB + 9
    33  	PB10 = portB + 10
    34  	PB11 = portB + 11
    35  	PB12 = portB + 12
    36  	PB13 = portB + 13
    37  	PB14 = portB + 14
    38  	PB15 = portB + 15
    39  	PC13 = portC + 13
    40  	PC14 = portC + 14
    41  	PC15 = portC + 15
    42  )
    43  
    44  const (
    45  	LED = PC13
    46  )
    47  
    48  // UART pins
    49  const (
    50  	UART_TX_PIN = PA9
    51  	UART_RX_PIN = PA10
    52  )
    53  
    54  // SPI pins
    55  const (
    56  	SPI0_SCK_PIN  = PA5
    57  	SPI0_MOSI_PIN = PA7
    58  	SPI0_MISO_PIN = PA6
    59  )
    60  
    61  // I2C pins
    62  const (
    63  	SDA_PIN = PB7
    64  	SCL_PIN = PB6
    65  )