mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 19:17:47 +00:00
Add nrf52840-mdk-usb-dongle target (#1654)
machine/nrf52840: add support for nrf52840-mdk-usb-dongle target
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
// +build nrf52840_mdk_usb_dongle
|
||||
|
||||
package machine
|
||||
|
||||
const HasLowFrequencyCrystal = true
|
||||
|
||||
// LEDs on the nrf52840-mdk-usb-dongle
|
||||
const (
|
||||
LED Pin = LED_GREEN
|
||||
LED_GREEN Pin = 22
|
||||
LED_RED Pin = 23
|
||||
LED_BLUE Pin = 24
|
||||
)
|
||||
|
||||
// RESET/USR button, depending on value of PSELRESET UICR register
|
||||
const (
|
||||
BUTTON Pin = 18
|
||||
)
|
||||
|
||||
// UART pins
|
||||
const (
|
||||
UART_TX_PIN Pin = NoPin
|
||||
UART_RX_PIN Pin = NoPin
|
||||
)
|
||||
|
||||
// UART0 is the USB device
|
||||
var (
|
||||
UART0 = USB
|
||||
)
|
||||
|
||||
// I2C pins (unused)
|
||||
const (
|
||||
SDA_PIN = NoPin
|
||||
SCL_PIN = NoPin
|
||||
)
|
||||
|
||||
// SPI pins (unused)
|
||||
const (
|
||||
SPI0_SCK_PIN = NoPin
|
||||
SPI0_SDO_PIN = NoPin
|
||||
SPI0_SDI_PIN = NoPin
|
||||
)
|
||||
|
||||
// USB CDC identifiers
|
||||
const (
|
||||
usb_STRING_PRODUCT = "Makerdiary nRF52840 MDK USB Dongle"
|
||||
usb_STRING_MANUFACTURER = "Makerdiary"
|
||||
)
|
||||
|
||||
var (
|
||||
usb_VID uint16 = 0x1915
|
||||
usb_PID uint16 = 0xCAFE
|
||||
)
|
||||
@@ -38,7 +38,7 @@ const (
|
||||
|
||||
// USB CDC identifiers
|
||||
const (
|
||||
usb_STRING_PRODUCT = "Makerdiary nRF52840 MDK USB Dongle"
|
||||
usb_STRING_PRODUCT = "Makerdiary nRF52840 MDK"
|
||||
usb_STRING_MANUFACTURER = "Makerdiary"
|
||||
)
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"inherits": ["nrf52840"],
|
||||
"build-tags": ["nrf52840_mdk_usb_dongle", "nrf52840_reset_uf2", "softdevice", "s140v6"],
|
||||
"flash-1200-bps-reset": "true",
|
||||
"flash-method": "msd",
|
||||
"msd-volume-name": "MDK-DONGLE",
|
||||
"msd-firmware-name": "firmware.uf2",
|
||||
"uf2-family-id": "0xADA52840",
|
||||
"linkerscript": "targets/circuitplay-bluefruit.ld"
|
||||
}
|
||||
Reference in New Issue
Block a user