github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/machine/board_particle_xenon.go (about) 1 //go:build particle_xenon 2 3 package machine 4 5 const HasLowFrequencyCrystal = true 6 7 // More info: https://docs.particle.io/datasheets/discontinued/xenon-datasheet/ 8 // Board diagram: https://docs.particle.io/assets/images/xenon/xenon-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 // Other peripherals 76 const ( 77 MODE_BUTTON_PIN Pin = 11 78 CHARGE_STATUS_PIN Pin = 41 79 LIPO_VOLTAGE_PIN Pin = 5 80 PCB_ANTENNA_PIN Pin = 24 81 EXTERNAL_UFL_PIN Pin = 25 82 NFC1_PIN Pin = 9 83 NFC2_PIN Pin = 10 84 ) 85 86 // USB CDC identifiers 87 const ( 88 usb_STRING_PRODUCT = "Xenon" 89 usb_STRING_MANUFACTURER = "Particle" 90 ) 91 92 var ( 93 usb_VID uint16 = 0x2B04 94 usb_PID uint16 = 0xD00E 95 )