Commit 8915561f authored by Mathias Dahlström's avatar Mathias Dahlström Committed by Sandeep Mistry

Add nRF51 USB Dongle dev board (#67)

* Added nRF51 Dongle

* added travils build for nrf51 dongle

* Added the chip configratiopn to the travis task for nrf51dongle

* travis task update

Adding a reference to which version of the board variant to build.

* Reduced the PIN defintion for the NRF51 Dongle

* Added S110 softdevice option to nRF51 Dongle

* Added nRF51 Dongle link to README
parent c98a190e
...@@ -32,3 +32,4 @@ script: ...@@ -32,3 +32,4 @@ script:
- buildExampleSketch sandeepmistry:nRF5:STCT_nRF52_minidev 01.Basics Blink - buildExampleSketch sandeepmistry:nRF5:STCT_nRF52_minidev 01.Basics Blink
- buildExampleSketch sandeepmistry:nRF5:PCA1000X:board_variant=pca10000 01.Basics Blink - buildExampleSketch sandeepmistry:nRF5:PCA1000X:board_variant=pca10000 01.Basics Blink
- buildExampleSketch sandeepmistry:nRF5:PCA1000X:board_variant=nrf6310 01.Basics Blink - buildExampleSketch sandeepmistry:nRF5:PCA1000X:board_variant=nrf6310 01.Basics Blink
- buildExampleSketch sandeepmistry:nRF5:nRF51Dongle:version=1_1_0 01.Basics Blink
...@@ -24,6 +24,7 @@ Does not require a custom bootloader on the device. ...@@ -24,6 +24,7 @@ Does not require a custom bootloader on the device.
* [OSHChip](http://www.oshchip.org/) * [OSHChip](http://www.oshchip.org/)
* [RedBearLab BLE Nano](http://redbearlab.com/blenano/) * [RedBearLab BLE Nano](http://redbearlab.com/blenano/)
* [RedBearLab nRF51822](http://redbearlab.com/redbearlab-nrf51822/) * [RedBearLab nRF51822](http://redbearlab.com/redbearlab-nrf51822/)
* [Nordic NRF51 Dongle](http://www.nordicsemi.com/eng/Products/nRF51-Dongle)
## Installing ## Installing
......
...@@ -137,6 +137,45 @@ BluzDK.menu.softdevice.s130.upload.maximum_size=151552 ...@@ -137,6 +137,45 @@ BluzDK.menu.softdevice.s130.upload.maximum_size=151552
BluzDK.menu.softdevice.s130.build.extra_flags=-DNRF51 -DS130 -DNRF51_S130 BluzDK.menu.softdevice.s130.build.extra_flags=-DNRF51 -DS130 -DNRF51_S130
BluzDK.menu.softdevice.s130.build.ldscript=armgcc_s130_nrf51822_xxac.ld BluzDK.menu.softdevice.s130.build.ldscript=armgcc_s130_nrf51822_xxac.ld
nRF51Dongle.name= nRF51 Dongle (PCA10031)
nRF51Dongle.upload.tool=sandeepmistry:openocd
nRF51Dongle.upload.interface=cmsisdap
nRF51Dongle.upload.target=nrf51
nRF51Dongle.upload.maximum_size=262144
nRF51Dongle.bootloader.tool=sandeepmistry:openocd
nRF51Dongle.build.mcu=cortex-m0
nRF51Dongle.build.f_cpu=16000000
nRF51Dongle.build.board=GENERIC
nRF51Dongle.build.core=nRF5
nRF51Dongle.build.variant=nRF51Dongle
nRF51Dongle.build.variant_system_lib=
nRF51Dongle.build.extra_flags=-DNRF51
nRF51Dongle.build.float_flags=
nRF51Dongle.build.ldscript=nrf51_{build.chip}.ld
nRF51Dongle.build.lfclk_flags=-DUSE_LFXO
nRF51Dongle.menu.version.1_1_0=1.1.0
nRF51Dongle.menu.version.1_1_0.build.chip=xxac
nRF51Dongle.menu.softdevice.none=None
nRF51Dongle.menu.softdevice.none.softdevice=none
nRF51Dongle.menu.softdevice.s110=S110
nRF51Dongle.menu.softdevice.s110.softdevice=s110
nRF51Dongle.menu.softdevice.s110.softdeviceversion=8.0.0
nRF51Dongle.menu.softdevice.s110.upload.maximum_size=151552
nRF51Dongle.menu.softdevice.s110.build.extra_flags=-DNRF51 -DS110 -DNRF51_S110
nRF51Dongle.menu.softdevice.s110.build.ldscript=armgcc_s110_nrf51822_{build.chip}.ld
nRF51Dongle.menu.softdevice.s130=S130
nRF51Dongle.menu.softdevice.s130.softdevice=s130
nRF51Dongle.menu.softdevice.s130.softdeviceversion=2.0.1
nRF51Dongle.menu.softdevice.s130.upload.maximum_size=151552
nRF51Dongle.menu.softdevice.s130.build.extra_flags=-DNRF51 -DS130 -DNRF51_S130
nRF51Dongle.menu.softdevice.s130.build.ldscript=armgcc_s130_nrf51822_{build.chip}.ld
BLENano.name=RedBearLab BLE Nano BLENano.name=RedBearLab BLE Nano
......
/*
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"
/*
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
Copyright (c) 2016 Sandeep Mistry 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
*/
#include "variant.h"
const uint32_t g_ADigitalPinMap[] = {
//LEDs
21,
22,
23,
//A0-6
15,
16,
17,
18,
19,
20,
//Serial
9,
11
};
/*
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
Copyright (c) 2016 Sandeep Mistry 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
*/
#ifndef _VARIANT_NRF51_DONGLE_
#define _VARIANT_NRF51_DONGLE_
/** Master clock frequency */
#define VARIANT_MCK (16000000ul)
/*----------------------------------------------------------------------------
* Headers
*----------------------------------------------------------------------------*/
#include "WVariant.h"
#ifdef __cplusplus
extern "C"
{
#endif // __cplusplus
// Number of pins defined in PinDescription array
#define PINS_COUNT (11u)
#define NUM_DIGITAL_PINS (11u)
#define NUM_ANALOG_INPUTS (6u)
#define NUM_ANALOG_OUTPUTS (0u)
// LEDs
#define PIN_LED1 (21)
#define PIN_LED2 (22)
#define PIN_LED3 (23)
#define LED_BUILTIN PIN_LED1
/*
* Analog pins
*/
#define PIN_A0 (15)
#define PIN_A1 (16)
#define PIN_A2 (17)
#define PIN_A3 (18)
#define PIN_A4 (19)
#define PIN_A5 (20)
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 ;
#define ADC_RESOLUTION 10
/*
* Serial interfaces
*/
// Serial
#define PIN_SERIAL_RX (11)
#define PIN_SERIAL_TX (9)
#ifdef __cplusplus
}
#endif
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment