From fd1785ed2d6e90d183cfd0806d7b0e39701800d1 Mon Sep 17 00:00:00 2001 From: Wojtek Siudzinski Date: Fri, 14 Feb 2020 17:17:05 +0100 Subject: [PATCH] Add Particle Xenon --- src/machine/board_particle_xenon.go | 43 +++++++++++++++++++++++++++++ targets/particle-xenon.json | 6 ++++ 2 files changed, 49 insertions(+) create mode 100644 src/machine/board_particle_xenon.go create mode 100644 targets/particle-xenon.json diff --git a/src/machine/board_particle_xenon.go b/src/machine/board_particle_xenon.go new file mode 100644 index 00000000..0fb7eab7 --- /dev/null +++ b/src/machine/board_particle_xenon.go @@ -0,0 +1,43 @@ +// +build particle_xenon + +package machine + +const HasLowFrequencyCrystal = true + +// LEDs on the XENON +const ( + LED Pin = 44 + LED_GREEN Pin = 14 + LED_RED Pin = 13 + LED_BLUE Pin = 15 +) + +// UART pins +const ( + UART_TX_PIN Pin = 6 + UART_RX_PIN Pin = 8 +) + +// I2C pins +const ( + SDA_PIN = 26 + SCL_PIN = 27 +) + +// SPI pins +const ( + SPI0_SCK_PIN = 47 + SPI0_MOSI_PIN = 45 + SPI0_MISO_PIN = 46 +) + +// Other periferals +const ( + MODE_BUTTON = 11 + CHARGE_STATUS = 41 + LIPO_VOLTAGE = 5 + PCB_ANTENNA = 24 + EXTERNAL_UFL = 25 + NFC1 = 9 + NFC2 = 10 +) \ No newline at end of file diff --git a/targets/particle-xenon.json b/targets/particle-xenon.json new file mode 100644 index 00000000..e6566ae7 --- /dev/null +++ b/targets/particle-xenon.json @@ -0,0 +1,6 @@ +{ + "inherits": ["nrf52840_mdk"], + "build-tags": ["particle_xenon"], + "flash-method": "openocd", + "openocd-interface": "cmsis-dap" +}