Skip to content
Snippets Groups Projects
Commit ea0dc223 authored by Hauke Petersen's avatar Hauke Petersen
Browse files

boards/wsn430: cleaned up structure

parent 7b9b383d
No related branches found
No related tags found
No related merge requests found
# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_gpio
FEATURES_PROVIDED += periph_timer
FEATURES_PROVIDED += periph_spi
FEATURES_PROVIDED += periph_uart
# The board MPU family (used for grouping by the CI system)
FEATURES_MCU_GROUP = msp430
-include $(RIOTCPU)/msp430fxyz/Makefile.features
## the cpu to build for
# select the used CPU
export CPU = msp430fxyz
export CPU_MODEL = msp430f1611
# set default port depending on operating system
# include this module in the build
USEMODULE += boards_common_wsn430
# use common wsn430 includes
export INCLUDES += -I$(RIOTBOARD)/common/wsn430/include
# configure the serial interface
PORT_LINUX ?= /dev/ttyUSB0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
# setup serial terminal
include $(RIOTMAKE)/tools/serial.inc.mk
# setup flash tool
# configure the flash tool
export OFLAGS = -O ihex
export FLASHER = mspdebug
export FFLAGS = -d $(PORT) -j uif "prog $(HEXFILE)"
# include common wsn430 includes
export INCLUDES += -I$(RIOTBOARD)/common/wsn430/include
/*
* Copyright (C) 2013 Milan Babel <babel@inf.fu-berlin.de>
* 2016 Freie Universität Berlin
* 2015-2017 Freie Universität Berlin
*
* 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
......@@ -8,9 +8,9 @@
*/
/**
* @defgroup boards_common_wsn430 WSN430 common
* @defgroup boards_common_wsn430 Shared WSN430 files
* @ingroup boards_common
* @brief Shared files and configuration for all WSN430 based boards.
* @brief Common files for WSN430 based boards
* @{
*
* @file
......@@ -21,8 +21,10 @@
*
*/
#ifndef BOARD_COMMON_H
#define BOARD_COMMON_H
#ifndef BOARD_H
#define BOARD_H
#include "cpu.h"
#ifdef __cplusplus
extern "C" {
......@@ -41,6 +43,18 @@ extern "C" {
#define XTIMER_BACKOFF (40)
/** @} */
/**
* @name CPU core configuration
* @{
*/
/** @todo Move this to the periph_conf.h */
#define MSP430_INITIAL_CPU_SPEED 800000uL
#define F_CPU MSP430_INITIAL_CPU_SPEED
#define F_RC_OSCILLATOR 32768
#define MSP430_HAS_DCOR 0
#define MSP430_HAS_EXTERNAL_CRYSTAL 1
/** @} */
/**
* @name LED pin definitions and handlers
* @{
......@@ -71,5 +85,5 @@ extern "C" {
}
#endif
#endif /* BOARD_COMMON_H */
#endif /* BOARD_H */
/** @} */
/*
* Copyright (C) 2014 INRIA
* 2015 Freie Universität Berlin
* 2015,2017 Freie Universität Berlin
*
* 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
......@@ -12,7 +12,7 @@
* @{
*
* @file
* @brief WSN30 peripheral configuration
* @brief WSN430 peripheral configuration
*
* @author Oliver Hahm <oliver.hahm@inria.fr>
* Hauke Petersen <hauke.petersen@fu-berlin.de>
......@@ -29,7 +29,6 @@ extern "C" {
* @name Clock configuration
* @{
*/
/** @todo Move all clock configuration code here from the board.h */
#define CLOCK_CORECLOCK (8000000U)
#define CLOCK_CMCLK CLOCK_CORECLOCK /* no divider programmed */
......
MODULE = board
DIRS = $(RIOTBOARD)/common/wsn430
include $(RIOTBASE)/Makefile.base
# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_gpio
FEATURES_PROVIDED += periph_timer
FEATURES_PROVIDED += periph_spi
FEATURES_PROVIDED += periph_uart
# The board MPU family (used for grouping by the CI system)
FEATURES_MCU_GROUP = msp430
-include $(RIOTCPU)/msp430fxyz/Makefile.features
include $(RIOTBOARD)/common/wsn430/Makefile.features
USEMODULE += boards_common_wsn430
include $(RIOTBOARD)/common/wsn430/Makefile.include
/*
* Copyright (C) 2013 Milan Babel <babel@inf.fu-berlin.de>
* 2015 Freie Universität Berlin
*
* 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_wsn430-v1_3b WSN430 v1.3b
* @ingroup boards
* @brief Support for the Senslab WSN430 v1.3b board
*
* <h2>Compontents</h2>
* \li MSP430
* \li CC1100
*
* @{
*
* @file
* @brief Basic definitions for the Senslab WSN430 v1.3b board
*
* @author Milan Babel <babel@inf.fu-berlin.de>
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
*/
#ifndef BOARD_H
#define BOARD_H
#include "board_common.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Define the CPU model for the <msp430.h>
*/
#ifndef __MSP430F1611__
#define __MSP430F1611__
#endif
/**
* @name CPU core configuration
* @{
*/
/** @todo Move this to the periph_conf.h */
#define MSP430_INITIAL_CPU_SPEED 800000uL
#define F_CPU MSP430_INITIAL_CPU_SPEED
#define F_RC_OSCILLATOR 32768
#define MSP430_HAS_DCOR 0
#define MSP430_HAS_EXTERNAL_CRYSTAL 1
/** @} */
#ifdef __cplusplus
}
#endif
#include <msp430x16x.h>
/** @} */
#endif /* BOARD_H */
MODULE = board
DIRS = $(RIOTBOARD)/common/wsn430
include $(RIOTBASE)/Makefile.base
# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_gpio
FEATURES_PROVIDED += periph_timer
FEATURES_PROVIDED += periph_spi
FEATURES_PROVIDED += periph_uart
# The board MPU family (used for grouping by the CI system)
FEATURES_MCU_GROUP = msp430
-include $(RIOTCPU)/msp430fxyz/Makefile.features
include $(RIOTBOARD)/common/wsn430/Makefile.features
USEMODULE += boards_common_wsn430
include $(RIOTBOARD)/common/wsn430/Makefile.include
/*
* Copyright (C) 2013 Milan Babel <babel@inf.fu-berlin.de>
* 2015 Freie Universität Berlin
*
* 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_wsn430-v1_4 WSN430 v1.4
* @ingroup boards
* @brief Support for the Senslab WSN430 v1.4 board
*
* <h2>Compontents</h2>
* \li MSP430
* \li CC2420
*
* @{
*
* @file
* @brief Basic definitions for the Senslab WSN430 v1.4 board
*
* @author Milan Babel <babel@inf.fu-berlin.de>
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
*/
#ifndef BOARD_H
#define BOARD_H
#include "board_common.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Define the CPU model for the <msp430.h>
*/
#ifndef __MSP430F1611__
#define __MSP430F1611__
#endif
/**
* @name CPU core configuration
* @{
*/
/** @todo Move this to the periph_conf.h */
#define MSP430_INITIAL_CPU_SPEED 800000uL
#define F_CPU MSP430_INITIAL_CPU_SPEED
#define F_RC_OSCILLATOR 32768
#define MSP430_HAS_DCOR 0
#define MSP430_HAS_EXTERNAL_CRYSTAL 1
/** @} */
#ifdef __cplusplus
}
#endif
#include <msp430x16x.h>
/** @} */
#endif /* BOARD_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment