From a053716e4b5db0fe81cede5c6b84e75eb4480c1c Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Wed, 26 Aug 2015 18:45:26 +0200 Subject: [PATCH] board/telosb: added (x)timer configuration --- boards/telosb/Makefile.features | 1 + boards/telosb/include/board.h | 17 +++++++++++++++++ boards/telosb/include/periph_conf.h | 26 ++++++++++++++++++++++---- 3 files changed, 40 insertions(+), 4 deletions(-) diff --git a/boards/telosb/Makefile.features b/boards/telosb/Makefile.features index 3b961e07b1..bfc3d5814f 100644 --- a/boards/telosb/Makefile.features +++ b/boards/telosb/Makefile.features @@ -1 +1,2 @@ +FEATURES_PROVIDED += periph_timer FEATURES_MCU_GROUP = msp430 diff --git a/boards/telosb/include/board.h b/boards/telosb/include/board.h index 4dcab4eab3..98441a7646 100644 --- a/boards/telosb/include/board.h +++ b/boards/telosb/include/board.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2013, 2014 INRIA + * 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 @@ -21,6 +22,7 @@ * @brief Basic definitions for the TelosB board * * @author Oliver Hahm + * @author Hauke Petersen */ #ifndef TELOSB_BOARD_H_ @@ -35,6 +37,21 @@ extern "C" { #define __MSP430F1611__ #endif +/** + * @brief Xtimer configuration + * @{ + */ +#define XTIMER (0) +#define XTIMER_CHAN (0) +#define XTIMER_MASK (0xffff0000) +/** @} */ + +/** + * @brief Defines for compatibility with hwtimer + * @deprecated + */ +#define HW_TIMER (0) + /* TelosB core */ #define MSP430_INITIAL_CPU_SPEED 2457600uL #define F_CPU MSP430_INITIAL_CPU_SPEED diff --git a/boards/telosb/include/periph_conf.h b/boards/telosb/include/periph_conf.h index e5626ec493..e7d1a578ad 100644 --- a/boards/telosb/include/periph_conf.h +++ b/boards/telosb/include/periph_conf.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2014 INRIA + * 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 @@ -14,11 +15,28 @@ * @brief TelosB peripheral configuration * * @author Oliver Hahm + * @author Hauke Petersen */ -#ifndef PERIPH_CONF_H_ -#define PERIPH_CONF_H_ +#ifndef PERIPH_CONF_H +#define PERIPH_CONF_H -/* make Travis happy: #ifdef __cplusplus extern "C" { #endif */ +#ifdef __cplusplus +extern "C" { +#endif -#endif /* PERIPH_CONF_H_ */ +/** + * @brief Timer configuration + * @{ + */ +#define TIMER_DEV (TIMER_A) +#define TIMER_CHAN (3) +#define TIMER_ISR_CC0 (TIMERA0_VECTOR) +#define TIMER_ISR_CCX (TIMERA1_VECTOR) +/** @} */ + +#ifdef __cplusplus +} +#endif + +#endif /* PERIPH_CONF_H */