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

     1  //go:build trinkey_qt2040
     2  
     3  // This file contains the pin mappings for the Adafruit Trinkey QT2040 board.
     4  //
     5  // The Trinkey QT2040 is a small development board based on the RP2040 which
     6  // plugs into a USB A port. The board has a minimal pinout: an integrated
     7  // NeoPixel LED and a STEMMA QT I2C port.
     8  //
     9  // - Product:    https://www.adafruit.com/product/5056
    10  // - Overview:   https://learn.adafruit.com/adafruit-trinkey-qt2040
    11  // - Pinouts:    https://learn.adafruit.com/adafruit-trinkey-qt2040/pinouts
    12  // - Datasheets: https://learn.adafruit.com/adafruit-trinkey-qt2040/downloads
    13  
    14  package machine
    15  
    16  // Onboard crystal oscillator frequency, in MHz
    17  const xoscFreq = 12 // MHz
    18  
    19  // Onboard LEDs
    20  const (
    21  	NEOPIXEL = GPIO27
    22  	WS2812   = NEOPIXEL
    23  )
    24  
    25  // I2C pins
    26  const (
    27  	I2C0_SDA_PIN = GPIO16
    28  	I2C0_SCL_PIN = GPIO17
    29  
    30  	I2C1_SDA_PIN = NoPin
    31  	I2C1_SCL_PIN = NoPin
    32  )
    33  
    34  // SPI pins
    35  const (
    36  	SPI0_SCK_PIN = NoPin
    37  	SPI0_SDO_PIN = NoPin
    38  	SPI0_SDI_PIN = NoPin
    39  
    40  	SPI1_SCK_PIN = NoPin
    41  	SPI1_SDO_PIN = NoPin
    42  	SPI1_SDI_PIN = NoPin
    43  )
    44  
    45  // UART pins
    46  const (
    47  	UART0_TX_PIN = NoPin
    48  	UART0_RX_PIN = NoPin
    49  	UART_TX_PIN  = UART0_TX_PIN
    50  	UART_RX_PIN  = UART0_RX_PIN
    51  )
    52  
    53  // USB identifiers
    54  const (
    55  	usb_STRING_PRODUCT      = "Trinkey QT2040"
    56  	usb_STRING_MANUFACTURER = "Adafruit"
    57  )
    58  
    59  var (
    60  	usb_VID uint16 = 0x239a
    61  	usb_PID uint16 = 0x8109
    62  )