Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit 41cb474

Browse files
authored
Update Packages' Patches
1 parent 03a6caf commit 41cb474

File tree

12 files changed

+1080
-0
lines changed

12 files changed

+1080
-0
lines changed

Packages_Patches/adafruit/hardware/nrf52/1.0.0/boards.txt

+69
Original file line numberDiff line numberDiff line change
@@ -645,3 +645,72 @@ ninab112.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
645645
ninab112.menu.debug.l3=Level 3 (Segger SystemView)
646646
ninab112.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
647647
ninab112.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
648+
649+
##################################################################
650+
## KH Add SparkFun Pro nRF52840 Mini
651+
##################################################################
652+
#**********************************************
653+
# SparkFun Pro nRF52840 Mini
654+
#**********************************************
655+
sparkfunnrf52840mini.name=SparkFun Pro nRF52840 Mini
656+
657+
# DFU Mode with CDC only
658+
sparkfunnrf52840mini.vid.0=0x1B4F
659+
sparkfunnrf52840mini.pid.0=0x002A
660+
661+
# DFU Mode with CDC + MSC (UF2)
662+
sparkfunnrf52840mini.vid.1=0x1B4F
663+
sparkfunnrf52840mini.pid.1=0x0029
664+
665+
# Application with CDC + MSC
666+
sparkfunnrf52840mini.vid.2=0x1B4F
667+
sparkfunnrf52840mini.pid.2=0x8029
668+
669+
# CircuitPython
670+
sparkfunnrf52840mini.vid.2=0x1B4F
671+
sparkfunnrf52840mini.pid.2=0x802A
672+
673+
sparkfunnrf52840mini.bootloader.tool=bootburn
674+
675+
# Upload
676+
sparkfunnrf52840mini.upload.tool=nrfutil
677+
sparkfunnrf52840mini.upload.protocol=nrfutil
678+
sparkfunnrf52840mini.upload.use_1200bps_touch=true
679+
sparkfunnrf52840mini.upload.wait_for_upload_port=true
680+
#sparkfunnrf52840mini.upload.native_usb=true
681+
682+
# Build
683+
sparkfunnrf52840mini.build.mcu=cortex-m4
684+
sparkfunnrf52840mini.build.f_cpu=64000000
685+
sparkfunnrf52840mini.build.board=NRF52840_FEATHER
686+
sparkfunnrf52840mini.build.core=nRF5
687+
sparkfunnrf52840mini.build.variant=sparkfun_nrf52840_mini
688+
sparkfunnrf52840mini.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
689+
sparkfunnrf52840mini.build.vid=0x1B4F
690+
sparkfunnrf52840mini.build.pid=0x5284
691+
sparkfunnrf52840mini.build.usb_manufacturer="SparkFun"
692+
sparkfunnrf52840mini.build.usb_product="nRF52840 Mini Breakout"
693+
694+
# SofDevice Menu
695+
# Ram & ROM size varies depending on SoftDevice (check linker script)
696+
697+
sparkfunnrf52840mini.menu.softdevice.s140v6=s140 6.1.1 r0
698+
sparkfunnrf52840mini.menu.softdevice.s140v6.build.sd_flags=-DS140
699+
sparkfunnrf52840mini.menu.softdevice.s140v6.build.sd_name=s140
700+
sparkfunnrf52840mini.menu.softdevice.s140v6.build.sd_version=6.1.1
701+
sparkfunnrf52840mini.menu.softdevice.s140v6.build.sd_fwid=0x00B6
702+
sparkfunnrf52840mini.menu.softdevice.s140v6.build.ldscript=nrf52840_s140_v6.ld
703+
sparkfunnrf52840mini.menu.softdevice.s140v6.upload.maximum_size=815104
704+
sparkfunnrf52840mini.menu.softdevice.s140v6.upload.maximum_data_size=248832
705+
706+
# Debug Menu
707+
sparkfunnrf52840mini.menu.debug.l0=Level 0 (Release)
708+
sparkfunnrf52840mini.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 -Os
709+
sparkfunnrf52840mini.menu.debug.l1=Level 1 (Error Message)
710+
sparkfunnrf52840mini.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 -Os
711+
sparkfunnrf52840mini.menu.debug.l2=Level 2 (Full Debug)
712+
sparkfunnrf52840mini.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 -Os
713+
sparkfunnrf52840mini.menu.debug.l3=Level 3 (Segger SystemView)
714+
sparkfunnrf52840mini.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 -Os
715+
716+
##################################################################
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
3+
Copyright (c) 2016 Sandeep Mistry All right reserved.
4+
Copyright (c) 2018, Adafruit Industries (adafruit.com)
5+
6+
This library is free software; you can redistribute it and/or
7+
modify it under the terms of the GNU Lesser General Public
8+
License as published by the Free Software Foundation; either
9+
version 2.1 of the License, or (at your option) any later version.
10+
11+
This library is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14+
See the GNU Lesser General Public License for more details.
15+
16+
You should have received a copy of the GNU Lesser General Public
17+
License along with this library; if not, write to the Free Software
18+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19+
*/
20+
21+
#include "variant.h"
22+
#include "wiring_constants.h"
23+
#include "wiring_digital.h"
24+
#include "nrf.h"
25+
26+
const uint32_t g_ADigitalPinMap[] =
27+
{
28+
// P0
29+
0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ,
30+
8 , 9 , 10, 11, 12, 13, 14, 15,
31+
16, 17, 18, 19, 20, 21, 22, 23,
32+
24, 25, 26, 27, 28, 29, 30, 31,
33+
34+
// P1
35+
32, 33, 34, 35, 36, 37, 38, 39,
36+
40, 41, 42, 43, 44, 45, 46, 47,
37+
48, 49, 50, 51, 52, 53, 54, 55,
38+
56, 57, 58, 59, 60, 61, 62, 63
39+
};
40+
void initVariant()
41+
{
42+
// LED1 & LED2
43+
pinMode(PIN_LED1, OUTPUT);
44+
ledOff(PIN_LED1);
45+
46+
pinMode(PIN_LED2, OUTPUT);
47+
ledOff(PIN_LED2);
48+
}
49+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
/*
2+
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
3+
Copyright (c) 2016 Sandeep Mistry All right reserved.
4+
Copyright (c) 2018, Adafruit Industries (adafruit.com)
5+
6+
This library is free software; you can redistribute it and/or
7+
modify it under the terms of the GNU Lesser General Public
8+
License as published by the Free Software Foundation; either
9+
version 2.1 of the License, or (at your option) any later version.
10+
This library is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13+
See the GNU Lesser General Public License for more details.
14+
You should have received a copy of the GNU Lesser General Public
15+
License along with this library; if not, write to the Free Software
16+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17+
*/
18+
19+
#ifndef _VARIANT_SPARKFUN52840MINI_
20+
#define _VARIANT_SPARKFUN52840MINI_
21+
22+
/** Master clock frequency */
23+
#define VARIANT_MCK (64000000ul)
24+
25+
#define USE_LFXO // Board uses 32khz crystal for LF
26+
// define USE_LFRC // Board uses RC for LF
27+
28+
/*----------------------------------------------------------------------------
29+
* Headers
30+
*----------------------------------------------------------------------------*/
31+
32+
#include "WVariant.h"
33+
34+
#ifdef __cplusplus
35+
extern "C"
36+
{
37+
#endif // __cplusplus
38+
39+
// Number of pins defined in PinDescription array
40+
#define PINS_COUNT (64)
41+
#define NUM_DIGITAL_PINS (64)
42+
#define NUM_ANALOG_INPUTS (8)
43+
#define NUM_ANALOG_OUTPUTS (0)
44+
45+
// LEDs
46+
#define PIN_LED1 (7)
47+
#define PIN_LED2 (14)
48+
49+
#define LED_BUILTIN PIN_LED1
50+
#define LED_CONN PIN_LED2
51+
52+
#define LED_BLUE PIN_LED1
53+
#define LED_RED PIN_LED2
54+
55+
#define LED_STATE_ON 1 // State when LED is litted
56+
57+
// Buttons
58+
/*
59+
#define PIN_BUTTON1 (2)
60+
#define PIN_BUTTON2 (3)
61+
#define PIN_BUTTON3 (4)
62+
#define PIN_BUTTON4 (5)
63+
*/
64+
65+
/*
66+
* Analog pins
67+
*/
68+
#define PIN_A0 (2)
69+
#define PIN_A1 (3)
70+
#define PIN_A2 (4)
71+
#define PIN_A3 (5)
72+
#define PIN_A4 (28)
73+
#define PIN_A5 (29)
74+
#define PIN_A6 (30)
75+
#define PIN_A7 (31)
76+
77+
static const uint8_t A0 = PIN_A0 ;
78+
static const uint8_t A1 = PIN_A1 ;
79+
static const uint8_t A2 = PIN_A2 ;
80+
static const uint8_t A3 = PIN_A3 ;
81+
static const uint8_t A4 = PIN_A4 ;
82+
static const uint8_t A5 = PIN_A5 ;
83+
static const uint8_t A6 = PIN_A6 ;
84+
static const uint8_t A7 = PIN_A7 ;
85+
#define ADC_RESOLUTION 14
86+
87+
// Other pins
88+
#define PIN_AREF (2)
89+
#define PIN_DFU (13)
90+
#define PIN_NFC1 (9)
91+
#define PIN_NFC2 (10)
92+
93+
static const uint8_t AREF = PIN_AREF;
94+
95+
/*
96+
* Serial interfaces
97+
*/
98+
// Serial
99+
//Previous Hardware UART definition for nRF52 Arduino Core, below 0.16.0
100+
//Feel free to comment out these two lines below if there are conflicts with latest release
101+
#define PIN_SERIAL_RX (15)
102+
#define PIN_SERIAL_TX (17)
103+
104+
//Hardware UART definition for nRF52 Arduino Core, 0.17.0 and above
105+
#define PIN_SERIAL1_RX (15)
106+
#define PIN_SERIAL1_TX (17)
107+
108+
/*
109+
* SPI Interfaces
110+
*/
111+
#define SPI_INTERFACES_COUNT 1
112+
113+
#define PIN_SPI_MISO (31)
114+
#define PIN_SPI_MOSI (3)
115+
#define PIN_SPI_SCK (30)
116+
117+
static const uint8_t SS = 2 ;
118+
static const uint8_t MOSI = PIN_SPI_MOSI ;
119+
static const uint8_t MISO = PIN_SPI_MISO ;
120+
static const uint8_t SCK = PIN_SPI_SCK ;
121+
122+
/*
123+
* Wire Interfaces
124+
*/
125+
#define WIRE_INTERFACES_COUNT 1
126+
127+
#define PIN_WIRE_SDA (8)
128+
#define PIN_WIRE_SCL (11)
129+
130+
/*
131+
* QSPI interface for external flash
132+
*/
133+
#define PIN_QSPI_SCK 32
134+
#define PIN_QSPI_CS 33
135+
#define PIN_QSPI_DATA0 34
136+
#define PIN_QSPI_DATA1 35
137+
#define PIN_QSPI_DATA2 36
138+
#define PIN_QSPI_DATA3 37
139+
140+
// On-board QSPI Flash
141+
// If EXTERNAL_FLASH_DEVICES is not defined, all supported devices will be used
142+
#define EXTERNAL_FLASH_DEVICES GD25Q16C
143+
144+
#ifdef __cplusplus
145+
}
146+
#endif
147+
148+
/*----------------------------------------------------------------------------
149+
* Arduino objects - C++ only
150+
*----------------------------------------------------------------------------*/
151+
152+
#endif

Packages_Patches/adafruit/hardware/nrf52/1.1.0/boards.txt

+69
Original file line numberDiff line numberDiff line change
@@ -645,3 +645,72 @@ ninab112.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
645645
ninab112.menu.debug.l3=Level 3 (Segger SystemView)
646646
ninab112.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
647647
ninab112.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1
648+
649+
##################################################################
650+
## KH Add SparkFun Pro nRF52840 Mini
651+
##################################################################
652+
#**********************************************
653+
# SparkFun Pro nRF52840 Mini
654+
#**********************************************
655+
sparkfunnrf52840mini.name=SparkFun Pro nRF52840 Mini
656+
657+
# DFU Mode with CDC only
658+
sparkfunnrf52840mini.vid.0=0x1B4F
659+
sparkfunnrf52840mini.pid.0=0x002A
660+
661+
# DFU Mode with CDC + MSC (UF2)
662+
sparkfunnrf52840mini.vid.1=0x1B4F
663+
sparkfunnrf52840mini.pid.1=0x0029
664+
665+
# Application with CDC + MSC
666+
sparkfunnrf52840mini.vid.2=0x1B4F
667+
sparkfunnrf52840mini.pid.2=0x8029
668+
669+
# CircuitPython
670+
sparkfunnrf52840mini.vid.2=0x1B4F
671+
sparkfunnrf52840mini.pid.2=0x802A
672+
673+
sparkfunnrf52840mini.bootloader.tool=bootburn
674+
675+
# Upload
676+
sparkfunnrf52840mini.upload.tool=nrfutil
677+
sparkfunnrf52840mini.upload.protocol=nrfutil
678+
sparkfunnrf52840mini.upload.use_1200bps_touch=true
679+
sparkfunnrf52840mini.upload.wait_for_upload_port=true
680+
#sparkfunnrf52840mini.upload.native_usb=true
681+
682+
# Build
683+
sparkfunnrf52840mini.build.mcu=cortex-m4
684+
sparkfunnrf52840mini.build.f_cpu=64000000
685+
sparkfunnrf52840mini.build.board=NRF52840_FEATHER
686+
sparkfunnrf52840mini.build.core=nRF5
687+
sparkfunnrf52840mini.build.variant=sparkfun_nrf52840_mini
688+
sparkfunnrf52840mini.build.extra_flags=-DNRF52840_XXAA {build.flags.usb}
689+
sparkfunnrf52840mini.build.vid=0x1B4F
690+
sparkfunnrf52840mini.build.pid=0x5284
691+
sparkfunnrf52840mini.build.usb_manufacturer="SparkFun"
692+
sparkfunnrf52840mini.build.usb_product="nRF52840 Mini Breakout"
693+
694+
# SofDevice Menu
695+
# Ram & ROM size varies depending on SoftDevice (check linker script)
696+
697+
sparkfunnrf52840mini.menu.softdevice.s140v6=s140 6.1.1 r0
698+
sparkfunnrf52840mini.menu.softdevice.s140v6.build.sd_flags=-DS140
699+
sparkfunnrf52840mini.menu.softdevice.s140v6.build.sd_name=s140
700+
sparkfunnrf52840mini.menu.softdevice.s140v6.build.sd_version=6.1.1
701+
sparkfunnrf52840mini.menu.softdevice.s140v6.build.sd_fwid=0x00B6
702+
sparkfunnrf52840mini.menu.softdevice.s140v6.build.ldscript=nrf52840_s140_v6.ld
703+
sparkfunnrf52840mini.menu.softdevice.s140v6.upload.maximum_size=815104
704+
sparkfunnrf52840mini.menu.softdevice.s140v6.upload.maximum_data_size=248832
705+
706+
# Debug Menu
707+
sparkfunnrf52840mini.menu.debug.l0=Level 0 (Release)
708+
sparkfunnrf52840mini.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 -Os
709+
sparkfunnrf52840mini.menu.debug.l1=Level 1 (Error Message)
710+
sparkfunnrf52840mini.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 -Os
711+
sparkfunnrf52840mini.menu.debug.l2=Level 2 (Full Debug)
712+
sparkfunnrf52840mini.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 -Os
713+
sparkfunnrf52840mini.menu.debug.l3=Level 3 (Segger SystemView)
714+
sparkfunnrf52840mini.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 -Os
715+
716+
##################################################################
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
3+
Copyright (c) 2016 Sandeep Mistry All right reserved.
4+
Copyright (c) 2018, Adafruit Industries (adafruit.com)
5+
6+
This library is free software; you can redistribute it and/or
7+
modify it under the terms of the GNU Lesser General Public
8+
License as published by the Free Software Foundation; either
9+
version 2.1 of the License, or (at your option) any later version.
10+
11+
This library is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14+
See the GNU Lesser General Public License for more details.
15+
16+
You should have received a copy of the GNU Lesser General Public
17+
License along with this library; if not, write to the Free Software
18+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19+
*/
20+
21+
#include "variant.h"
22+
#include "wiring_constants.h"
23+
#include "wiring_digital.h"
24+
#include "nrf.h"
25+
26+
const uint32_t g_ADigitalPinMap[] =
27+
{
28+
// P0
29+
0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ,
30+
8 , 9 , 10, 11, 12, 13, 14, 15,
31+
16, 17, 18, 19, 20, 21, 22, 23,
32+
24, 25, 26, 27, 28, 29, 30, 31,
33+
34+
// P1
35+
32, 33, 34, 35, 36, 37, 38, 39,
36+
40, 41, 42, 43, 44, 45, 46, 47,
37+
48, 49, 50, 51, 52, 53, 54, 55,
38+
56, 57, 58, 59, 60, 61, 62, 63
39+
};
40+
void initVariant()
41+
{
42+
// LED1 & LED2
43+
pinMode(PIN_LED1, OUTPUT);
44+
ledOff(PIN_LED1);
45+
46+
pinMode(PIN_LED2, OUTPUT);
47+
ledOff(PIN_LED2);
48+
}
49+

0 commit comments

Comments
 (0)