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

     1  // +build nrf,pca10040
     2  
     3  package machine
     4  
     5  // The PCA10040 has a low-frequency (32kHz) crystal oscillator on board.
     6  const HasLowFrequencyCrystal = true
     7  
     8  // LEDs on the PCA10040 (nRF52832 dev board)
     9  const (
    10  	LED  = LED1
    11  	LED1 = 17
    12  	LED2 = 18
    13  	LED3 = 19
    14  	LED4 = 20
    15  )
    16  
    17  // Buttons on the PCA10040 (nRF52832 dev board)
    18  const (
    19  	BUTTON  = BUTTON1
    20  	BUTTON1 = 13
    21  	BUTTON2 = 14
    22  	BUTTON3 = 15
    23  	BUTTON4 = 16
    24  )
    25  
    26  // UART pins for NRF52840-DK
    27  const (
    28  	UART_TX_PIN = 6
    29  	UART_RX_PIN = 8
    30  )
    31  
    32  // ADC pins
    33  const (
    34  	ADC0 = 3
    35  	ADC1 = 4
    36  	ADC2 = 28
    37  	ADC3 = 29
    38  	ADC4 = 30
    39  	ADC5 = 31
    40  )
    41  
    42  // I2C pins
    43  const (
    44  	SDA_PIN = 26
    45  	SCL_PIN = 27
    46  )
    47  
    48  // SPI pins
    49  const (
    50  	SPI0_SCK_PIN  = 25
    51  	SPI0_MOSI_PIN = 23
    52  	SPI0_MISO_PIN = 24
    53  )