1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards/microbit: factorize common code

This commit is contained in:
Alexandre Abadie 2018-10-24 17:56:24 +02:00
parent a1d65583cb
commit a4463be1e3
4 changed files with 9 additions and 37 deletions

View File

@ -7,6 +7,4 @@ ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += saul_gpio
endif
ifneq (,$(filter gnrc_netdev_default netdev_default,$(USEMODULE)))
USEMODULE += nrfmin
endif
include $(RIOTBOARD)/common/nrf51/Makefile.dep

View File

@ -1,13 +1,6 @@
# 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
# 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,15 +1,12 @@
# 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.SLAB_USBtoUART*)))
# 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. Default programmer is fscopy
PROGRAMMER ?= fscopy
ifeq (fscopy,$(PROGRAMMER))
export FFLAGS =
@ -18,9 +15,7 @@ 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)
endif
# include nrf51 boards common configuration
include $(RIOTBOARD)/common/nrf51/Makefile.include

View File

@ -20,21 +20,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
* @{
@ -80,11 +71,6 @@ extern "C" {
#define MAG3110_PARAM_ADDR 0x0e
/** @} */
/**
* @brief Initialize the board, also triggers the CPU initialization
*/
void board_init(void);
#ifdef __cplusplus
}
#endif