Merge pull request #10243 from aabadie/pr/board/common_nrf51
boards/common: add common place for nrf51 based boards
This commit is contained in:
commit
ac50b4a052
@ -1,3 +1,4 @@
|
|||||||
MODULE = board
|
MODULE = board
|
||||||
|
DIRS = $(RIOTBOARD)/common/nrf51
|
||||||
|
|
||||||
include $(RIOTBASE)/Makefile.base
|
include $(RIOTBASE)/Makefile.base
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
ifneq (,$(filter gnrc_netdev_default netdev_default,$(USEMODULE)))
|
include $(RIOTBOARD)/common/nrf51/Makefile.dep
|
||||||
USEMODULE += nrfmin
|
|
||||||
endif
|
|
||||||
|
|||||||
@ -1,15 +1,8 @@
|
|||||||
# Put defined MCU peripherals here (in alphabetical order)
|
# Put defined MCU peripherals here (in alphabetical order)
|
||||||
FEATURES_PROVIDED += periph_adc
|
FEATURES_PROVIDED += periph_adc
|
||||||
FEATURES_PROVIDED += periph_gpio periph_gpio_irq
|
|
||||||
FEATURES_PROVIDED += periph_i2c
|
FEATURES_PROVIDED += periph_i2c
|
||||||
FEATURES_PROVIDED += periph_rtt
|
|
||||||
FEATURES_PROVIDED += periph_spi
|
FEATURES_PROVIDED += periph_spi
|
||||||
FEATURES_PROVIDED += periph_timer
|
|
||||||
FEATURES_PROVIDED += periph_uart
|
FEATURES_PROVIDED += periph_uart
|
||||||
|
|
||||||
# Various other features (if any)
|
# include common nrf51 based boards features
|
||||||
|
include $(RIOTBOARD)/common/nrf51/Makefile.features
|
||||||
# The board MPU family (used for grouping by the CI system)
|
|
||||||
FEATURES_MCU_GROUP = cortex_m0_2
|
|
||||||
|
|
||||||
include $(RIOTCPU)/nrf51/Makefile.features
|
|
||||||
|
|||||||
@ -1,16 +1,18 @@
|
|||||||
# define the used CPU
|
# define the used CPU model
|
||||||
export CPU = nrf51
|
|
||||||
export CPU_MODEL = nrf51x22xxaa
|
export CPU_MODEL = nrf51x22xxaa
|
||||||
|
|
||||||
|
# include common nrf51 boards module into the build
|
||||||
|
USEMODULE += boards_common_nrf51
|
||||||
|
|
||||||
# define the default port depending on the host OS
|
# define the default port depending on the host OS
|
||||||
PORT_LINUX ?= /dev/ttyUSB0
|
PORT_LINUX ?= /dev/ttyUSB0
|
||||||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
||||||
|
|
||||||
# setup serial terminal
|
# this board uses an ST-Link v2 debug adapter
|
||||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
DEBUG_ADAPTER ?= stlink
|
||||||
|
STLINK_VERSION ?= 2
|
||||||
|
|
||||||
export DEBUG_ADAPTER ?= stlink
|
PROGRAMMER = openocd
|
||||||
export STLINK_VERSION ?= 2
|
|
||||||
|
|
||||||
# this board uses openocd
|
# include nrf51 boards common configuration
|
||||||
include $(RIOTMAKE)/tools/openocd.inc.mk
|
include $(RIOTBOARD)/common/nrf51/Makefile.include
|
||||||
|
|||||||
@ -1,28 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2014 Christian Mehlis <mehlis@inf.fu-berlin.de>
|
|
||||||
*
|
|
||||||
* This file is subject to the terms and conditions of the GNU Lesser General
|
|
||||||
* Public License v2.1. See the file LICENSE in the top level directory for more
|
|
||||||
* details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ingroup boards_airfy-beacon
|
|
||||||
* @{
|
|
||||||
*
|
|
||||||
* @file
|
|
||||||
* @brief Board specific implementations for the Airfy Beacon board
|
|
||||||
*
|
|
||||||
* @author Christian Mehlis <mehlis@inf.fu-berlin.de>
|
|
||||||
*
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "board.h"
|
|
||||||
#include "cpu.h"
|
|
||||||
|
|
||||||
void board_init(void)
|
|
||||||
{
|
|
||||||
/* initialize the CPU */
|
|
||||||
cpu_init();
|
|
||||||
}
|
|
||||||
@ -19,27 +19,10 @@
|
|||||||
#ifndef BOARD_H
|
#ifndef BOARD_H
|
||||||
#define BOARD_H
|
#define BOARD_H
|
||||||
|
|
||||||
#include "cpu.h"
|
#include "board_common.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {}
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @name Xtimer configuration
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
#define XTIMER_WIDTH (24)
|
|
||||||
#define XTIMER_BACKOFF (40)
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Initialize board specific hardware, including clock, LEDs and std-IO
|
|
||||||
*/
|
|
||||||
void board_init(void);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
} /* end extern "C" */
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* BOARD_H */
|
#endif /* BOARD_H */
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
#define PERIPH_CONF_H
|
#define PERIPH_CONF_H
|
||||||
|
|
||||||
#include "periph_cpu.h"
|
#include "periph_cpu.h"
|
||||||
|
#include "periph_conf_common.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -41,20 +42,6 @@
|
|||||||
* 2: derived from HFCLK */
|
* 2: derived from HFCLK */
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
|
||||||
* @name Timer configuration
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
static const timer_conf_t timer_config[] = {
|
|
||||||
/* dev, channels, width */
|
|
||||||
{ NRF_TIMER0, 3, TIMER_BITMODE_BITMODE_24Bit, TIMER0_IRQn }
|
|
||||||
};
|
|
||||||
|
|
||||||
#define TIMER_0_ISR isr_timer0
|
|
||||||
|
|
||||||
#define TIMER_NUMOF (sizeof(timer_config) / sizeof(timer_config[0]))
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name UART configuration
|
* @name UART configuration
|
||||||
*
|
*
|
||||||
@ -66,16 +53,6 @@ static const timer_conf_t timer_config[] = {
|
|||||||
#define UART_PIN_TX 18
|
#define UART_PIN_TX 18
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
|
||||||
* @name Real time counter configuration
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
#define RTT_NUMOF (1U)
|
|
||||||
#define RTT_DEV (1) /* NRF_RTC1 */
|
|
||||||
#define RTT_MAX_VALUE (0x00ffffff)
|
|
||||||
#define RTT_FREQUENCY (1024)
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name SPI configuration
|
* @name SPI configuration
|
||||||
* @{
|
* @{
|
||||||
|
|||||||
@ -1,14 +1,7 @@
|
|||||||
# Put defined MCU peripherals here (in alphabetical order)
|
# Put defined MCU peripherals here (in alphabetical order)
|
||||||
FEATURES_PROVIDED += periph_gpio periph_gpio_irq
|
|
||||||
FEATURES_PROVIDED += periph_i2c
|
FEATURES_PROVIDED += periph_i2c
|
||||||
FEATURES_PROVIDED += periph_rtt
|
|
||||||
FEATURES_PROVIDED += periph_timer
|
|
||||||
FEATURES_PROVIDED += periph_uart
|
FEATURES_PROVIDED += periph_uart
|
||||||
FEATURES_PROVIDED += periph_pwm
|
FEATURES_PROVIDED += periph_pwm
|
||||||
|
|
||||||
# Various other features (if any)
|
# include common nrf51 based boards features
|
||||||
|
include $(RIOTBOARD)/common/nrf51/Makefile.features
|
||||||
# The board MPU family (used for grouping by the CI system)
|
|
||||||
FEATURES_MCU_GROUP = cortex_m0_1
|
|
||||||
|
|
||||||
include $(RIOTCPU)/nrf51/Makefile.features
|
|
||||||
|
|||||||
@ -1,16 +1,14 @@
|
|||||||
# define the used CPU
|
# define the used CPU
|
||||||
export CPU = nrf51
|
|
||||||
export CPU_MODEL = nrf51x22xxab
|
export CPU_MODEL = nrf51x22xxab
|
||||||
|
|
||||||
# define the default port depending on the host OS
|
# define the default port depending on the host OS
|
||||||
PORT_LINUX ?= /dev/ttyACM0
|
PORT_LINUX ?= /dev/ttyACM0
|
||||||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
||||||
|
|
||||||
# setup serial terminal
|
# this board supports flashing through plain fscopy, using JLink or using
|
||||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
# openocd
|
||||||
|
|
||||||
# we support flashing through plain fscopy or using JLink
|
|
||||||
PROGRAMMER ?= fscopy
|
PROGRAMMER ?= fscopy
|
||||||
|
|
||||||
ifeq (fscopy,$(PROGRAMMER))
|
ifeq (fscopy,$(PROGRAMMER))
|
||||||
export FFLAGS =
|
export FFLAGS =
|
||||||
export DEBUGGER_FLAGS =
|
export DEBUGGER_FLAGS =
|
||||||
@ -18,9 +16,9 @@ ifeq (fscopy,$(PROGRAMMER))
|
|||||||
export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh
|
export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh
|
||||||
export DEBUGGER =
|
export DEBUGGER =
|
||||||
export DEBUGSERVER =
|
export DEBUGSERVER =
|
||||||
else ifeq (jlink,$(PROGRAMMER))
|
else ifeq (openocd,$(PROGRAMMER))
|
||||||
export JLINK_DEVICE := nrf51822
|
DEBUG_ADAPTER = jlink
|
||||||
include $(RIOTMAKE)/tools/jlink.inc.mk
|
|
||||||
else
|
|
||||||
$(info ERROR: invalid flash tool specified)
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# include nrf51 boards common configuration
|
||||||
|
include $(RIOTBOARD)/common/nrf51/Makefile.include
|
||||||
|
|||||||
@ -22,21 +22,12 @@
|
|||||||
#ifndef BOARD_H
|
#ifndef BOARD_H
|
||||||
#define BOARD_H
|
#define BOARD_H
|
||||||
|
|
||||||
#include "cpu.h"
|
#include "board_common.h"
|
||||||
#include "periph_conf.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
|
||||||
* @name Xtimer configuration
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
#define XTIMER_WIDTH (24)
|
|
||||||
#define XTIMER_BACKOFF (40)
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name LED matrix pin configuration
|
* @name LED matrix pin configuration
|
||||||
* @{
|
* @{
|
||||||
@ -65,11 +56,6 @@ extern "C" {
|
|||||||
#define BTN1_MODE GPIO_IN
|
#define BTN1_MODE GPIO_IN
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Initialize the board, also triggers the CPU initialization
|
|
||||||
*/
|
|
||||||
void board_init(void);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
3
boards/common/nrf51/Makefile
Normal file
3
boards/common/nrf51/Makefile
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
MODULE = boards_common_nrf51
|
||||||
|
|
||||||
|
include $(RIOTBASE)/Makefile.base
|
||||||
3
boards/common/nrf51/Makefile.dep
Normal file
3
boards/common/nrf51/Makefile.dep
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
ifneq (,$(filter gnrc_netdev_default netdev_default,$(USEMODULE)))
|
||||||
|
USEMODULE += nrfmin
|
||||||
|
endif
|
||||||
5
boards/common/nrf51/Makefile.features
Normal file
5
boards/common/nrf51/Makefile.features
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Put defined MCU peripherals here (in alphabetical order)
|
||||||
|
FEATURES_PROVIDED += periph_rtt
|
||||||
|
FEATURES_PROVIDED += periph_timer
|
||||||
|
|
||||||
|
-include $(RIOTCPU)/nrf51/Makefile.features
|
||||||
18
boards/common/nrf51/Makefile.include
Normal file
18
boards/common/nrf51/Makefile.include
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# define the used CPU
|
||||||
|
export CPU = nrf51
|
||||||
|
|
||||||
|
# setup serial terminal
|
||||||
|
include $(RIOTMAKE)/tools/serial.inc.mk
|
||||||
|
|
||||||
|
# include common nrf51 headers
|
||||||
|
INCLUDES += -I$(RIOTBOARD)/common/nrf51/include
|
||||||
|
|
||||||
|
ifeq ($(PROGRAMMER),openocd)
|
||||||
|
# use common openocd configuration for nrf51
|
||||||
|
export OPENOCD_CONFIG = $(RIOTBOARD)/common/nrf51/dist/openocd.cfg
|
||||||
|
include $(RIOTMAKE)/tools/openocd.inc.mk
|
||||||
|
else ifeq ($(PROGRAMMER),jlink)
|
||||||
|
# setup JLink for flashing
|
||||||
|
export JLINK_DEVICE := nrf51822
|
||||||
|
include $(RIOTMAKE)/tools/jlink.inc.mk
|
||||||
|
endif
|
||||||
@ -7,11 +7,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ingroup boards_yunjia-nrf51822
|
* @ingroup boards_common_nrf51
|
||||||
* @{
|
* @{
|
||||||
*
|
*
|
||||||
* @file
|
* @file
|
||||||
* @brief Board specific implementations for the Yunjia NRF51822 board
|
* @brief Board initialization for the nRF51 based boards
|
||||||
*
|
*
|
||||||
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
||||||
*
|
*
|
||||||
50
boards/common/nrf51/include/board_common.h
Normal file
50
boards/common/nrf51/include/board_common.h
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2017 Freie Universität Berlin
|
||||||
|
* 2018 Inria
|
||||||
|
*
|
||||||
|
* This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
* directory for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup boards_common_nrf51 NRF51 common
|
||||||
|
* @ingroup boards_common
|
||||||
|
* @brief Shared files and configuration for some nRF51 boards.
|
||||||
|
* @{
|
||||||
|
*
|
||||||
|
* @file
|
||||||
|
* @brief Shared configuration for some nRF51-based boards
|
||||||
|
*
|
||||||
|
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
||||||
|
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BOARD_COMMON_H
|
||||||
|
#define BOARD_COMMON_H
|
||||||
|
|
||||||
|
#include "cpu.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Xtimer configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define XTIMER_WIDTH (24)
|
||||||
|
#define XTIMER_BACKOFF (40)
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Initialize the platform
|
||||||
|
*/
|
||||||
|
void board_init(void);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* BOARD_COMMON_H */
|
||||||
|
/** @} */
|
||||||
56
boards/common/nrf51/include/periph_conf_common.h
Normal file
56
boards/common/nrf51/include/periph_conf_common.h
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2018 Inria
|
||||||
|
*
|
||||||
|
* This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
* directory for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ingroup boards_common_nrf51
|
||||||
|
* @{
|
||||||
|
*
|
||||||
|
* @file
|
||||||
|
* @brief Common peripheral MCU configuration for some nrf51 based boards
|
||||||
|
*
|
||||||
|
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PERIPH_CONF_COMMON_H
|
||||||
|
#define PERIPH_CONF_COMMON_H
|
||||||
|
|
||||||
|
#include "periph_cpu.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Timer configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
static const timer_conf_t timer_config[] = {
|
||||||
|
/* dev, channels, width */
|
||||||
|
{ NRF_TIMER0, 3, TIMER_BITMODE_BITMODE_24Bit, TIMER0_IRQn }
|
||||||
|
};
|
||||||
|
|
||||||
|
#define TIMER_0_ISR isr_timer0
|
||||||
|
|
||||||
|
#define TIMER_NUMOF (sizeof(timer_config) / sizeof(timer_config[0]))
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Real time counter configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define RTT_NUMOF (1U)
|
||||||
|
#define RTT_DEV (1) /* NRF_RTC1 */
|
||||||
|
#define RTT_MAX_VALUE (0x00ffffff)
|
||||||
|
#define RTT_FREQUENCY (1024)
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
} /* end extern "C" */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* PERIPH_CONF_COMMON_H */
|
||||||
@ -8,6 +8,4 @@ ifneq (,$(filter saul_default,$(USEMODULE)))
|
|||||||
USEMODULE += mma8x5x
|
USEMODULE += mma8x5x
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (,$(filter gnrc_netdev_default netdev_default,$(USEMODULE)))
|
include $(RIOTBOARD)/common/nrf51/Makefile.dep
|
||||||
USEMODULE += nrfmin
|
|
||||||
endif
|
|
||||||
|
|||||||
@ -1,13 +1,6 @@
|
|||||||
# Put defined MCU peripherals here (in alphabetical order)
|
# Put defined MCU peripherals here (in alphabetical order)
|
||||||
FEATURES_PROVIDED += periph_gpio periph_gpio_irq
|
|
||||||
FEATURES_PROVIDED += periph_i2c
|
FEATURES_PROVIDED += periph_i2c
|
||||||
FEATURES_PROVIDED += periph_rtt
|
|
||||||
FEATURES_PROVIDED += periph_timer
|
|
||||||
FEATURES_PROVIDED += periph_uart
|
FEATURES_PROVIDED += periph_uart
|
||||||
|
|
||||||
# Various other features (if any)
|
# include common nrf51 based boards features
|
||||||
|
include $(RIOTBOARD)/common/nrf51/Makefile.features
|
||||||
# The board MPU family (used for grouping by the CI system)
|
|
||||||
FEATURES_MCU_GROUP = cortex_m0_1
|
|
||||||
|
|
||||||
include $(RIOTCPU)/nrf51/Makefile.features
|
|
||||||
|
|||||||
@ -1,16 +1,14 @@
|
|||||||
# define the used CPU
|
# define the used CPU
|
||||||
export CPU = nrf51
|
|
||||||
export CPU_MODEL = nrf51x22xxab
|
export CPU_MODEL = nrf51x22xxab
|
||||||
|
|
||||||
# define the default port depending on the host OS
|
# define the default port depending on the host OS
|
||||||
PORT_LINUX ?= /dev/ttyACM0
|
PORT_LINUX ?= /dev/ttyACM0
|
||||||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
||||||
|
|
||||||
# setup serial terminal
|
# this board supports flashing through plain fscopy, using JLink or using
|
||||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
# openocd. Default programmer is fscopy
|
||||||
|
|
||||||
# we support flashing through plain fscopy or using JLink
|
|
||||||
PROGRAMMER ?= fscopy
|
PROGRAMMER ?= fscopy
|
||||||
|
|
||||||
ifeq (fscopy,$(PROGRAMMER))
|
ifeq (fscopy,$(PROGRAMMER))
|
||||||
export FFLAGS =
|
export FFLAGS =
|
||||||
export DEBUGGER_FLAGS =
|
export DEBUGGER_FLAGS =
|
||||||
@ -18,9 +16,10 @@ ifeq (fscopy,$(PROGRAMMER))
|
|||||||
export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh
|
export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh
|
||||||
export DEBUGGER =
|
export DEBUGGER =
|
||||||
export DEBUGSERVER =
|
export DEBUGSERVER =
|
||||||
else ifeq (jlink,$(PROGRAMMER))
|
else ifeq (openocd,$(PROGRAMMER))
|
||||||
export JLINK_DEVICE := nrf51822
|
# this board uses a daplink adapter by default
|
||||||
include $(RIOTMAKE)/tools/jlink.inc.mk
|
DEBUG_ADAPTER = dap
|
||||||
else
|
|
||||||
$(info ERROR: invalid flash tool specified)
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# include nrf51 boards common configuration
|
||||||
|
include $(RIOTBOARD)/common/nrf51/Makefile.include
|
||||||
|
|||||||
@ -20,21 +20,12 @@
|
|||||||
#ifndef BOARD_H
|
#ifndef BOARD_H
|
||||||
#define BOARD_H
|
#define BOARD_H
|
||||||
|
|
||||||
#include "cpu.h"
|
#include "board_common.h"
|
||||||
#include "periph_conf.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
|
||||||
* @name Xtimer configuration
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
#define XTIMER_WIDTH (24)
|
|
||||||
#define XTIMER_BACKOFF (40)
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name LED matrix pin configuration
|
* @name LED matrix pin configuration
|
||||||
* @{
|
* @{
|
||||||
@ -79,11 +70,6 @@ extern "C" {
|
|||||||
#define MAG3110_PARAM_ADDR 0x0e
|
#define MAG3110_PARAM_ADDR 0x0e
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Initialize the board, also triggers the CPU initialization
|
|
||||||
*/
|
|
||||||
void board_init(void);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
ifneq (,$(filter gnrc_netdev_default netdev_default,$(USEMODULE)))
|
include $(RIOTBOARD)/common/nrf51/Makefile.dep
|
||||||
USEMODULE += nrfmin
|
|
||||||
endif
|
|
||||||
|
|||||||
@ -1,12 +1,5 @@
|
|||||||
# Put defined MCU peripherals here (in alphabetical order)
|
# Put defined MCU peripherals here (in alphabetical order)
|
||||||
FEATURES_PROVIDED += periph_gpio periph_gpio_irq
|
|
||||||
FEATURES_PROVIDED += periph_rtt
|
|
||||||
FEATURES_PROVIDED += periph_timer
|
|
||||||
FEATURES_PROVIDED += periph_uart
|
FEATURES_PROVIDED += periph_uart
|
||||||
|
|
||||||
# Various other features (if any)
|
# include common nrf51 based boards features
|
||||||
|
include $(RIOTBOARD)/common/nrf51/Makefile.features
|
||||||
# The board MPU family (used for grouping by the CI system)
|
|
||||||
FEATURES_MCU_GROUP = cortex_m0_1
|
|
||||||
|
|
||||||
include $(RIOTCPU)/nrf51/Makefile.features
|
|
||||||
|
|||||||
@ -1,14 +1,17 @@
|
|||||||
# define the used CPU
|
# define the used CPU
|
||||||
export CPU = nrf51
|
|
||||||
export CPU_MODEL = nrf51x22xxab
|
export CPU_MODEL = nrf51x22xxab
|
||||||
|
|
||||||
# define the default port depending on the host OS
|
# define the default port depending on the host OS
|
||||||
PORT_LINUX ?= /dev/ttyACM0
|
PORT_LINUX ?= /dev/ttyACM0
|
||||||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
||||||
|
|
||||||
# setup JLink for flashing
|
# use jlink to program this board
|
||||||
export JLINK_DEVICE := nrf51822
|
PROGRAMMER ?= jlink
|
||||||
include $(RIOTMAKE)/tools/jlink.inc.mk
|
|
||||||
|
|
||||||
# setup serial terminal
|
# set required jlink debug adapter for openocd if it's used
|
||||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
ifeq (openocd,$(PROGRAMMER))
|
||||||
|
DEBUG_ADAPTER = jlink
|
||||||
|
endif
|
||||||
|
|
||||||
|
# include nrf51 boards common configuration
|
||||||
|
include $(RIOTBOARD)/common/nrf51/Makefile.include
|
||||||
|
|||||||
@ -19,21 +19,12 @@
|
|||||||
#ifndef BOARD_H
|
#ifndef BOARD_H
|
||||||
#define BOARD_H
|
#define BOARD_H
|
||||||
|
|
||||||
#include "cpu.h"
|
#include "board_common.h"
|
||||||
#include "periph_conf.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
|
||||||
* @name Xtimer configuration
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
#define XTIMER_WIDTH (24)
|
|
||||||
#define XTIMER_BACKOFF (40)
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name LED pin definitions and handlers
|
* @name LED pin definitions and handlers
|
||||||
* @{
|
* @{
|
||||||
@ -59,11 +50,6 @@ extern "C" {
|
|||||||
#define LED2_TOGGLE (NRF_GPIO->OUT ^= LED2_MASK)
|
#define LED2_TOGGLE (NRF_GPIO->OUT ^= LED2_MASK)
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Initialize the board, also triggers the CPU initialization
|
|
||||||
*/
|
|
||||||
void board_init(void);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -20,6 +20,7 @@
|
|||||||
#define PERIPH_CONF_H
|
#define PERIPH_CONF_H
|
||||||
|
|
||||||
#include "periph_cpu.h"
|
#include "periph_cpu.h"
|
||||||
|
#include "periph_conf_common.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -40,30 +41,6 @@ extern "C" {
|
|||||||
* 2: derived from HFCLK */
|
* 2: derived from HFCLK */
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
|
||||||
* @name Timer configuration
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
static const timer_conf_t timer_config[] = {
|
|
||||||
/* dev, channels, width */
|
|
||||||
{ NRF_TIMER0, 3, TIMER_BITMODE_BITMODE_24Bit, TIMER0_IRQn }
|
|
||||||
};
|
|
||||||
|
|
||||||
#define TIMER_0_ISR isr_timer0
|
|
||||||
|
|
||||||
#define TIMER_NUMOF (sizeof(timer_config) / sizeof(timer_config[0]))
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @name Real time counter configuration
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
#define RTT_NUMOF (1U)
|
|
||||||
#define RTT_DEV (1) /* NRF_RTC1 */
|
|
||||||
#define RTT_MAX_VALUE (0x00ffffff)
|
|
||||||
#define RTT_FREQUENCY (1024)
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name UART configuration
|
* @name UART configuration
|
||||||
* @{
|
* @{
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
ifneq (,$(filter gnrc_netdev_default netdev_default,$(USEMODULE)))
|
include $(RIOTBOARD)/common/nrf51/Makefile.dep
|
||||||
USEMODULE += nrfmin
|
|
||||||
endif
|
|
||||||
|
|||||||
@ -1,13 +1,8 @@
|
|||||||
# Put defined MCU peripherals here (in alphabetical order)
|
# Put defined MCU peripherals here (in alphabetical order)
|
||||||
FEATURES_PROVIDED += periph_gpio periph_gpio_irq
|
|
||||||
FEATURES_PROVIDED += periph_rtt
|
|
||||||
FEATURES_PROVIDED += periph_spi
|
FEATURES_PROVIDED += periph_spi
|
||||||
FEATURES_PROVIDED += periph_timer
|
|
||||||
FEATURES_PROVIDED += periph_uart
|
FEATURES_PROVIDED += periph_uart
|
||||||
|
|
||||||
# Various other features (if any)
|
# include common nrf51 based boards features
|
||||||
|
include $(RIOTBOARD)/common/nrf51/Makefile.features
|
||||||
# The board MPU family (used for grouping by the CI system)
|
|
||||||
FEATURES_MCU_GROUP = cortex_m0_2
|
|
||||||
|
|
||||||
include $(RIOTCPU)/nrf51/Makefile.features
|
include $(RIOTCPU)/nrf51/Makefile.features
|
||||||
|
|||||||
@ -1,21 +1,17 @@
|
|||||||
# define the used CPU
|
# define the used CPU
|
||||||
export CPU = nrf51
|
|
||||||
export CPU_MODEL = nrf51x22xxaa
|
export CPU_MODEL = nrf51x22xxaa
|
||||||
|
|
||||||
# set default port depending on operating system
|
# set default port depending on operating system
|
||||||
PORT_LINUX ?= /dev/ttyUSB0
|
PORT_LINUX ?= /dev/ttyUSB0
|
||||||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
||||||
|
|
||||||
# define flash and debugging environment
|
# use jlink to program this board
|
||||||
export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh
|
PROGRAMMER ?= jlink
|
||||||
export DEBUGGER = $(RIOTBOARD)/$(BOARD)/dist/debug.sh
|
|
||||||
export DEBUGSERVER = JLinkGDBServer -device nrf51822 -if SWD
|
|
||||||
export RESET = $(RIOTBOARD)/$(BOARD)/dist/reset.sh
|
|
||||||
|
|
||||||
HEXFILE = $(BINFILE)
|
# set required debug adapter for openocd if it's used
|
||||||
export FFLAGS = $(BINDIR) $(HEXFILE)
|
ifeq (openocd,$(PROGRAMMER))
|
||||||
export DEBUGGER_FLAGS = $(BINDIR) $(ELFFILE)
|
DEBUG_ADAPTER = jlink
|
||||||
export RESET_FLAGS = $(BINDIR)
|
endif
|
||||||
|
|
||||||
# setup serial terminal
|
# include nrf51 boards common configuration
|
||||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
include $(RIOTBOARD)/common/nrf51/Makefile.include
|
||||||
|
|||||||
17
boards/nrf6310/dist/debug.sh
vendored
17
boards/nrf6310/dist/debug.sh
vendored
@ -1,17 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Start in-circuit debugging on this board: this script starts up the GDB
|
|
||||||
# client and connects to a GDB server.
|
|
||||||
#
|
|
||||||
# Start the GDB server first using the 'make debugserver' target
|
|
||||||
|
|
||||||
# @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
|
||||||
|
|
||||||
BINDIR=$1
|
|
||||||
ELFFILE=$2
|
|
||||||
|
|
||||||
# write GDB config file
|
|
||||||
echo "target extended-remote 127.0.0.1:2331" > $BINDIR/gdb.cfg
|
|
||||||
|
|
||||||
# run GDB
|
|
||||||
arm-none-eabi-gdb -tui -command=$BINDIR/gdb.cfg $ELFFILE
|
|
||||||
25
boards/nrf6310/dist/flash.sh
vendored
25
boards/nrf6310/dist/flash.sh
vendored
@ -1,25 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# This flash script dynamically generates a file with a set of commands which
|
|
||||||
# have to be handed to the flashing script of SEGGER (JLinkExe >4.84).
|
|
||||||
# After that, JLinkExe will be executed with that set of commands to flash the
|
|
||||||
# latest .bin file to the board.
|
|
||||||
|
|
||||||
# @author Timo Ziegler <timo.ziegler@fu-berlin.de>
|
|
||||||
# @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
|
||||||
|
|
||||||
BINDIR=$1
|
|
||||||
HEXFILE=$2
|
|
||||||
|
|
||||||
# setup JLink command file
|
|
||||||
echo "device nrf51822" > $BINDIR/burn.seg
|
|
||||||
echo "speed 1000" >> $BINDIR/burn.seg
|
|
||||||
echo "w4 4001e504 1" >> $BINDIR/burn.seg
|
|
||||||
echo "loadbin $HEXFILE 0" >> $BINDIR/burn.seg
|
|
||||||
echo "r" >> $BINDIR/burn.seg
|
|
||||||
echo "g" >> $BINDIR/burn.seg
|
|
||||||
echo "exit" >> $BINDIR/burn.seg
|
|
||||||
echo "" >> $BINDIR/burn.seg
|
|
||||||
|
|
||||||
# flash new binary to the board
|
|
||||||
JLinkExe < $BINDIR/burn.seg
|
|
||||||
18
boards/nrf6310/dist/reset.sh
vendored
18
boards/nrf6310/dist/reset.sh
vendored
@ -1,18 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# This script resets a nrf51822 target using JLink called
|
|
||||||
# with a pre-defined reset sequence.
|
|
||||||
|
|
||||||
# @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
|
||||||
|
|
||||||
BINDIR=$1
|
|
||||||
|
|
||||||
# create JLink command file for resetting the board
|
|
||||||
echo "device nrf51822" > $BINDIR/reset.seg
|
|
||||||
echo "r" >> $BINDIR/reset.seg
|
|
||||||
echo "g" >> $BINDIR/reset.seg
|
|
||||||
echo "exit" >> $BINDIR/reset.seg
|
|
||||||
echo " " >> $BINDIR/reset.seg
|
|
||||||
|
|
||||||
# reset the board
|
|
||||||
JLinkExe < $BINDIR/reset.seg
|
|
||||||
@ -23,6 +23,7 @@
|
|||||||
#define PERIPH_CONF_H
|
#define PERIPH_CONF_H
|
||||||
|
|
||||||
#include "periph_cpu.h"
|
#include "periph_cpu.h"
|
||||||
|
#include "periph_conf_common.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -43,30 +44,6 @@ extern "C" {
|
|||||||
* 2: derived from HFCLK */
|
* 2: derived from HFCLK */
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
|
||||||
* @name Timer configuration
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
static const timer_conf_t timer_config[] = {
|
|
||||||
/* dev, channels, width */
|
|
||||||
{ NRF_TIMER0, 3, TIMER_BITMODE_BITMODE_24Bit, TIMER0_IRQn }
|
|
||||||
};
|
|
||||||
|
|
||||||
#define TIMER_0_ISR isr_timer0
|
|
||||||
|
|
||||||
#define TIMER_NUMOF (sizeof(timer_config) / sizeof(timer_config[0]))
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @name Real time counter configuration
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
#define RTT_NUMOF (1U)
|
|
||||||
#define RTT_DEV (1) /* NRF_RTC1 */
|
|
||||||
#define RTT_MAX_VALUE (0x00ffffff)
|
|
||||||
#define RTT_FREQUENCY (1024)
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name UART configuration
|
* @name UART configuration
|
||||||
* @{
|
* @{
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
MODULE = board
|
MODULE = board
|
||||||
|
DIRS = $(RIOTBOARD)/common/nrf51
|
||||||
|
|
||||||
include $(RIOTBASE)/Makefile.base
|
include $(RIOTBASE)/Makefile.base
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
ifneq (,$(filter gnrc_netdev_default netdev_default,$(USEMODULE)))
|
include $(RIOTBOARD)/common/nrf51/Makefile.dep
|
||||||
USEMODULE += nrfmin
|
|
||||||
endif
|
|
||||||
|
|||||||
@ -1,15 +1,8 @@
|
|||||||
# Put defined MCU peripherals here (in alphabetical order)
|
# Put defined MCU peripherals here (in alphabetical order)
|
||||||
FEATURES_PROVIDED += periph_adc
|
FEATURES_PROVIDED += periph_adc
|
||||||
FEATURES_PROVIDED += periph_gpio periph_gpio_irq
|
|
||||||
FEATURES_PROVIDED += periph_i2c
|
FEATURES_PROVIDED += periph_i2c
|
||||||
FEATURES_PROVIDED += periph_rtt
|
|
||||||
FEATURES_PROVIDED += periph_spi
|
FEATURES_PROVIDED += periph_spi
|
||||||
FEATURES_PROVIDED += periph_timer
|
|
||||||
FEATURES_PROVIDED += periph_uart
|
FEATURES_PROVIDED += periph_uart
|
||||||
|
|
||||||
# Various other features (if any)
|
# include common nrf51 based boards features
|
||||||
|
include $(RIOTBOARD)/common/nrf51/Makefile.features
|
||||||
# The board MPU family (used for grouping by the CI system)
|
|
||||||
FEATURES_MCU_GROUP = cortex_m0_2
|
|
||||||
|
|
||||||
include $(RIOTCPU)/nrf51/Makefile.features
|
|
||||||
|
|||||||
@ -1,16 +1,19 @@
|
|||||||
# define the used CPU
|
# define the used CPU model
|
||||||
export CPU = nrf51
|
|
||||||
export CPU_MODEL = nrf51x22xxaa
|
export CPU_MODEL = nrf51x22xxaa
|
||||||
|
|
||||||
|
# include common nrf51 boards module into the build
|
||||||
|
USEMODULE += boards_common_nrf51
|
||||||
|
|
||||||
# define the default port depending on the host OS
|
# define the default port depending on the host OS
|
||||||
PORT_LINUX ?= /dev/ttyUSB0
|
PORT_LINUX ?= /dev/ttyUSB0
|
||||||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
||||||
|
|
||||||
# setup serial terminal
|
# This board uses an ST-Link v2 debug adapter
|
||||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
|
||||||
|
|
||||||
export DEBUG_ADAPTER ?= stlink
|
export DEBUG_ADAPTER ?= stlink
|
||||||
export STLINK_VERSION ?= 2
|
export STLINK_VERSION ?= 2
|
||||||
|
|
||||||
# this board uses openocd
|
# use openocd to program this board
|
||||||
include $(RIOTMAKE)/tools/openocd.inc.mk
|
PROGRAMMER = openocd
|
||||||
|
|
||||||
|
# import nrf51 boards common configuration
|
||||||
|
include $(RIOTBOARD)/common/nrf51/Makefile.include
|
||||||
|
|||||||
3
boards/yunjia-nrf51822/dist/openocd.cfg
vendored
3
boards/yunjia-nrf51822/dist/openocd.cfg
vendored
@ -1,3 +0,0 @@
|
|||||||
set WORKAREASIZE 0x4000
|
|
||||||
source [find target/nrf51.cfg]
|
|
||||||
$_TARGETNAME configure -rtos auto
|
|
||||||
@ -19,27 +19,10 @@
|
|||||||
#ifndef BOARD_H
|
#ifndef BOARD_H
|
||||||
#define BOARD_H
|
#define BOARD_H
|
||||||
|
|
||||||
#include "cpu.h"
|
#include "board_common.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {}
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @name Xtimer configuration
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
#define XTIMER_WIDTH (24)
|
|
||||||
#define XTIMER_BACKOFF (40)
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Initialize board specific hardware, including clock, LEDs and std-IO
|
|
||||||
*/
|
|
||||||
void board_init(void);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* BOARD_H */
|
#endif /* BOARD_H */
|
||||||
|
|||||||
@ -20,6 +20,7 @@
|
|||||||
#define PERIPH_CONF_H
|
#define PERIPH_CONF_H
|
||||||
|
|
||||||
#include "periph_cpu.h"
|
#include "periph_cpu.h"
|
||||||
|
#include "periph_conf_common.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -40,20 +41,6 @@ extern "C" {
|
|||||||
* 2: derived from HFCLK */
|
* 2: derived from HFCLK */
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
|
||||||
* @name Timer configuration
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
static const timer_conf_t timer_config[] = {
|
|
||||||
/* dev, channels, width */
|
|
||||||
{ NRF_TIMER0, 3, TIMER_BITMODE_BITMODE_24Bit, TIMER0_IRQn }
|
|
||||||
};
|
|
||||||
|
|
||||||
#define TIMER_0_ISR isr_timer0
|
|
||||||
|
|
||||||
#define TIMER_NUMOF (sizeof(timer_config) / sizeof(timer_config[0]))
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name UART configuration
|
* @name UART configuration
|
||||||
* @{
|
* @{
|
||||||
@ -64,16 +51,6 @@ static const timer_conf_t timer_config[] = {
|
|||||||
#define UART_PIN_TX 2
|
#define UART_PIN_TX 2
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
|
||||||
* @name Real time counter configuration
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
#define RTT_NUMOF (1U)
|
|
||||||
#define RTT_DEV (1) /* NRF_RTC1 */
|
|
||||||
#define RTT_MAX_VALUE (0x00ffffff)
|
|
||||||
#define RTT_FREQUENCY (1024)
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name SPI configuration
|
* @name SPI configuration
|
||||||
* @{
|
* @{
|
||||||
|
|||||||
@ -1 +1,3 @@
|
|||||||
|
FEATURES_PROVIDED += periph_gpio periph_gpio_irq
|
||||||
|
|
||||||
-include $(RIOTCPU)/nrf5x_common/Makefile.features
|
-include $(RIOTCPU)/nrf5x_common/Makefile.features
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user