Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-nRF5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-nRF5
Commits
4c9101dc
Commit
4c9101dc
authored
Oct 21, 2020
by
John Maloney
Committed by
Sandeep Mistry
Dec 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add micro:bit V2 variant
parent
28c38551
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
188 additions
and
0 deletions
+188
-0
.travis.yml
.travis.yml
+1
-0
boards.txt
boards.txt
+33
-0
variants/BBCmicrobitV2/pins_arduino.h
variants/BBCmicrobitV2/pins_arduino.h
+17
-0
variants/BBCmicrobitV2/variant.cpp
variants/BBCmicrobitV2/variant.cpp
+59
-0
variants/BBCmicrobitV2/variant.h
variants/BBCmicrobitV2/variant.h
+78
-0
No files found.
.travis.yml
View file @
4c9101dc
...
@@ -42,3 +42,4 @@ script:
...
@@ -42,3 +42,4 @@ script:
-
buildExampleSketch sandeepmistry:nRF5:DWM1001-DEV 01.Basics Blink
-
buildExampleSketch sandeepmistry:nRF5:DWM1001-DEV 01.Basics Blink
-
buildExampleSketch sandeepmistry:nRF5:SeeedArchLink 01.Basics Blink
-
buildExampleSketch sandeepmistry:nRF5:SeeedArchLink 01.Basics Blink
-
buildExampleSketch sandeepmistry:nRF5:Generic_nRF52833 01.Basics Blink
-
buildExampleSketch sandeepmistry:nRF5:Generic_nRF52833 01.Basics Blink
-
buildExampleSketch sandeepmistry:nRF5:BBCmicrobitV2 01.Basics Blink
boards.txt
View file @
4c9101dc
...
@@ -54,6 +54,39 @@ Generic_nRF52833.menu.lfclk.lfsynt=Synthesized
...
@@ -54,6 +54,39 @@ Generic_nRF52833.menu.lfclk.lfsynt=Synthesized
Generic_nRF52833.menu.lfclk.lfsynt.build.lfclk_flags=-DUSE_LFSYNT
Generic_nRF52833.menu.lfclk.lfsynt.build.lfclk_flags=-DUSE_LFSYNT
BBCmicrobitV2.name=BBC micro:bit V2
BBCmicrobitV2.vid.0=0x0d28
BBCmicrobitV2.pid.0=0x0204
BBCmicrobitV2.upload.tool=sandeepmistry:openocd
BBCmicrobitV2.upload.protocol=cmsis-dap
BBCmicrobitV2.upload.target=nrf52
BBCmicrobitV2.upload.maximum_size=524288
BBCmicrobitV2.upload.setup_command=transport select swd;
BBCmicrobitV2.upload.use_1200bps_touch=false
BBCmicrobitV2.upload.wait_for_upload_port=false
BBCmicrobitV2.upload.native_usb=false
BBCmicrobitV2.bootloader.tool=sandeepmistry:openocd
BBCmicrobitV2.build.mcu=cortex-m4
BBCmicrobitV2.build.f_cpu=64000000
BBCmicrobitV2.build.board=BBC_MICROBIT_V2
BBCmicrobitV2.build.core=nRF5
BBCmicrobitV2.build.variant=BBCmicrobitV2
BBCmicrobitV2.build.variant_system_lib=
BBCmicrobitV2.build.extra_flags=-DNRF52833_XXAA
BBCmicrobitV2.build.float_flags=-mfloat-abi=hard -mfpu=fpv4-sp-d16
BBCmicrobitV2.build.ldscript=nrf52833_xxaa.ld
BBCmicrobitV2.build.lfclk_flags=-DUSE_LFSYNT
BBCmicrobitV2.menu.softdevice.none=None
BBCmicrobitV2.menu.softdevice.none.softdevice=none
BBCmicrobitV2.menu.softdevice.none.softdeviceversion=
# nRF52832 variants
# nRF52832 variants
###################
###################
...
...
variants/BBCmicrobitV2/pins_arduino.h
0 → 100755
View file @
4c9101dc
/*
Copyright (c) 2014-2015 Arduino LLC. 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
*/
// API compatibility
#include "variant.h"
variants/BBCmicrobitV2/variant.cpp
0 → 100755
View file @
4c9101dc
/* Pins for micro:bit V2 */
#include "variant.h"
const
uint32_t
g_ADigitalPinMap
[]
=
{
// 0 - 4
2
,
// A0, LEFT PAD
3
,
// A1, MIDDLE PAD
4
,
// A2, RIGHT PAD
31
,
// A3, COL3
28
,
// A4, COL1
// 5 - 9
14
,
// BTN A
37
,
// COL4, P1.05
11
,
// COL2
10
,
// NFC2
9
,
// NFC1
// 10-16
30
,
// A5, COL5
23
,
// BTN B
12
,
17
,
// SCK
1
,
// MISO
13
,
// MOSI
34
,
// P1.02
// 17 + 18
(
uint32_t
)
-
1
,
// 3.3V
(
uint32_t
)
-
1
,
// 3.3V
// 19 + 20
26
,
// SCL
32
,
// SDA, P1.00
// 21 - 25
21
,
// ROW1
22
,
// ROW2
15
,
// ROW3
24
,
// ROW4
19
,
// ROW5
// 26 - 29
36
,
// LOGO (touch sensor)
0
,
// SPEAKER (Note: Must use synthesized LF clock to make this pin available)
20
,
// RUN_MIC
5
,
// A6, MIC_IN
// 30 - 31
16
,
// I2C_INT_SDA
8
,
// I2C_INT_SCL
// 32 - 34
25
,
// COMBINED_SENSOR_INT
40
,
// RX, P1.08
6
,
// TX
};
variants/BBCmicrobitV2/variant.h
0 → 100755
View file @
4c9101dc
#ifndef _MICROBIT_V2_
#define _MICROBIT_V2_
// Master clock frequency
#define VARIANT_MCK (64000000ul)
#include "WVariant.h"
#ifdef __cplusplus
extern
"C"
{
#endif // __cplusplus
// Number of pins defined in PinDescription array
#define PINS_COUNT (35)
#define NUM_DIGITAL_PINS (35)
#define NUM_ANALOG_INPUTS (7)
#define NUM_ANALOG_OUTPUTS (0)
// LEDs
#define PIN_LED (13)
#define LED_BUILTIN PIN_LED
// Buttons
#define PIN_BUTTON_A (5)
#define PIN_BUTTON_B (11)
// Analog pins
#define PIN_A0 (0)
#define PIN_A1 (1)
#define PIN_A2 (2)
#define PIN_A3 (3)
#define PIN_A4 (4)
#define PIN_A5 (10)
#define PIN_A6 (29)
#define ADC_RESOLUTION 10
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
;
// Serial
#define PIN_SERIAL_RX (33)
#define PIN_SERIAL_TX (34)
// SPI
#define SPI_INTERFACES_COUNT 1
#define PIN_SPI_MISO (14)
#define PIN_SPI_MOSI (15)
#define PIN_SPI_SCK (13)
// Wire Interfaces (external and internal)
#define WIRE_INTERFACES_COUNT 2
#define PIN_WIRE_SDA (20)
#define PIN_WIRE_SCL (19)
#define PIN_WIRE1_SDA (30)
#define PIN_WIRE1_SCL (31)
#ifdef __cplusplus
}
#endif // __cplusplus
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment