diff --git a/boards/mbed_lpc1768/include/board.h b/boards/mbed_lpc1768/include/board.h index 168aa867ab..08356ad255 100644 --- a/boards/mbed_lpc1768/include/board.h +++ b/boards/mbed_lpc1768/include/board.h @@ -13,6 +13,9 @@ #include #include "bitarithm.h" +#define F_CPU (96000000) + + #define PIN_LED1 (BIT18) #define PIN_LED2 (BIT20) #define PIN_LED3 (BIT21) diff --git a/boards/native/include/board.h b/boards/native/include/board.h index 4e3df1cdc0..18ad8a6ad9 100644 --- a/boards/native/include/board.h +++ b/boards/native/include/board.h @@ -25,6 +25,10 @@ #include +/* TODO: choose better value? */ +#define F_CPU 1000000 + + void _native_LED_GREEN_OFF(void); #define LED_GREEN_OFF (_native_LED_GREEN_OFF()) void _native_LED_GREEN_ON(void); diff --git a/boards/redbee-econotag/include/board.h b/boards/redbee-econotag/include/board.h index 6f47ee7b90..e3d33b7eec 100644 --- a/boards/redbee-econotag/include/board.h +++ b/boards/redbee-econotag/include/board.h @@ -23,6 +23,8 @@ #include +#define F_CPU (24000000) ///< CPU target speed in Hz + #define CTUNE 0xb #define IBIAS 0x1f #define FTUNE 0x7 diff --git a/core/hwtimer.c b/core/hwtimer.c index 5877c96c92..b0ba36412c 100644 --- a/core/hwtimer.c +++ b/core/hwtimer.c @@ -29,6 +29,7 @@ #include "lifo.h" #include "mutex.h" #include "irq.h" +#include "board.h" #define ENABLE_DEBUG (0) #include "debug.h" diff --git a/cpu/lpc1768/include/cpu-conf.h b/cpu/lpc1768/include/cpu-conf.h index 1e426ce447..e6d046aa1e 100644 --- a/cpu/lpc1768/include/cpu-conf.h +++ b/cpu/lpc1768/include/cpu-conf.h @@ -5,8 +5,6 @@ * @name Kernel configuration * @{ */ -#define F_CPU 96000000 - #define KERNEL_CONF_STACKSIZE_PRINTF (4096) #ifndef KERNEL_CONF_STACKSIZE_DEFAULT #define KERNEL_CONF_STACKSIZE_DEFAULT 1500 diff --git a/cpu/mc1322x/include/mc1322x.h b/cpu/mc1322x/include/mc1322x.h index d4595beff4..94951c61c2 100644 --- a/cpu/mc1322x/include/mc1322x.h +++ b/cpu/mc1322x/include/mc1322x.h @@ -203,8 +203,6 @@ static volatile struct CRM_struct * const CRM = (void*) (CRM_BASE); /*-----------------------------------------------------------------*/ /* TIMERS */ -#define F_CPU (24000000) ///< CPU target speed in Hz - /* Timer registers are all 16-bit wide with 16-bit access only */ #define TMR_OFFSET (0x20) #define TMR_BASE (0x80007000) diff --git a/cpu/msp430-common/include/cpu.h b/cpu/msp430-common/include/cpu.h index 5568f7caa0..a4012e7ab4 100644 --- a/cpu/msp430-common/include/cpu.h +++ b/cpu/msp430-common/include/cpu.h @@ -36,10 +36,6 @@ See the file LICENSE in the top level directory for more details. #define WORDSIZE 16 -/* CPU speed, to be defined in board.h */ -//#define F_CPU (2457600ul) -//#define F_RC_OSCILLATOR (32768) ///< Frequency of internal RC oscillator - extern volatile int __inISR; extern char __isr_stack[MSP430_ISR_STACK_SIZE]; diff --git a/cpu/native/include/cpu.h b/cpu/native/include/cpu.h index 160a12eb2a..26660c6033 100644 --- a/cpu/native/include/cpu.h +++ b/cpu/native/include/cpu.h @@ -22,11 +22,6 @@ #ifndef _CPU_H #define _CPU_H -#include "cpu-conf.h" - -/* TODO: choose better value? */ -#define F_CPU 1000000 - /* TODO: remove once these have been removed from RIOT: */ void dINT(void); void eINT(void);