Merge pull request #692 from adafruit/add-led-glasses-driver

Add led glasses driver
This commit is contained in:
Ha Thach authored and GitHub committed 2021-09-11 13:06:38 +07:00
commit 99c3a608c2
41 files changed
+41417 -29253

No files matched your search

+1 -1
View File
@@ -11,12 +11,12 @@ This repository contains the Arduino BSP for Adafruit Bluefruit nRF52 series:
- [Adafruit Feather nRF52840 Sense](https://www.adafruit.com/product/4516)
- [Adafruit ItsyBitsy nRF52840 Express](https://www.adafruit.com/product/4481)
- Adafruit Metro nRF52840 Express
- [Raytac MDBT50Q-RX](https://www.adafruit.com/product/5199)
Following boards are also included but are not officially supported:
- [Nordic nRF52840DK PCA10056](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-DK)
- [Particle Xenon](https://store.particle.io/products/xenon)
- Raytac MDBT50Q-RX
## BSP Installation
+255 -227
View File
@@ -1,31 +1,15 @@
# Copyright (c) 2014-2015 Arduino LLC. All right reserved.
# Copyright (c) 2016 Sandeep Mistry All right reserved.
# Copyright (c) 2017 Adafruit Industries. All right reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
menu.softdevice=SoftDevice
menu.debug=Debug
# ----------------------------------
# Bluefruit Feather nRF52832
# ----------------------------------
# -----------------------------------
# Adafruit Feather nRF52832
# -----------------------------------
feather52832.name=Adafruit Feather nRF52832
feather52832.bootloader.tool=bootburn
# VID/PID for Bootloader, Arduino & CircuitPython
# Upload
feather52832.bootloader.tool=bootburn
feather52832.upload.tool=nrfutil
feather52832.upload.protocol=nrfutil
feather52832.upload.use_1200bps_touch=false
@@ -40,12 +24,12 @@ feather52832.build.f_cpu=64000000
feather52832.build.board=NRF52832_FEATHER
feather52832.build.core=nRF5
feather52832.build.variant=feather_nrf52832
feather52832.build.usb_manufacturer="Adafruit LLC"
feather52832.build.usb_manufacturer="Adafruit"
feather52832.build.usb_product="Feather nRF52832"
feather52832.build.extra_flags=-DNRF52832_XXAA -DNRF52
feather52832.build.ldscript=nrf52832_s132_v6.ld
# SofDevice Menu
# SoftDevice Menu
feather52832.menu.softdevice.s132v6=S132 6.1.1
feather52832.menu.softdevice.s132v6.build.sd_name=s132
feather52832.menu.softdevice.s132v6.build.sd_version=6.1.1
@@ -62,12 +46,12 @@ feather52832.menu.debug.l3=Level 3 (Segger SystemView)
feather52832.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
feather52832.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
# ----------------------------------
# Bluefruit Feather nRF52840 Express
# ----------------------------------
# -----------------------------------
# Adafruit Feather nRF52840 Express
# -----------------------------------
feather52840.name=Adafruit Feather nRF52840 Express
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
# VID/PID for Bootloader, Arduino & CircuitPython
feather52840.vid.0=0x239A
feather52840.pid.0=0x8029
feather52840.vid.1=0x239A
@@ -92,14 +76,14 @@ feather52840.build.f_cpu=64000000
feather52840.build.board=NRF52840_FEATHER
feather52840.build.core=nRF5
feather52840.build.variant=feather_nrf52840_express
feather52840.build.usb_manufacturer="Adafruit LLC"
feather52840.build.usb_manufacturer="Adafruit"
feather52840.build.usb_product="Feather nRF52840 Express"
feather52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
feather52840.build.ldscript=nrf52840_s140_v6.ld
feather52840.build.vid=0x239A
feather52840.build.pid=0x8029
# SofDevice Menu
# SoftDevice Menu
feather52840.menu.softdevice.s140v6=S140 6.1.1
feather52840.menu.softdevice.s140v6.build.sd_name=s140
feather52840.menu.softdevice.s140v6.build.sd_version=6.1.1
@@ -116,13 +100,12 @@ feather52840.menu.debug.l3=Level 3 (Segger SystemView)
feather52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
feather52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
# ----------------------------------
# Feather nRF52840 sense
# ----------------------------------
# -----------------------------------
# Adafruit Feather nRF52840 Sense
# -----------------------------------
feather52840sense.name=Adafruit Feather nRF52840 Sense
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
# VID/PID for Bootloader, Arduino & CircuitPython
feather52840sense.vid.0=0x239A
feather52840sense.pid.0=0x8087
feather52840sense.vid.1=0x239A
@@ -147,14 +130,14 @@ feather52840sense.build.f_cpu=64000000
feather52840sense.build.board=NRF52840_FEATHER_SENSE
feather52840sense.build.core=nRF5
feather52840sense.build.variant=feather_nrf52840_sense
feather52840sense.build.usb_manufacturer="Adafruit LLC"
feather52840sense.build.usb_manufacturer="Adafruit"
feather52840sense.build.usb_product="Feather nRF52840 Sense"
feather52840sense.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
feather52840sense.build.ldscript=nrf52840_s140_v6.ld
feather52840sense.build.vid=0x239A
feather52840sense.build.pid=0x8087
# SofDevice Menu
# SoftDevice Menu
feather52840sense.menu.softdevice.s140v6=S140 6.1.1
feather52840sense.menu.softdevice.s140v6.build.sd_name=s140
feather52840sense.menu.softdevice.s140v6.build.sd_version=6.1.1
@@ -171,13 +154,12 @@ feather52840sense.menu.debug.l3=Level 3 (Segger SystemView)
feather52840sense.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
feather52840sense.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
# ---------------------------------------------
# Bluefruit ItsyBitsy nRF52840 Express
# ---------------------------------------------
# -----------------------------------
# Adafruit ItsyBitsy nRF52840 Express
# -----------------------------------
itsybitsy52840.name=Adafruit ItsyBitsy nRF52840 Express
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
# VID/PID for Bootloader, Arduino & CircuitPython
itsybitsy52840.vid.0=0x239A
itsybitsy52840.pid.0=0x8051
itsybitsy52840.vid.1=0x239A
@@ -199,18 +181,18 @@ itsybitsy52840.upload.maximum_data_size=237568
# Build
itsybitsy52840.build.mcu=cortex-m4
itsybitsy52840.build.f_cpu=64000000
itsybitsy52840.build.board=NRF52840_ITSYBITSY
itsybitsy52840.build.board=NRF52840_ITSYBITSY -DARDUINO_NRF52_ITSYBITSY
itsybitsy52840.build.core=nRF5
itsybitsy52840.build.variant=itsybitsy_nrf52840_express
itsybitsy52840.build.usb_manufacturer="Adafruit LLC"
itsybitsy52840.build.usb_manufacturer="Adafruit"
itsybitsy52840.build.usb_product="ItsyBitsy nRF52840 Express"
itsybitsy52840.build.extra_flags=-DNRF52840_XXAA -DARDUINO_NRF52_ITSYBITSY {build.flags.usb}
itsybitsy52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
itsybitsy52840.build.ldscript=nrf52840_s140_v6.ld
itsybitsy52840.build.vid=0x239A
itsybitsy52840.build.pid=0x8051
# SofDevice Menu
itsybitsy52840.menu.softdevice.s140v6=0.2.11 SoftDevice s140 6.1.1
# SoftDevice Menu
itsybitsy52840.menu.softdevice.s140v6=S140 6.1.1
itsybitsy52840.menu.softdevice.s140v6.build.sd_name=s140
itsybitsy52840.menu.softdevice.s140v6.build.sd_version=6.1.1
itsybitsy52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6
@@ -226,20 +208,18 @@ itsybitsy52840.menu.debug.l3=Level 3 (Segger SystemView)
itsybitsy52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
itsybitsy52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
# ---------------------------------------------
# Bluefruit Circuit Playground nRF52840 Express
# ---------------------------------------------
# -----------------------------------
# Adafruit Circuit Playground Bluefruit
# -----------------------------------
cplaynrf52840.name=Adafruit Circuit Playground Bluefruit
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
# VID/PID for Bootloader, Arduino & CircuitPython
cplaynrf52840.vid.0=0x239A
cplaynrf52840.pid.0=0x8045
cplaynrf52840.vid.1=0x239A
cplaynrf52840.pid.1=0x0045
cplaynrf52840.vid.2=0x239A
cplaynrf52840.pid.2=0x0046
cplaynrf52840.vid.3=0x239A
cplaynrf52840.pid.3=0x8046
cplaynrf52840.pid.2=0x8046
# Upload
cplaynrf52840.bootloader.tool=bootburn
@@ -256,14 +236,14 @@ cplaynrf52840.build.f_cpu=64000000
cplaynrf52840.build.board=NRF52840_CIRCUITPLAY
cplaynrf52840.build.core=nRF5
cplaynrf52840.build.variant=circuitplayground_nrf52840
cplaynrf52840.build.usb_manufacturer="Adafruit LLC"
cplaynrf52840.build.usb_manufacturer="Adafruit"
cplaynrf52840.build.usb_product="Circuit Playground Bluefruit"
cplaynrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
cplaynrf52840.build.ldscript=nrf52840_s140_v6.ld
cplaynrf52840.build.vid=0x239A
cplaynrf52840.build.pid=0x8045
# SofDevice Menu
# SoftDevice Menu
cplaynrf52840.menu.softdevice.s140v6=S140 6.1.1
cplaynrf52840.menu.softdevice.s140v6.build.sd_name=s140
cplaynrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1
@@ -280,21 +260,18 @@ cplaynrf52840.menu.debug.l3=Level 3 (Segger SystemView)
cplaynrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
cplaynrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
# ---------------------------------------------
# Clue nRF52840
# ---------------------------------------------
# -----------------------------------
# Adafruit CLUE
# -----------------------------------
cluenrf52840.name=Adafruit CLUE
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
# VID/PID for Bootloader, Arduino & CircuitPython
cluenrf52840.vid.0=0x239A
cluenrf52840.pid.0=0x8072
cluenrf52840.pid.0=0x8071
cluenrf52840.vid.1=0x239A
cluenrf52840.pid.1=0x0072
cluenrf52840.pid.1=0x0071
cluenrf52840.vid.2=0x239A
cluenrf52840.pid.2=0x0071
cluenrf52840.vid.3=0x239A
cluenrf52840.pid.3=0x8071
cluenrf52840.pid.2=0x8072
# Upload
cluenrf52840.bootloader.tool=bootburn
@@ -311,14 +288,14 @@ cluenrf52840.build.f_cpu=64000000
cluenrf52840.build.board=NRF52840_CLUE
cluenrf52840.build.core=nRF5
cluenrf52840.build.variant=clue_nrf52840
cluenrf52840.build.usb_manufacturer="Adafruit LLC"
cluenrf52840.build.usb_manufacturer="Adafruit"
cluenrf52840.build.usb_product="CLUE"
cluenrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
cluenrf52840.build.ldscript=nrf52840_s140_v6.ld
cluenrf52840.build.vid=0x239A
cluenrf52840.build.pid=0x8071
# SofDevice Menu
# SoftDevice Menu
cluenrf52840.menu.softdevice.s140v6=S140 6.1.1
cluenrf52840.menu.softdevice.s140v6.build.sd_name=s140
cluenrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1
@@ -335,174 +312,64 @@ cluenrf52840.menu.debug.l3=Level 3 (Segger SystemView)
cluenrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
cluenrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
# ----------------------------------
# Metro nRF52840 Express
# ----------------------------------
metro52840.name=Adafruit Metro nRF52840 Express
# -----------------------------------
# Adafruit LED Glasses Driver nRF52840
# -----------------------------------
ledglasses_nrf52840.name=Adafruit LED Glasses Driver nRF52840
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
metro52840.vid.0=0x239A
metro52840.pid.0=0x803F
metro52840.vid.1=0x239A
metro52840.pid.1=0x003F
metro52840.vid.2=0x239A
metro52840.pid.2=0x0040
metro52840.vid.3=0x239A
metro52840.pid.3=0x8040
# VID/PID for Bootloader, Arduino & CircuitPython
ledglasses_nrf52840.vid.0=0x239A
ledglasses_nrf52840.pid.0=0x810D
ledglasses_nrf52840.vid.1=0x239A
ledglasses_nrf52840.pid.1=0x010D
ledglasses_nrf52840.vid.2=0x239A
ledglasses_nrf52840.pid.2=0x810E
# Upload
metro52840.bootloader.tool=bootburn
metro52840.upload.tool=nrfutil
metro52840.upload.protocol=nrfutil
metro52840.upload.use_1200bps_touch=true
metro52840.upload.wait_for_upload_port=true
metro52840.upload.maximum_size=815104
metro52840.upload.maximum_data_size=237568
ledglasses_nrf52840.bootloader.tool=bootburn
ledglasses_nrf52840.upload.tool=nrfutil
ledglasses_nrf52840.upload.protocol=nrfutil
ledglasses_nrf52840.upload.use_1200bps_touch=true
ledglasses_nrf52840.upload.wait_for_upload_port=true
ledglasses_nrf52840.upload.maximum_size=815104
ledglasses_nrf52840.upload.maximum_data_size=237568
# Build
metro52840.build.mcu=cortex-m4
metro52840.build.f_cpu=64000000
metro52840.build.board=NRF52840_METRO
metro52840.build.core=nRF5
metro52840.build.variant=metro_nrf52840_express
metro52840.build.usb_manufacturer="Adafruit LLC"
metro52840.build.usb_product="Metro nRF52840 Express"
metro52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
metro52840.build.ldscript=nrf52840_s140_v6.ld
metro52840.build.vid=0x239A
metro52840.build.pid=0x803F
ledglasses_nrf52840.build.mcu=cortex-m4
ledglasses_nrf52840.build.f_cpu=64000000
ledglasses_nrf52840.build.board=NRF52840_LED_GLASSES
ledglasses_nrf52840.build.core=nRF5
ledglasses_nrf52840.build.variant=ledglasses_nrf52840
ledglasses_nrf52840.build.usb_manufacturer="Adafruit"
ledglasses_nrf52840.build.usb_product="LED Glasses Driver nRF52840"
ledglasses_nrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
ledglasses_nrf52840.build.ldscript=nrf52840_s140_v6.ld
ledglasses_nrf52840.build.vid=0x239A
ledglasses_nrf52840.build.pid=0x810D
# SofDevice Menu
metro52840.menu.softdevice.s140v6=S140 6.1.1
metro52840.menu.softdevice.s140v6.build.sd_name=s140
metro52840.menu.softdevice.s140v6.build.sd_version=6.1.1
metro52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6
# SoftDevice Menu
ledglasses_nrf52840.menu.softdevice.s140v6=S140 6.1.1
ledglasses_nrf52840.menu.softdevice.s140v6.build.sd_name=s140
ledglasses_nrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1
ledglasses_nrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6
# Debug Menu
metro52840.menu.debug.l0=Level 0 (Release)
metro52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
metro52840.menu.debug.l1=Level 1 (Error Message)
metro52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
metro52840.menu.debug.l2=Level 2 (Full Debug)
metro52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
metro52840.menu.debug.l3=Level 3 (Segger SystemView)
metro52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
metro52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
ledglasses_nrf52840.menu.debug.l0=Level 0 (Release)
ledglasses_nrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
ledglasses_nrf52840.menu.debug.l1=Level 1 (Error Message)
ledglasses_nrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
ledglasses_nrf52840.menu.debug.l2=Level 2 (Full Debug)
ledglasses_nrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
ledglasses_nrf52840.menu.debug.l3=Level 3 (Segger SystemView)
ledglasses_nrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
ledglasses_nrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
# -----------------------------------
# Raytac nRF52840 Dongle
# -----------------------------------
mdbt50qrx.name=Raytac nRF52840 Dongle
# -------------------------------------------------------
#
# Boards that aren't made by Adafruit
#
# -------------------------------------------------------
# ----------------------------------
# Nordic nRF52840DK (PCA10056)
# ----------------------------------
pca10056.name=Nordic nRF52840DK (PCA10056)
pca10056.bootloader.tool=bootburn
# Upload
pca10056.upload.tool=nrfutil
pca10056.upload.protocol=nrfutil
pca10056.upload.use_1200bps_touch=true
pca10056.upload.wait_for_upload_port=true
pca10056.upload.maximum_size=815104
pca10056.upload.maximum_data_size=237568
# Build
pca10056.build.mcu=cortex-m4
pca10056.build.f_cpu=64000000
pca10056.build.board=NRF52840_PCA10056
pca10056.build.core=nRF5
pca10056.build.variant=pca10056
pca10056.build.usb_manufacturer="Nordic"
pca10056.build.usb_product="nRF52840 DK"
pca10056.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
pca10056.build.ldscript=nrf52840_s140_v6.ld
pca10056.build.vid=0x239A
pca10056.build.pid=0x8029
# SofDevice Menu
pca10056.menu.softdevice.s140v6=S140 6.1.1
pca10056.menu.softdevice.s140v6.build.sd_name=s140
pca10056.menu.softdevice.s140v6.build.sd_version=6.1.1
pca10056.menu.softdevice.s140v6.build.sd_fwid=0x00B6
# Debug Menu
pca10056.menu.debug.l0=Level 0 (Release)
pca10056.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
pca10056.menu.debug.l1=Level 1 (Error Message)
pca10056.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
pca10056.menu.debug.l2=Level 2 (Full Debug)
pca10056.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
pca10056.menu.debug.l3=Level 3 (Segger SystemView)
pca10056.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
pca10056.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
# ----------------------------------
# Particle Xenon
# ----------------------------------
particle_xenon.name=Particle Xenon
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
particle_xenon.vid.0=0x239A
particle_xenon.pid.0=0x8029
particle_xenon.vid.1=0x239A
particle_xenon.pid.1=0x0029
particle_xenon.vid.2=0x239A
particle_xenon.pid.2=0x002A
particle_xenon.vid.3=0x239A
particle_xenon.pid.3=0x802A
# Upload
particle_xenon.bootloader.tool=bootburn
particle_xenon.upload.tool=nrfutil
particle_xenon.upload.protocol=nrfutil
particle_xenon.upload.use_1200bps_touch=true
particle_xenon.upload.wait_for_upload_port=true
particle_xenon.upload.maximum_size=815104
particle_xenon.upload.maximum_data_size=237568
# Build
particle_xenon.build.mcu=cortex-m4
particle_xenon.build.f_cpu=64000000
particle_xenon.build.board=PARTICLE_XENON
particle_xenon.build.core=nRF5
particle_xenon.build.variant=particle_xenon
particle_xenon.build.usb_manufacturer="Particle Industries"
particle_xenon.build.usb_product="Particle Xenon"
particle_xenon.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
particle_xenon.build.ldscript=nrf52840_s140_v6.ld
particle_xenon.build.vid=0x239A
particle_xenon.build.pid=0x8029
# SofDevice Menu
particle_xenon.menu.softdevice.s140v6=S140 6.1.1
particle_xenon.menu.softdevice.s140v6.build.sd_name=s140
particle_xenon.menu.softdevice.s140v6.build.sd_version=6.1.1
particle_xenon.menu.softdevice.s140v6.build.sd_fwid=0x00B6
# Debug Menu
particle_xenon.menu.debug.l0=Level 0 (Release)
particle_xenon.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
particle_xenon.menu.debug.l1=Level 1 (Error Message)
particle_xenon.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
particle_xenon.menu.debug.l2=Level 2 (Full Debug)
particle_xenon.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
particle_xenon.menu.debug.l3=Level 3 (Segger SystemView)
particle_xenon.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
particle_xenon.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
# ----------------------------------
# Raytac MDBT50Q - RX
# ----------------------------------
mdbt50qrx.name=Raytac MDBT50Q-RX Dongle
# VID/PID for bootloader, Arduino + Circuitpython App
# VID/PID for Bootloader, Arduino & CircuitPython
mdbt50qrx.vid.0=0x239A
mdbt50qrx.pid.0=0x810B
mdbt50qrx.vid.1=0x239A
@@ -532,7 +399,7 @@ mdbt50qrx.build.ldscript=nrf52840_s140_v6.ld
mdbt50qrx.build.vid=0x239A
mdbt50qrx.build.pid=0x810B
# SofDevice Menu
# SoftDevice Menu
mdbt50qrx.menu.softdevice.s140v6=S140 6.1.1
mdbt50qrx.menu.softdevice.s140v6.build.sd_name=s140
mdbt50qrx.menu.softdevice.s140v6.build.sd_version=6.1.1
@@ -548,3 +415,164 @@ mdbt50qrx.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
mdbt50qrx.menu.debug.l3=Level 3 (Segger SystemView)
mdbt50qrx.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
mdbt50qrx.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
# -----------------------------------
# Adafruit Metro nRF52840 Express
# -----------------------------------
metro52840.name=Adafruit Metro nRF52840 Express
# VID/PID for Bootloader, Arduino & CircuitPython
metro52840.vid.0=0x239A
metro52840.pid.0=0x803F
metro52840.vid.1=0x239A
metro52840.pid.1=0x003F
metro52840.vid.2=0x239A
metro52840.pid.2=0x0040
metro52840.vid.3=0x239A
metro52840.pid.3=0x8040
# Upload
metro52840.bootloader.tool=bootburn
metro52840.upload.tool=nrfutil
metro52840.upload.protocol=nrfutil
metro52840.upload.use_1200bps_touch=true
metro52840.upload.wait_for_upload_port=true
metro52840.upload.maximum_size=815104
metro52840.upload.maximum_data_size=237568
# Build
metro52840.build.mcu=cortex-m4
metro52840.build.f_cpu=64000000
metro52840.build.board=NRF52840_METRO
metro52840.build.core=nRF5
metro52840.build.variant=metro_nrf52840_express
metro52840.build.usb_manufacturer="Adafruit"
metro52840.build.usb_product="Metro nRF52840 Express"
metro52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
metro52840.build.ldscript=nrf52840_s140_v6.ld
metro52840.build.vid=0x239A
metro52840.build.pid=0x803F
# SoftDevice Menu
metro52840.menu.softdevice.s140v6=S140 6.1.1
metro52840.menu.softdevice.s140v6.build.sd_name=s140
metro52840.menu.softdevice.s140v6.build.sd_version=6.1.1
metro52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6
# Debug Menu
metro52840.menu.debug.l0=Level 0 (Release)
metro52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
metro52840.menu.debug.l1=Level 1 (Error Message)
metro52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
metro52840.menu.debug.l2=Level 2 (Full Debug)
metro52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
metro52840.menu.debug.l3=Level 3 (Segger SystemView)
metro52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
metro52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
# -------------------------------------------------------
#
# Boards that aren't made by Adafruit
#
# -------------------------------------------------------
# -----------------------------------
# Nordic nRF52840 DK
# -----------------------------------
pca10056.name=Nordic nRF52840 DK
# VID/PID for Bootloader, Arduino & CircuitPython
pca10056.vid.0=0x239A
pca10056.pid.0=0x8029
pca10056.vid.1=0x239A
pca10056.pid.1=0x0029
# Upload
pca10056.bootloader.tool=bootburn
pca10056.upload.tool=nrfutil
pca10056.upload.protocol=nrfutil
pca10056.upload.use_1200bps_touch=true
pca10056.upload.wait_for_upload_port=true
pca10056.upload.maximum_size=815104
pca10056.upload.maximum_data_size=237568
# Build
pca10056.build.mcu=cortex-m4
pca10056.build.f_cpu=64000000
pca10056.build.board=NRF52840_PCA10056
pca10056.build.core=nRF5
pca10056.build.variant=pca10056
pca10056.build.usb_manufacturer="Nordic"
pca10056.build.usb_product="nRF52840 DK"
pca10056.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
pca10056.build.ldscript=nrf52840_s140_v6.ld
pca10056.build.vid=0x239A
pca10056.build.pid=0x8029
# SoftDevice Menu
pca10056.menu.softdevice.s140v6=S140 6.1.1
pca10056.menu.softdevice.s140v6.build.sd_name=s140
pca10056.menu.softdevice.s140v6.build.sd_version=6.1.1
pca10056.menu.softdevice.s140v6.build.sd_fwid=0x00B6
# Debug Menu
pca10056.menu.debug.l0=Level 0 (Release)
pca10056.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
pca10056.menu.debug.l1=Level 1 (Error Message)
pca10056.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
pca10056.menu.debug.l2=Level 2 (Full Debug)
pca10056.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
pca10056.menu.debug.l3=Level 3 (Segger SystemView)
pca10056.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
pca10056.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
# -----------------------------------
# Particle Xenon
# -----------------------------------
particle_xenon.name=Particle Xenon
# VID/PID for Bootloader, Arduino & CircuitPython
particle_xenon.vid.0=0x239A
particle_xenon.pid.0=0x8029
particle_xenon.vid.1=0x239A
particle_xenon.pid.1=0x0029
# Upload
particle_xenon.bootloader.tool=bootburn
particle_xenon.upload.tool=nrfutil
particle_xenon.upload.protocol=nrfutil
particle_xenon.upload.use_1200bps_touch=true
particle_xenon.upload.wait_for_upload_port=true
particle_xenon.upload.maximum_size=815104
particle_xenon.upload.maximum_data_size=237568
# Build
particle_xenon.build.mcu=cortex-m4
particle_xenon.build.f_cpu=64000000
particle_xenon.build.board=PARTICLE_XENON
particle_xenon.build.core=nRF5
particle_xenon.build.variant=particle_xenon
particle_xenon.build.usb_manufacturer="Particle"
particle_xenon.build.usb_product="Xenon"
particle_xenon.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
particle_xenon.build.ldscript=nrf52840_s140_v6.ld
particle_xenon.build.vid=0x239A
particle_xenon.build.pid=0x8029
# SoftDevice Menu
particle_xenon.menu.softdevice.s140v6=S140 6.1.1
particle_xenon.menu.softdevice.s140v6.build.sd_name=s140
particle_xenon.menu.softdevice.s140v6.build.sd_version=6.1.1
particle_xenon.menu.softdevice.s140v6.build.sd_fwid=0x00B6
# Debug Menu
particle_xenon.menu.debug.l0=Level 0 (Release)
particle_xenon.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
particle_xenon.menu.debug.l1=Level 1 (Error Message)
particle_xenon.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
particle_xenon.menu.debug.l2=Level 2 (Full Debug)
particle_xenon.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
particle_xenon.menu.debug.l3=Level 3 (Segger SystemView)
particle_xenon.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
particle_xenon.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -147,7 +147,7 @@ tools.nrfutil.upload.pattern="{cmd}" {upload.verbose} dfu serial -pkg "{build.pa
#***************************************************
# Bootloader version
tools.bootburn.bootloader.file={runtime.platform.path}/bootloader/{build.variant}/{build.variant}_bootloader-0.6.1_{build.sd_name}_{build.sd_version}
tools.bootburn.bootloader.file={runtime.platform.path}/bootloader/{build.variant}/{build.variant}_bootloader-0.6.2_{build.sd_name}_{build.sd_version}
tools.bootburn.bootloader.params.verbose=
tools.bootburn.bootloader.params.quiet=
+158
View File
@@ -0,0 +1,158 @@
#!/usr/bin/env python3
mcu_dict = {
52832: {
'flash_size': 290816,
'data_size': 52224,
'extra_flags': '-DNRF52832_XXAA -DNRF52',
'ldscript': 'nrf52832_s132_v6.ld'
},
52840: {
'flash_size': 815104,
'data_size': 237568,
'extra_flags': '-DNRF52840_XXAA {build.flags.usb}',
'ldscript': 'nrf52840_s140_v6.ld'
}
}
def get_mcu(name):
if name == 'feather52832':
return 52832
else:
return 52840
def build_upload(name):
mcu = get_mcu(name)
print("# Upload")
print("%s.bootloader.tool=bootburn" % name)
print("%s.upload.tool=nrfutil" % name)
print("%s.upload.protocol=nrfutil" % name)
if mcu == 52832:
print("%s.upload.use_1200bps_touch=false" % name)
print("%s.upload.wait_for_upload_port=false" % name)
print("%s.upload.native_usb=false" % name)
else:
print("%s.upload.use_1200bps_touch=true" % name)
print("%s.upload.wait_for_upload_port=true" % name)
print("%s.upload.maximum_size=%d" % (name, mcu_dict[mcu]['flash_size']))
print("%s.upload.maximum_data_size=%d" % (name, mcu_dict[mcu]['data_size']))
print()
def build_header(name, variant, vendor_name, product_name, boarddefine, vid, pid_list):
prettyname = vendor_name + " " + product_name
print()
print("# -----------------------------------")
print("# %s" % prettyname)
print("# -----------------------------------")
print("%s.name=%s" % (name, prettyname))
print()
print("# VID/PID for Bootloader, Arduino & CircuitPython")
for i in range(len(pid_list)):
print("%s.vid.%d=%s" % (name, i, vid))
print("%s.pid.%d=%s" % (name, i, pid_list[i]))
print()
build_upload(name)
print("# Build")
print("%s.build.mcu=cortex-m4" % name)
print("%s.build.f_cpu=64000000" % name)
print("%s.build.board=%s" % (name, boarddefine))
print("%s.build.core=nRF5" % name)
print("%s.build.variant=%s" % (name, variant))
print('%s.build.usb_manufacturer="%s"' % (name, vendor_name))
print('%s.build.usb_product="%s"' % (name, product_name))
mcu = get_mcu(name)
print("%s.build.extra_flags=%s" % (name, mcu_dict[mcu]['extra_flags']))
print("%s.build.ldscript=%s" % (name, mcu_dict[mcu]['ldscript']))
if mcu != 52832:
print("%s.build.vid=%s" % (name, vid))
print("%s.build.pid=%s" % (name, pid_list[0]))
print()
def build_softdevice(name):
print("# SoftDevice Menu")
if get_mcu(name) == 52832:
print("%s.menu.softdevice.s132v6=S132 6.1.1" % name)
print("%s.menu.softdevice.s132v6.build.sd_name=s132" % name)
print("%s.menu.softdevice.s132v6.build.sd_version=6.1.1" % name)
print("%s.menu.softdevice.s132v6.build.sd_fwid=0x00B7" % name)
else:
print("%s.menu.softdevice.s140v6=S140 6.1.1" % name)
print("%s.menu.softdevice.s140v6.build.sd_name=s140" % name)
print("%s.menu.softdevice.s140v6.build.sd_version=6.1.1" % name)
print("%s.menu.softdevice.s140v6.build.sd_fwid=0x00B6" % name)
print()
def build_debug(name):
print("# Debug Menu")
print("%s.menu.debug.l0=Level 0 (Release)" % name)
print("%s.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0" % name)
print("%s.menu.debug.l1=Level 1 (Error Message)" % name)
print("%s.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1" % name)
print("%s.menu.debug.l2=Level 2 (Full Debug)" % name)
print("%s.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2" % name)
print("%s.menu.debug.l3=Level 3 (Segger SystemView)" % name)
print("%s.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3" % name)
print("%s.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1" % name)
def build_global_menu():
print("menu.softdevice=SoftDevice")
print("menu.debug=Debug")
def make_board(name, vendor_name, product_name, vid, pid, boarddefine, variant):
build_header(name, vendor_name, product_name, vid, pid, boarddefine, variant)
build_softdevice(name)
build_debug(name)
build_global_menu()
make_board("feather52832", "feather_nrf52832", "Adafruit", "Feather nRF52832", "NRF52832_FEATHER",
"0x239A", [])
make_board("feather52840", "feather_nrf52840_express", "Adafruit", "Feather nRF52840 Express", "NRF52840_FEATHER",
"0x239A", ["0x8029", "0x0029", "0x002A", "0x802A"])
make_board("feather52840sense", "feather_nrf52840_sense", "Adafruit", "Feather nRF52840 Sense", "NRF52840_FEATHER_SENSE",
"0x239A", ["0x8087", "0x0087", "0x0088", "0x8088"])
make_board("itsybitsy52840", "itsybitsy_nrf52840_express", "Adafruit", "ItsyBitsy nRF52840 Express", "NRF52840_ITSYBITSY -DARDUINO_NRF52_ITSYBITSY",
"0x239A", ["0x8051", "0x0051", "0x0052", "0x8052"])
make_board("cplaynrf52840", "circuitplayground_nrf52840", "Adafruit", "Circuit Playground Bluefruit", "NRF52840_CIRCUITPLAY",
"0x239A", ["0x8045", "0x0045", "0x8046"])
make_board("cluenrf52840", "clue_nrf52840", "Adafruit", "CLUE", "NRF52840_CLUE",
"0x239A", ["0x8071", "0x0071", "0x8072"])
make_board("ledglasses_nrf52840", "ledglasses_nrf52840", "Adafruit", "LED Glasses Driver nRF52840", "NRF52840_LED_GLASSES",
"0x239A", ["0x810D", "0x010D", "0x810E"])
make_board("mdbt50qrx", "raytac_mdbt50q_rx", "Raytac", "nRF52840 Dongle", "MDBT50Q_RX",
"0x239A", ["0x810B", "0x010B", "0x810C"])
make_board("metro52840", "metro_nrf52840_express", "Adafruit", "Metro nRF52840 Express", "NRF52840_METRO",
"0x239A", ["0x803F", "0x003F", "0x0040", "0x8040"])
print()
print()
print("# -------------------------------------------------------")
print("#")
print("# Boards that aren't made by Adafruit")
print("#")
print("# -------------------------------------------------------")
make_board("pca10056", "pca10056", "Nordic", "nRF52840 DK", "NRF52840_PCA10056",
"0x239A", ["0x8029", "0x0029"])
make_board("particle_xenon", "particle_xenon", "Particle", "Xenon", "PARTICLE_XENON",
"0x239A", ["0x8029", "0x0029"])
+74
View File
@@ -0,0 +1,74 @@
/*
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
Copyright (c) 2016 Sandeep Mistry All right reserved.
Copyright (c) 2018, Adafruit Industries (adafruit.com)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "variant.h"
#include "wiring_constants.h"
#include "wiring_digital.h"
#include "nrf.h"
const uint32_t g_ADigitalPinMap[] =
{
// UART: place holder only
25 , // D0 is UART TX (not connected)
24 , // D1 is UART RX (not connected)
31 , // D2 is LED1
32+15, // D3 is NeoPixel
30 , // D4 is Button
27 , // D5 is MIC Data
0 , // D6 is MIC Clk
1 , // D7 is LIS3DH IRQ
// I2C: connected to on-board LIS3DH and SteammaQT
8 , // D8 is SCL
6 , // D9 is SDA
// SPI: place holder only
13 , // D10 is MISO (not connected)
14 , // D11 is MOSI (not connected)
15 , // D12 is SCK (not connected)
16 , // D13 is SS (not connected)
// A0 .. A7: only A6 is connected to Battery
32+3 , // D14 is A0 (not connected)
32+4 , // D15 is A1 (not connected)
32+5 , // D16 is A2 (not connected)
32+6 , // D17 is A3 (not connected)
32+7 , // D18 is A4 (not connected)
32+1 , // D19 is A5 (not connected)
4 , // D20 is A6 Battery
5 , // D21 is A7 (not connected)
// QSPI pins (not exposed via any header / test point)
19 , // D22 is QSPI CLK
20 , // D23 is QSPI CS
32+0 , // D24 is QSPI Data 0
21 , // D25 is QSPI Data 1
22 , // D26 is QSPI Data 2
23 , // D27 is QSPI Data 3
// Thus, there are 28 defined pins
};
void initVariant()
{
pinMode(PIN_LED1, OUTPUT);
ledOff(PIN_LED1);
}
+141
View File
@@ -0,0 +1,141 @@
/*
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
Copyright (c) 2016 Sandeep Mistry All right reserved.
Copyright (c) 2018, Adafruit Industries (adafruit.com)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _VARIANT_FEATHER52840_
#define _VARIANT_FEATHER52840_
/** Master clock frequency */
#define VARIANT_MCK (64000000ul)
//#define USE_LFXO // Board uses 32khz crystal for LF
#define USE_LFRC // Board uses RC for LF
/*----------------------------------------------------------------------------
* Headers
*----------------------------------------------------------------------------*/
#include "WVariant.h"
#ifdef __cplusplus
extern "C"
{
#endif // __cplusplus
// Number of pins defined in PinDescription array
#define PINS_COUNT (28)
#define NUM_DIGITAL_PINS (28)
#define NUM_ANALOG_INPUTS (6) // only A6 is routed and used for battery
#define NUM_ANALOG_OUTPUTS (0)
// LEDs
#define PIN_LED1 (2)
#define PIN_NEOPIXEL (3)
#define NEOPIXEL_NUM 1
#define LED_BUILTIN PIN_LED1
#define LED_CONN PIN_LED1
#define LED_RED PIN_LED1
#define LED_BLUE PIN_LED1
#define LED_STATE_ON 1 // State when LED is litted
/*
* Buttons
*/
#define PIN_BUTTON1 (4)
// Microphone
#define PIN_PDM_DIN 5
#define PIN_PDM_CLK 6
#define PIN_PDM_PWR -1 // not used
/*
* Analog pins
*/
#define PIN_A0 (14) // not connected
#define PIN_A1 (15) // not connected
#define PIN_A2 (16) // not connected
#define PIN_A3 (17) // not connected
#define PIN_A4 (18) // not connected
#define PIN_A5 (19) // not connected
#define PIN_A6 (20) // VBAT
#define PIN_A7 (21) // not connected
static const uint8_t A0 = PIN_A0 ;
static const uint8_t A1 = PIN_A1 ;
static const uint8_t A2 = PIN_A2 ;
static const uint8_t A3 = PIN_A3 ;
static const uint8_t A4 = PIN_A4 ;
static const uint8_t A5 = PIN_A5 ;
static const uint8_t A6 = PIN_A6 ;
static const uint8_t A7 = PIN_A7 ;
#define ADC_RESOLUTION 14
// Other pins
#define PIN_VBAT PIN_A6
/*
* Serial interfaces
*/
#define PIN_SERIAL1_RX (1) // not connected
#define PIN_SERIAL1_TX (0) // not connected
/*
* SPI Interfaces
*/
#define SPI_INTERFACES_COUNT 1
#define PIN_SPI_MISO (10) // not connected
#define PIN_SPI_MOSI (11) // not connected
#define PIN_SPI_SCK (12) // not connected
static const uint8_t SS = (13); // not connected
static const uint8_t MOSI = PIN_SPI_MOSI ;
static const uint8_t MISO = PIN_SPI_MISO ;
static const uint8_t SCK = PIN_SPI_SCK ;
/*
* Wire Interfaces
*/
#define WIRE_INTERFACES_COUNT 1
#define PIN_WIRE_SCL (8)
#define PIN_WIRE_SDA (9)
// QSPI Pins
#define PIN_QSPI_SCK 22
#define PIN_QSPI_CS 23
#define PIN_QSPI_IO0 24
#define PIN_QSPI_IO1 25
#define PIN_QSPI_IO2 26
#define PIN_QSPI_IO3 27
// On-board QSPI Flash
#define EXTERNAL_FLASH_DEVICES GD25Q16C
#define EXTERNAL_FLASH_USE_QSPI
#ifdef __cplusplus
}
#endif
/*----------------------------------------------------------------------------
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
#endif