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

     1  //go:build particle_argon
     2  
     3  package machine
     4  
     5  const HasLowFrequencyCrystal = true
     6  
     7  // More info: https://docs.particle.io/datasheets/wi-fi/argon-datasheet/
     8  // Board diagram: https://docs.particle.io/assets/images/argon/argon-block-diagram.png
     9  
    10  // GPIOs
    11  const (
    12  	A0  Pin = 3
    13  	A1  Pin = 4
    14  	A2  Pin = 28
    15  	A3  Pin = 29
    16  	A4  Pin = 30
    17  	A5  Pin = 31
    18  	D0  Pin = 26 // Also SDA
    19  	D1  Pin = 27 // Also SCL
    20  	D2  Pin = 33
    21  	D3  Pin = 34
    22  	D4  Pin = 40
    23  	D5  Pin = 42
    24  	D6  Pin = 43
    25  	D7  Pin = 44 // Also LED
    26  	D8  Pin = 35
    27  	D9  Pin = 6  // Also TX
    28  	D10 Pin = 8  // Also RX
    29  	D11 Pin = 46 // Also SDI
    30  	D12 Pin = 45 // Also SDO
    31  	D13 Pin = 47 // Also SCK
    32  )
    33  
    34  // LEDs
    35  const (
    36  	LED       Pin = 44
    37  	LED_GREEN Pin = 14
    38  	LED_RED   Pin = 13
    39  	LED_BLUE  Pin = 15
    40  )
    41  
    42  // UART
    43  var (
    44  	DefaultUART = UART0
    45  )
    46  
    47  const (
    48  	UART_TX_PIN Pin = 6
    49  	UART_RX_PIN Pin = 8
    50  )
    51  
    52  // I2C pins
    53  const (
    54  	SDA_PIN Pin = 26
    55  	SCL_PIN Pin = 27
    56  )
    57  
    58  // SPI pins
    59  const (
    60  	SPI0_SCK_PIN Pin = 47
    61  	SPI0_SDO_PIN Pin = 45
    62  	SPI0_SDI_PIN Pin = 46
    63  )
    64  
    65  // Internal 4MB SPI Flash
    66  const (
    67  	SPI1_SCK_PIN  Pin = 19
    68  	SPI1_SDO_PIN  Pin = 20
    69  	SPI1_SDI_PIN  Pin = 21
    70  	SPI1_CS_PIN   Pin = 17
    71  	SPI1_WP_PIN   Pin = 22
    72  	SPI1_HOLD_PIN Pin = 23
    73  )
    74  
    75  // ESP32 coprocessor
    76  const (
    77  	ESP32_TXD_PIN       Pin = 36
    78  	ESP32_RXD_PIN       Pin = 37
    79  	ESP32_CTS_PIN       Pin = 39
    80  	ESP32_RTS_PIN       Pin = 38
    81  	ESP32_BOOT_MODE_PIN Pin = 16
    82  	ESP32_WIFI_EN_PIN   Pin = 24
    83  	ESP32_HOST_WK_PIN   Pin = 7
    84  )
    85  
    86  // Other peripherals
    87  const (
    88  	MODE_BUTTON_PIN   Pin = 11
    89  	CHARGE_STATUS_PIN Pin = 41
    90  	LIPO_VOLTAGE_PIN  Pin = 5
    91  	PCB_ANTENNA_PIN   Pin = 2
    92  	EXTERNAL_UFL_PIN  Pin = 25
    93  	NFC1_PIN          Pin = 9
    94  	NFC2_PIN          Pin = 10
    95  )
    96  
    97  // USB CDC identifiers
    98  const (
    99  	usb_STRING_PRODUCT      = "Argon"
   100  	usb_STRING_MANUFACTURER = "Particle"
   101  )
   102  
   103  var (
   104  	usb_VID uint16 = 0x2B04
   105  	usb_PID uint16 = 0xD00C
   106  )