From 81ebcb5b439084de4e2153b99cb88026dabca65f Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Thu, 4 May 2023 21:01:43 +0200 Subject: [PATCH] boards/telosb: clean up code Move the periph configuration from board.h to periph_conf.h as indicated by the todo note there. --- boards/telosb/board.c | 3 ++- boards/telosb/include/board.h | 12 ------------ boards/telosb/include/periph_conf.h | 10 +++++++--- 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/boards/telosb/board.c b/boards/telosb/board.c index 1819f05cf1..c8067a12f5 100644 --- a/boards/telosb/board.c +++ b/boards/telosb/board.c @@ -7,8 +7,9 @@ * directory for more details. */ -#include "cpu.h" #include "board.h" +#include "cpu.h" +#include "periph_conf.h" void uart_init(void); diff --git a/boards/telosb/include/board.h b/boards/telosb/include/board.h index a6359bf36e..e3e1517d5e 100644 --- a/boards/telosb/include/board.h +++ b/boards/telosb/include/board.h @@ -56,18 +56,6 @@ extern "C" { #define XTIMER_BACKOFF (40) /** @} */ -/** - * @name CPU core configuration - * @{ - */ -/** @todo Move this to the periph_conf.h */ -#define MSP430_INITIAL_CPU_SPEED 2457600uL -#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 * @{ diff --git a/boards/telosb/include/periph_conf.h b/boards/telosb/include/periph_conf.h index c5b7222ffa..1ed32d7a6d 100644 --- a/boards/telosb/include/periph_conf.h +++ b/boards/telosb/include/periph_conf.h @@ -29,10 +29,14 @@ extern "C" { * @name Clock configuration * @{ */ -/** @todo Move all clock configuration code here from the board.h */ -#define CLOCK_CORECLOCK (2457600U) +#define CLOCK_CORECLOCK (2457600U) +#define MSP430_INITIAL_CPU_SPEED 2457600uL +#define F_CPU MSP430_INITIAL_CPU_SPEED +#define F_RC_OSCILLATOR 32768 +#define MSP430_HAS_DCOR 0 +#define MSP430_HAS_EXTERNAL_CRYSTAL 1 -#define CLOCK_CMCLK CLOCK_CORECLOCK /* no divider programmed */ +#define CLOCK_CMCLK CLOCK_CORECLOCK /* no divider programmed */ /** @} */ /**