1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:52:44 +01:00

boards/calliope-mini: factorize common code

This commit is contained in:
Alexandre Abadie 2018-10-26 10:13:40 +02:00
parent 59b3252888
commit b3b0cd921a
3 changed files with 11 additions and 34 deletions

View File

@ -1,14 +1,7 @@
# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_gpio periph_gpio_irq
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_rtt
FEATURES_PROVIDED += periph_timer
FEATURES_PROVIDED += periph_uart
FEATURES_PROVIDED += periph_pwm
# Various other features (if any)
# The board MPU family (used for grouping by the CI system)
FEATURES_MCU_GROUP = cortex_m0_1
include $(RIOTCPU)/nrf51/Makefile.features
# include common nrf51 based boards features
include $(RIOTBOARD)/common/nrf51/Makefile.features

View File

@ -1,16 +1,14 @@
# define the used CPU
export CPU = nrf51
export CPU_MODEL = nrf51x22xxab
# define the default port depending on the host OS
PORT_LINUX ?= /dev/ttyACM0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
# setup serial terminal
include $(RIOTMAKE)/tools/serial.inc.mk
# we support flashing through plain fscopy or using JLink
# this board supports flashing through plain fscopy, using JLink or using
# openocd
PROGRAMMER ?= fscopy
ifeq (fscopy,$(PROGRAMMER))
export FFLAGS =
export DEBUGGER_FLAGS =
@ -18,9 +16,9 @@ ifeq (fscopy,$(PROGRAMMER))
export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh
export DEBUGGER =
export DEBUGSERVER =
else ifeq (jlink,$(PROGRAMMER))
export JLINK_DEVICE := nrf51822
include $(RIOTMAKE)/tools/jlink.inc.mk
else
$(info ERROR: invalid flash tool specified)
else ifeq (openocd,$(PROGRAMMER))
DEBUG_ADAPTER = jlink
endif
# include nrf51 boards common configuration
include $(RIOTBOARD)/common/nrf51/Makefile.include

View File

@ -22,21 +22,12 @@
#ifndef BOARD_H
#define BOARD_H
#include "cpu.h"
#include "periph_conf.h"
#include "board_common.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name Xtimer configuration
* @{
*/
#define XTIMER_WIDTH (24)
#define XTIMER_BACKOFF (40)
/** @} */
/**
* @name LED matrix pin configuration
* @{
@ -65,11 +56,6 @@ extern "C" {
#define BTN1_MODE GPIO_IN
/** @} */
/**
* @brief Initialize the board, also triggers the CPU initialization
*/
void board_init(void);
#ifdef __cplusplus
}
#endif