Skip to content

Commit 1d82c8c

Browse files
authored
Merge pull request #328 from pyro9/Raytac_MDBT50Q_RX
Raytac mdbt50 q rx
2 parents 4fd1d0c + d5c2351 commit 1d82c8c

File tree

3 files changed

+181
-0
lines changed

3 files changed

+181
-0
lines changed

boards.txt

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,3 +368,57 @@ pca10056.menu.debug.l2=Level 2 (Full Debug)
368368
pca10056.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
369369
pca10056.menu.debug.l3=Level 3 (Segger SystemView)
370370
pca10056.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
371+
372+
# ----------------------------------
373+
# Raytac MDBT50Q – RX
374+
# ----------------------------------
375+
MDBT50QRX.name=Raytac MDBT50Q-RX dongle
376+
377+
# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App
378+
MDBT50QRX.vid.0=0x239A
379+
MDBT50QRX.pid.0=0x8029
380+
MDBT50QRX.vid.1=0x239A
381+
MDBT50QRX.pid.1=0x0029
382+
MDBT50QRX.vid.2=0x239A
383+
MDBT50QRX.pid.2=0x002A
384+
MDBT50QRX.vid.3=0x239A
385+
MDBT50QRX.pid.3=0x802A
386+
387+
# Upload
388+
MDBT50QRX.bootloader.tool=bootburn
389+
MDBT50QRX.upload.tool=nrfutil
390+
MDBT50QRX.upload.protocol=nrfutil
391+
MDBT50QRX.upload.use_1200bps_touch=true
392+
MDBT50QRX.upload.wait_for_upload_port=true
393+
MDBT50QRX.upload.maximum_size=815104
394+
MDBT50QRX.upload.maximum_data_size=248832
395+
396+
# Build
397+
MDBT50QRX.build.mcu=cortex-m4
398+
MDBT50QRX.build.f_cpu=64000000
399+
MDBT50QRX.build.board=MDBT50Q_RX
400+
MDBT50QRX.build.core=nRF5
401+
MDBT50QRX.build.variant=MDBT50Q_RX
402+
MDBT50QRX.build.usb_manufacturer="Raytac Corporation"
403+
MDBT50QRX.build.usb_product="Raytac MDBT50Q - RX"
404+
MDBT50QRX.build.extra_flags=-DNRF52840_XXAA -DARDUINO_MDBT50Q_RX {build.flags.usb}
405+
MDBT50QRX.build.ldscript=nrf52840_s140_v6.ld
406+
MDBT50QRX.build.vid=0x239A
407+
MDBT50QRX.build.pid=0x8029
408+
409+
# SofDevice Menu
410+
MDBT50QRX.menu.softdevice.s140v6=0.2.11 SoftDevice s140 6.1.1
411+
MDBT50QRX.menu.softdevice.s140v6.build.sd_name=s140
412+
MDBT50QRX.menu.softdevice.s140v6.build.sd_version=6.1.1
413+
MDBT50QRX.menu.softdevice.s140v6.build.sd_fwid=0x00B6
414+
415+
# Debug Menu
416+
MDBT50QRX.menu.debug.l0=Level 0 (Release)
417+
MDBT50QRX.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
418+
MDBT50QRX.menu.debug.l1=Level 1 (Error Message)
419+
MDBT50QRX.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
420+
MDBT50QRX.menu.debug.l2=Level 2 (Full Debug)
421+
MDBT50QRX.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
422+
MDBT50QRX.menu.debug.l3=Level 3 (Segger SystemView)
423+
MDBT50QRX.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3
424+

variants/MDBT50Q_RX/variant.cpp

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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+
// D0 .. D13
29+
45, // D0 is P1.13 (LED1)
30+
43, // D1 is P1.11 (LED2)
31+
15, // D2 is P0.15 (Button)
32+
};
33+
34+
void initVariant()
35+
{
36+
// LED1 & LED2
37+
pinMode(PIN_LED1, OUTPUT);
38+
ledOff(PIN_LED1);
39+
40+
pinMode(PIN_LED2, OUTPUT);
41+
ledOff(PIN_LED2);
42+
}
43+

variants/MDBT50Q_RX/variant.h

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
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_FEATHER52840_
20+
#define _VARIANT_FEATHER52840_
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 (3)
41+
#define NUM_DIGITAL_PINS (3)
42+
#define NUM_ANALOG_INPUTS (0) // A6 is used for battery, A7 is analog reference
43+
#define NUM_ANALOG_OUTPUTS (0)
44+
45+
// LEDs
46+
#define PIN_LED1 (0)
47+
#define PIN_LED2 (1)
48+
49+
#define LED_BUILTIN PIN_LED1
50+
#define LED_CONN PIN_LED2
51+
52+
#define LED_RED PIN_LED1
53+
#define LED_BLUE PIN_LED2
54+
55+
#define LED_STATE_ON 0 // State when LED is litted
56+
57+
#define PIN_DFU 2
58+
59+
// Buttons
60+
/*
61+
#define PIN_BUTTON1 (2)
62+
#define PIN_BUTTON2 (3)
63+
#define PIN_BUTTON3 (4)
64+
#define PIN_BUTTON4 (5)
65+
*/
66+
67+
#define ADC_RESOLUTION 14
68+
69+
// Bad things happen if the serial pins aren't defined. Instead
70+
// define them with an invalid pin number
71+
// Serial
72+
#define PIN_SERIAL_RX (3)
73+
#define PIN_SERIAL_TX (3)
74+
75+
76+
#ifdef __cplusplus
77+
}
78+
#endif
79+
80+
/*----------------------------------------------------------------------------
81+
* Arduino objects - C++ only
82+
*----------------------------------------------------------------------------*/
83+
84+
#endif

0 commit comments

Comments
 (0)