Commit bf534ec4 authored by João Pedro Vilas Boas's avatar João Pedro Vilas Boas Committed by Sandeep Mistry

Add NFR51 Smart Beacon Kit variant (#115)

* Add NFR51 Smart Beacon Kit to Boards

* Remove PCA20006 flag from Generic

* Fix Flags and Board Variant

* Fiz typos on Boards.txt

* Fix Wire (I2C) Lib

* Revert "Fiz typos on Boards.txt"

This reverts commit 7320c2a9df428828938d1e037ecba57251ca597f.

* Revert "Fix Wire (I2C) Lib"

This reverts commit 911d76d20af987cc2679fbacab47f7100d220ae9.

* Update Boards, Remove I2C changes made at this branch

* Change Variant Pin Mapping and Menu Placement
parent 921f1f7f
......@@ -23,6 +23,7 @@ Does not require a custom bootloader on the device.
* Nordic Semiconductor [nRF51822 Development Kit](https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF51822-Development-Kit) + [nRF51422 Development Kit](https://www.nordicsemi.com/eng/Products/ANT/nRF51422-Development-Kit)
* PCA10000
* PCA10001, PCA10002, PCA10003, PCA10004 via nRF6310(nRFgo)
* [Nordic Semiconductor NRF51 Smart Beacon Kit](https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF51822-Bluetooth-Smart-Beacon-Kit)
* [Nordic Semiconductor NRF51 Dongle](http://www.nordicsemi.com/eng/Products/nRF51-Dongle)
* [OSHChip](http://www.oshchip.org/)
* [RedBearLab BLE Nano](http://redbearlab.com/blenano/)
......
......@@ -258,7 +258,6 @@ Generic_nRF51822.menu.lfclk.lfrc.build.lfclk_flags=-DUSE_LFRC
Generic_nRF51822.menu.lfclk.lfsynt=Synthesized
Generic_nRF51822.menu.lfclk.lfsynt.build.lfclk_flags=-DUSE_LFSYNT
BBCmicrobit.name=BBC micro:bit
BBCmicrobit.vid.0=0x0d28
......@@ -441,6 +440,42 @@ 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
Beacon_PCA20006.name=Nordic Beacon Kit (PCA20006)
Beacon_PCA20006.upload.tool=sandeepmistry:openocd
Beacon_PCA20006.upload.target=nrf51
Beacon_PCA20006.upload.maximum_size=262144
Beacon_PCA20006.bootloader.tool=sandeepmistry:openocd
Beacon_PCA20006.build.mcu=cortex-m0
Beacon_PCA20006.build.f_cpu=16000000
Beacon_PCA20006.build.board=BOARD_PCA20006
Beacon_PCA20006.build.core=nRF5
Beacon_PCA20006.build.variant=PCA20006
Beacon_PCA20006.build.variant_system_lib=
Beacon_PCA20006.build.extra_flags=-DNRF51
Beacon_PCA20006.build.float_flags=
Beacon_PCA20006.build.ldscript=nrf51_xxaa.ld
Beacon_PCA20006.build.lfclk_flags=-DUSE_LFXO
Beacon_PCA20006.menu.softdevice.none=None
Beacon_PCA20006.menu.softdevice.none.softdevice=none
Beacon_PCA20006.menu.softdevice.s110=S110
Beacon_PCA20006.menu.softdevice.s110.softdevice=s110
Beacon_PCA20006.menu.softdevice.s110.softdeviceversion=8.0.0
Beacon_PCA20006.menu.softdevice.s110.upload.maximum_size=151552
Beacon_PCA20006.menu.softdevice.s110.build.extra_flags=-DNRF51 -DS110 -DNRF51_S110
Beacon_PCA20006.menu.softdevice.s110.build.ldscript=armgcc_s110_nrf51822_xxaa.ld
Beacon_PCA20006.menu.softdevice.s130=S130
Beacon_PCA20006.menu.softdevice.s130.softdevice=s130
Beacon_PCA20006.menu.softdevice.s130.softdeviceversion=2.0.1
Beacon_PCA20006.menu.softdevice.s130.upload.maximum_size=151552
Beacon_PCA20006.menu.softdevice.s130.build.extra_flags=-DNRF51 -DS130 -DNRF51_S130
Beacon_PCA20006.menu.softdevice.s130.build.ldscript=armgcc_s130_nrf51822_xxaa.ld
TinyBLE.name= TinyBLE
......
/*
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[] = {
0,
1,
2,
3,
(uint32_t)-1,
5,
(uint32_t)-1,
(uint32_t)-1,
8,
9,
(uint32_t)-1,
11,
12,
(uint32_t)-1,
(uint32_t)-1,
15,
16,
(uint32_t)-1,
18,
(uint32_t)-1,
20,
21,
(uint32_t)-1,
(uint32_t)-1,
24,
(uint32_t)-1,
(uint32_t)-1,
(uint32_t)-1,
(uint32_t)-1,
(uint32_t)-1,
(uint32_t)-1,
(uint32_t)-1
};
/*
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_BOARD_PCA20006_
#define _VARIANT_BOARD_PCA20006_
/** 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 (32u)
#define NUM_DIGITAL_PINS (32u)
#define NUM_ANALOG_INPUTS (6u)
#define NUM_ANALOG_OUTPUTS (0u)
// LEDs
#define PIN_LED (15)
#define PIN_LEDR (16)
#define PIN_LEDG (12)
#define PIN_LEDB (15)
#define LED_BUILTIN PIN_LED
// Buttons
#define PIN_BUTTON (08)
#define PIN_SW1 (08)
#define PIN_SW2 (18)
/*
* Analog pins
*/
#define PIN_A0 (1)
#define PIN_A1 (2)
#define PIN_A2 (3)
#define PIN_A3 (4)
#define PIN_A4 (5)
#define PIN_A5 (6)
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)
/*
* SPI Interfaces
*/
#define SPI_INTERFACES_COUNT 1
#define PIN_SPI_MISO (0)
#define PIN_SPI_MOSI (1)
#define PIN_SPI_SCK (2)
static const uint8_t SS = 3 ;
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 (21u)
#define PIN_WIRE_SCL (24u)
static const uint8_t SDA = PIN_WIRE_SDA;
static const uint8_t SCL = PIN_WIRE_SCL;
#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