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
49435450
Commit
49435450
authored
May 10, 2016
by
Sandeep Mistry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add RedBearLab nRF51822 variant
parent
ac708f9f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
215 additions
and
0 deletions
+215
-0
boards.txt
boards.txt
+42
-0
variants/RedBearLab_nRF51822/pins_arduino.h
variants/RedBearLab_nRF51822/pins_arduino.h
+17
-0
variants/RedBearLab_nRF51822/variant.cpp
variants/RedBearLab_nRF51822/variant.cpp
+61
-0
variants/RedBearLab_nRF51822/variant.h
variants/RedBearLab_nRF51822/variant.h
+95
-0
No files found.
boards.txt
View file @
49435450
...
...
@@ -135,6 +135,48 @@ BLENano.menu.softdevice.s130.build.extra_flags=-DNRF51 -DS130 -DNRF51_S130
BLENano.menu.softdevice.s130.build.ldscript=armgcc_s130_nrf51822_{build.chip}.ld
RedBearLab_nRF51822.name=RedBearLab nRF51822
RedBearLab_nRF51822.upload.tool=sandeepmistry:openocd
RedBearLab_nRF51822.upload.interface=cmsisdap
RedBearLab_nRF51822.upload.target=nrf51
RedBearLab_nRF51822.upload.maximum_size=262144
RedBearLab_nRF51822.bootloader.tool=sandeepmistry:openocd
RedBearLab_nRF51822.build.mcu=cortex-m0
RedBearLab_nRF51822.build.f_cpu=16000000
RedBearLab_nRF51822.build.board=REDBEARLAB_NRF51822
RedBearLab_nRF51822.build.core=nRF5
RedBearLab_nRF51822.build.variant=RedBearLab_nRF51822
RedBearLab_nRF51822.build.variant_system_lib=
RedBearLab_nRF51822.build.extra_flags=-DNRF51
RedBearLab_nRF51822.build.float_flags=
RedBearLab_nRF51822.build.ldscript=nrf51_{build.chip}.ld
RedBearLab_nRF51822.menu.version.1_0=1.0
RedBearLab_nRF51822.menu.version.1_0.build.chip=xxaa
RedBearLab_nRF51822.menu.version.1_5=1.5
RedBearLab_nRF51822.menu.version.1_5.build.chip=xxac
RedBearLab_nRF51822.menu.softdevice.none=None
RedBearLab_nRF51822.menu.softdevice.none.softdevice=none
RedBearLab_nRF51822.menu.softdevice.s110=S110
RedBearLab_nRF51822.menu.softdevice.s110.softdevice=s110
RedBearLab_nRF51822.menu.softdevice.s110.softdeviceversion=8.0.0
RedBearLab_nRF51822.menu.softdevice.s110.upload.maximum_size=151552
RedBearLab_nRF51822.menu.softdevice.s110.build.extra_flags=-DNRF51 -DS110 -DNRF51_S110
RedBearLab_nRF51822.menu.softdevice.s110.build.ldscript=armgcc_s110_nrf51822_{build.chip}.ld
RedBearLab_nRF51822.menu.softdevice.s130=S130
RedBearLab_nRF51822.menu.softdevice.s130.softdevice=s130
RedBearLab_nRF51822.menu.softdevice.s130.softdeviceversion=2.0.0
RedBearLab_nRF51822.menu.softdevice.s130.upload.maximum_size=151552
RedBearLab_nRF51822.menu.softdevice.s130.build.extra_flags=-DNRF51 -DS130 -DNRF51_S130
RedBearLab_nRF51822.menu.softdevice.s130.build.ldscript=armgcc_s130_nrf51822_{build.chip}.ld
Generic_nRF51822.name=Generic nRF51822
Generic_nRF51822.upload.tool=sandeepmistry:openocd
...
...
variants/RedBearLab_nRF51822/pins_arduino.h
0 → 100644
View file @
49435450
/*
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/RedBearLab_nRF51822/variant.cpp
0 → 100644
View file @
49435450
/*
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
[]
=
{
// D0 - D7
11
,
9
,
10
,
8
,
21
,
23
,
16
,
17
,
// D8 - D13
19
,
18
,
14
,
12
,
13
,
15
,
// A0 - A5
1
,
2
,
3
,
4
,
5
,
6
,
// SDA, SCL
29
,
28
,
// MISO, SCK, MOSI
22
,
25
,
30
,
// AREF
0
};
variants/RedBearLab_nRF51822/variant.h
0 → 100644
View file @
49435450
/*
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 _REDBEARLAB_NRF51822_
#define _REDBEARLAB_NRF51822_
/** 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 (26u)
#define NUM_DIGITAL_PINS (20u)
#define NUM_ANALOG_INPUTS (6u)
#define NUM_ANALOG_OUTPUTS (0u)
// LEDs
#define PIN_LED (13)
#define LED_BUILTIN PIN_LED
/*
* Analog pins
*/
#define PIN_A0 (14)
#define PIN_A1 (15)
#define PIN_A2 (16)
#define PIN_A3 (17)
#define PIN_A4 (18)
#define PIN_A5 (19)
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 (0)
#define PIN_SERIAL_TX (1)
/*
* SPI Interfaces
*/
#define SPI_INTERFACES_COUNT 1
#define PIN_SPI_MISO (22)
#define PIN_SPI_MOSI (24)
#define PIN_SPI_SCK (23)
static
const
uint8_t
SS
=
10
;
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_SDA (20u)
#define PIN_WIRE_SCL (21u)
#ifdef __cplusplus
}
#endif
#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