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

     1  //go:build 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  	LED1 Pin = 17
    11  	LED2 Pin = 18
    12  	LED3 Pin = 19
    13  	LED4 Pin = 20
    14  	LED  Pin = LED1
    15  )
    16  
    17  // Buttons on the PCA10040 (nRF52832 dev board)
    18  const (
    19  	BUTTON1 Pin = 13
    20  	BUTTON2 Pin = 14
    21  	BUTTON3 Pin = 15
    22  	BUTTON4 Pin = 16
    23  	BUTTON  Pin = BUTTON1
    24  )
    25  
    26  var DefaultUART = UART0
    27  
    28  // UART pins for NRF52840-DK
    29  const (
    30  	UART_TX_PIN Pin = 6
    31  	UART_RX_PIN Pin = 8
    32  )
    33  
    34  // ADC pins
    35  const (
    36  	ADC0 Pin = 3
    37  	ADC1 Pin = 4
    38  	ADC2 Pin = 28
    39  	ADC3 Pin = 29
    40  	ADC4 Pin = 30
    41  	ADC5 Pin = 31
    42  )
    43  
    44  // I2C pins
    45  const (
    46  	SDA_PIN Pin = 26
    47  	SCL_PIN Pin = 27
    48  )
    49  
    50  // SPI pins
    51  const (
    52  	SPI0_SCK_PIN Pin = 25
    53  	SPI0_SDO_PIN Pin = 23
    54  	SPI0_SDI_PIN Pin = 24
    55  )