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

     1  //go:build pca10056
     2  
     3  package machine
     4  
     5  const HasLowFrequencyCrystal = true
     6  
     7  // LEDs on the pca10056
     8  const (
     9  	LED1 Pin = 13
    10  	LED2 Pin = 14
    11  	LED3 Pin = 15
    12  	LED4 Pin = 16
    13  	LED  Pin = LED1
    14  )
    15  
    16  // Buttons on the pca10056
    17  const (
    18  	BUTTON1 Pin = 11
    19  	BUTTON2 Pin = 12
    20  	BUTTON3 Pin = 24
    21  	BUTTON4 Pin = 25
    22  	BUTTON  Pin = BUTTON1
    23  )
    24  
    25  var DefaultUART = UART0
    26  
    27  // UART pins
    28  const (
    29  	UART_TX_PIN Pin = 6
    30  	UART_RX_PIN Pin = 8
    31  )
    32  
    33  // ADC pins
    34  const (
    35  	ADC0 Pin = 3
    36  	ADC1 Pin = 4
    37  	ADC2 Pin = 28
    38  	ADC3 Pin = 29
    39  	ADC4 Pin = 30
    40  	ADC5 Pin = 31
    41  )
    42  
    43  // I2C pins
    44  const (
    45  	SDA_PIN Pin = 26 // P0.26
    46  	SCL_PIN Pin = 27 // P0.27
    47  )
    48  
    49  // SPI pins
    50  const (
    51  	SPI0_SCK_PIN Pin = 47 // P1.15
    52  	SPI0_SDO_PIN Pin = 45 // P1.13
    53  	SPI0_SDI_PIN Pin = 46 // P1.14
    54  )
    55  
    56  // USB CDC identifiers
    57  const (
    58  	usb_STRING_PRODUCT      = "Nordic nRF52840DK (PCA10056)"
    59  	usb_STRING_MANUFACTURER = "Nordic Semiconductor"
    60  )
    61  
    62  var (
    63  	usb_VID uint16 = 0x239A
    64  	usb_PID uint16 = 0x8029
    65  )