diff --git a/boards/mbed_lpc1768/include/board.h b/boards/mbed_lpc1768/include/board.h index 168aa867ab0702a6e6eae0165206b91ee4d50fa6..08356ad25554e821e61f2b249dca6c6957eeaab1 100644 --- a/boards/mbed_lpc1768/include/board.h +++ b/boards/mbed_lpc1768/include/board.h @@ -13,6 +13,9 @@ #include <stdint.h> #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 4e3df1cdc0eb32184ab632a06294baa65ea01324..18ad8a6ad9eb3a6f3bb91d535b5b2238ed4bd9d5 100644 --- a/boards/native/include/board.h +++ b/boards/native/include/board.h @@ -25,6 +25,10 @@ #include <stdint.h> +/* 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 6f47ee7b906ae990e42e9182c686c64a43d735b6..e3d33b7eecd7b2c286a6db443c5ed44660f03f4f 100644 --- a/boards/redbee-econotag/include/board.h +++ b/boards/redbee-econotag/include/board.h @@ -23,6 +23,8 @@ #include <stdint.h> +#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 5877c96c92c9fe7bcad322140d45ff157bb5d3da..b0ba36412c9e8972b6604fd5c85505c3c8beb6af 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 1e426ce4477699e959156c066dcd2168af45cb0d..e6d046aa1eb31fd68cd5ca07bd986d49b6ff225f 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 d4595beff4c9df1101a5f474755b148773b799f1..94951c61c248932885e4a65de60458da9e189d50 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 5568f7caa06741120eeb3ecae8176d3a2660dd96..a4012e7ab43e518ca5e2b00b66570efddd3bdb38 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 160a12eb2a94f34f83e6acb62e8b6a0b61015cfa..26660c6033942347e16a6edabafb4037ea611f44 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);