diff --git a/boards/avsextrem/Makefile.features b/boards/avsextrem/Makefile.features index ba0c44a33af7..a0570acd49ec 100644 --- a/boards/avsextrem/Makefile.features +++ b/boards/avsextrem/Makefile.features @@ -1,4 +1,5 @@ -CPU = lpc2387 +CPU = lpc23xx +CPU_MODEL = lpc2387 # Put defined MCU peripherals here (in alphabetical order) FEATURES_PROVIDED += periph_rtc diff --git a/boards/avsextrem/include/board.h b/boards/avsextrem/include/board.h index 3001a22dc14e..f0581febb74c 100644 --- a/boards/avsextrem/include/board.h +++ b/boards/avsextrem/include/board.h @@ -23,7 +23,7 @@ #ifndef BOARD_H #define BOARD_H -#include "lpc2387.h" +#include "lpc23xx.h" #include "bitarithm.h" #ifdef __cplusplus diff --git a/boards/mcb2388/Makefile.features b/boards/mcb2388/Makefile.features index 95cb8ca31195..372c4e29fa6e 100644 --- a/boards/mcb2388/Makefile.features +++ b/boards/mcb2388/Makefile.features @@ -1,4 +1,4 @@ -CPU = lpc2387 +CPU = lpc23xx CPU_MODEL = lpc2388 # Put defined MCU peripherals here (in alphabetical order) diff --git a/boards/mcb2388/include/board.h b/boards/mcb2388/include/board.h index 22e61fa55a06..6546c0ab6d98 100644 --- a/boards/mcb2388/include/board.h +++ b/boards/mcb2388/include/board.h @@ -19,7 +19,7 @@ #ifndef BOARD_H #define BOARD_H -#include "lpc2387.h" +#include "lpc23xx.h" #ifdef __cplusplus extern "C" { diff --git a/boards/msba2/Makefile.features b/boards/msba2/Makefile.features index 7d6f4b673dff..bcc06811d31d 100644 --- a/boards/msba2/Makefile.features +++ b/boards/msba2/Makefile.features @@ -1,4 +1,5 @@ -CPU = lpc2387 +CPU = lpc23xx +CPU_MODEL = lpc2387 # Put defined MCU peripherals here (in alphabetical order) FEATURES_PROVIDED += periph_adc diff --git a/boards/msba2/include/board.h b/boards/msba2/include/board.h index ec04a03fd72c..f23d98f98eda 100644 --- a/boards/msba2/include/board.h +++ b/boards/msba2/include/board.h @@ -19,7 +19,7 @@ #ifndef BOARD_H #define BOARD_H -#include "lpc2387.h" +#include "lpc23xx.h" #include "bitarithm.h" #ifdef __cplusplus diff --git a/cpu/doc.txt b/cpu/doc.txt index 72307062e4ec..3f332afa66b9 100644 --- a/cpu/doc.txt +++ b/cpu/doc.txt @@ -12,5 +12,5 @@ * * This module contains all CPU specific source files. In case of multiple CPUs * sharing the same architecture, the implementation is split into several CPU - * specific parts and an architecture part (e.g. arm7_common and lpc2387). + * specific parts and an architecture part (e.g. arm7_common and lpc23xx). */ diff --git a/cpu/lpc2387/Makefile b/cpu/lpc23xx/Makefile similarity index 100% rename from cpu/lpc2387/Makefile rename to cpu/lpc23xx/Makefile diff --git a/cpu/lpc2387/Makefile.dep b/cpu/lpc23xx/Makefile.dep similarity index 100% rename from cpu/lpc2387/Makefile.dep rename to cpu/lpc23xx/Makefile.dep diff --git a/cpu/lpc2387/Makefile.features b/cpu/lpc23xx/Makefile.features similarity index 100% rename from cpu/lpc2387/Makefile.features rename to cpu/lpc23xx/Makefile.features diff --git a/cpu/lpc2387/Makefile.include b/cpu/lpc23xx/Makefile.include similarity index 100% rename from cpu/lpc2387/Makefile.include rename to cpu/lpc23xx/Makefile.include diff --git a/cpu/lpc2387/asmfunc.s b/cpu/lpc23xx/asmfunc.s similarity index 100% rename from cpu/lpc2387/asmfunc.s rename to cpu/lpc23xx/asmfunc.s diff --git a/cpu/lpc2387/clocks.c b/cpu/lpc23xx/clocks.c similarity index 96% rename from cpu/lpc2387/clocks.c rename to cpu/lpc23xx/clocks.c index de76731caaa2..97b92c121b22 100644 --- a/cpu/lpc2387/clocks.c +++ b/cpu/lpc23xx/clocks.c @@ -7,10 +7,10 @@ */ /** - * @ingroup cpu_lpc2387 + * @ingroup cpu_lpc23xx * @{ * @file - * @brief LPC2387 clock initialization + * @brief LPC23XX family clock initialization * * @author Heiko Will * @author Kaspar Schleiser @@ -24,7 +24,7 @@ #include "board.h" #include "cpu.h" #include "periph_conf.h" -#include "lpc2387.h" +#include "lpc23xx.h" #define CL_CPU_DIV 4 diff --git a/cpu/lpc2387/cpu.c b/cpu/lpc23xx/cpu.c similarity index 96% rename from cpu/lpc2387/cpu.c rename to cpu/lpc23xx/cpu.c index 15b93af1e37f..c2e2ea919971 100644 --- a/cpu/lpc2387/cpu.c +++ b/cpu/lpc23xx/cpu.c @@ -7,7 +7,7 @@ */ /** - * @ingroup cpu_lpc2387 + * @ingroup cpu_lpc23xx * @{ */ @@ -19,7 +19,7 @@ #include "stdio_base.h" #include "periph/init.h" -void lpc2387_pclk_scale(uint32_t source, uint32_t target, uint32_t *pclksel, uint32_t *prescale) +void lpc23xx_pclk_scale(uint32_t source, uint32_t target, uint32_t *pclksel, uint32_t *prescale) { uint32_t pclkdiv; *prescale = source / target; @@ -52,7 +52,7 @@ void cpu_clock_scale(uint32_t source, uint32_t target, uint32_t *prescale) { uint32_t pclksel; - lpc2387_pclk_scale(source, target, &pclksel, prescale); + lpc23xx_pclk_scale(source, target, &pclksel, prescale); PCLKSEL0 = (PCLKSEL0 & ~(BIT2 | BIT3)) | (pclksel << 2); /* timer 0 */ PCLKSEL0 = (PCLKSEL0 & ~(BIT4 | BIT5)) | (pclksel << 4); /* timer 1 */ diff --git a/cpu/lpc2387/doc/lpc2387.doc b/cpu/lpc23xx/doc/lpc23xx.doc similarity index 92% rename from cpu/lpc2387/doc/lpc2387.doc rename to cpu/lpc23xx/doc/lpc23xx.doc index 0fc952868f76..308f5250cc36 100644 --- a/cpu/lpc2387/doc/lpc2387.doc +++ b/cpu/lpc23xx/doc/lpc23xx.doc @@ -1,6 +1,6 @@ /** - * @defgroup lpc2387_intro LPC2387 Introduction - * @ingroup cpu_lpc2387 + * @defgroup lpc23xx_intro LPC23XX Introduction + * @ingroup cpu_lpc23xx

First steps

\li See the manual for toolchain and ide setup @@ -8,7 +8,7 @@

Components

\li \ref cpu_arm7_common -\li \ref lpc2387_rtc +\li \ref lpc23xx_rtc

Memory layout

The following table gives a rough overview of the memory usage. For detailed values please diff --git a/cpu/lpc2387/include/cpu.h b/cpu/lpc23xx/include/cpu.h similarity index 84% rename from cpu/lpc2387/include/cpu.h rename to cpu/lpc23xx/include/cpu.h index be1b11d88a4f..81dedb20eeb7 100644 --- a/cpu/lpc2387/include/cpu.h +++ b/cpu/lpc23xx/include/cpu.h @@ -10,16 +10,16 @@ #define CPU_H /** - * @defgroup cpu_lpc2387 NXP LPC2387 + * @defgroup cpu_lpc23xx NXP LPC23XX * @ingroup cpu - * @brief NXP LPC2387 specific code + * @brief NXP LPC23XX family specific code * @{ */ #include #include -#include "lpc2387.h" +#include "lpc23xx.h" #include "arm_cpu.h" #ifdef __cplusplus @@ -39,17 +39,17 @@ void cpu_init_pll(void); void cpu_init_mam(void); /** - * @brief Scale lpc2387 cpu speed + * @brief Scale lpc23xx cpu speed */ -void lpc2387_pclk_scale(uint32_t source, uint32_t target, uint32_t *pclksel, uint32_t *prescale); +void lpc23xx_pclk_scale(uint32_t source, uint32_t target, uint32_t *pclksel, uint32_t *prescale); /** - * @brief Initialize lpc2387 cpu clocks + * @brief Initialize lpc23xx cpu clocks */ void cpu_init_clks(void); /** - * @brief install lpc2387 irq + * @brief install lpc23xx irq */ bool install_irq(int IntNumber, void (*HandlerAddr)(void), int Priority); diff --git a/cpu/lpc2387/include/cpu_conf.h b/cpu/lpc23xx/include/cpu_conf.h similarity index 97% rename from cpu/lpc2387/include/cpu_conf.h rename to cpu/lpc23xx/include/cpu_conf.h index c7aa044cec82..729870a1afaa 100644 --- a/cpu/lpc2387/include/cpu_conf.h +++ b/cpu/lpc23xx/include/cpu_conf.h @@ -14,14 +14,14 @@ extern "C" { #endif /** - * @ingroup cpu_lpc2387 + * @ingroup cpu_lpc23xx * * @{ */ /** * @file - * @brief LPC2387 CPUconfiguration + * @brief LPC23XX CPU configuration * * @author baar * @version $Revision$ diff --git a/cpu/lpc2387/include/lpc2387.h b/cpu/lpc23xx/include/lpc23xx.h similarity index 98% rename from cpu/lpc2387/include/lpc2387.h rename to cpu/lpc23xx/include/lpc23xx.h index 1ab595ae930a..8db0f52f3de3 100644 --- a/cpu/lpc2387/include/lpc2387.h +++ b/cpu/lpc23xx/include/lpc23xx.h @@ -8,8 +8,8 @@ * Parts taken from FeuerWhere-Project, lpc2387.h. */ -#ifndef LPC2387_H -#define LPC2387_H +#ifndef LPC23XX_H +#define LPC23XX_H #include "vendor/lpc23xx.h" #include "arm7_common.h" @@ -154,4 +154,4 @@ extern "C" { } #endif -#endif /* LPC2387_H */ +#endif /* LPC23XX_H */ diff --git a/cpu/lpc2387/include/periph_cpu.h b/cpu/lpc23xx/include/periph_cpu.h similarity index 99% rename from cpu/lpc2387/include/periph_cpu.h rename to cpu/lpc23xx/include/periph_cpu.h index 95f4cceac3ab..b70270ca73f7 100644 --- a/cpu/lpc2387/include/periph_cpu.h +++ b/cpu/lpc23xx/include/periph_cpu.h @@ -7,7 +7,7 @@ */ /** - * @ingroup cpu_lpc2387 + * @ingroup cpu_lpc23xx * @{ * * @file diff --git a/cpu/lpc2387/include/vendor/lpc23xx.h b/cpu/lpc23xx/include/vendor/lpc23xx.h similarity index 99% rename from cpu/lpc2387/include/vendor/lpc23xx.h rename to cpu/lpc23xx/include/vendor/lpc23xx.h index 0189bf3d145f..e48398684945 100644 --- a/cpu/lpc2387/include/vendor/lpc23xx.h +++ b/cpu/lpc23xx/include/vendor/lpc23xx.h @@ -12,8 +12,8 @@ * ******************************************************************************/ -#ifndef LPC23XX_H -#define LPC23XX_H +#ifndef LPC23XX_VENDOR_H +#define LPC23XX_VENDOR_H #include @@ -1256,4 +1256,4 @@ with the spec. update in USB Device Section. */ } #endif -#endif /* LPC23XX_H */ +#endif /* LPC23XX_VENDOR_H */ diff --git a/cpu/lpc2387/ldscripts/lpc2387.ld b/cpu/lpc23xx/ldscripts/lpc23xx.ld similarity index 98% rename from cpu/lpc2387/ldscripts/lpc2387.ld rename to cpu/lpc23xx/ldscripts/lpc23xx.ld index 71fee30f3cdc..97460f4a7426 100644 --- a/cpu/lpc2387/ldscripts/lpc2387.ld +++ b/cpu/lpc23xx/ldscripts/lpc23xx.ld @@ -6,7 +6,7 @@ * directory for more details. */ -/* specify the LPC2387 memory areas (see LPC2387 datasheet page 15) */ +/* specify the LPC23XX memory areas (see LPC2387 datasheet page 15) */ MEMORY { rom (rx) : ORIGIN = 0, LENGTH = 504K /* FLASH ROM 512kByte without ISP bootloader*/ diff --git a/cpu/lpc2387/lpc23xx-iap.c b/cpu/lpc23xx/lpc23xx-iap.c similarity index 99% rename from cpu/lpc2387/lpc23xx-iap.c rename to cpu/lpc23xx/lpc23xx-iap.c index 6f1f17059bbb..7470ad369faf 100644 --- a/cpu/lpc2387/lpc23xx-iap.c +++ b/cpu/lpc23xx/lpc23xx-iap.c @@ -7,13 +7,13 @@ */ /** - * @ingroup cpu_lpc2387 + * @ingroup cpu_lpc23xx * @{ */ /** * @file - * @brief lpc2387 in-application programming driver (for flashrom) + * @brief lpc23xx in-application programming driver (for flashrom) * * @author Oliver Hahm * @@ -24,7 +24,7 @@ #include "irq.h" #include "flashrom.h" #include "iap.h" -#include "lpc2387.h" +#include "lpc23xx.h" #define ENABLE_DEBUG (0) #include "debug.h" diff --git a/cpu/lpc2387/mci/Makefile b/cpu/lpc23xx/mci/Makefile similarity index 100% rename from cpu/lpc2387/mci/Makefile rename to cpu/lpc23xx/mci/Makefile diff --git a/cpu/lpc2387/mci/lpc2387-mci.c b/cpu/lpc23xx/mci/lpc23xx-mci.c similarity index 100% rename from cpu/lpc2387/mci/lpc2387-mci.c rename to cpu/lpc23xx/mci/lpc23xx-mci.c diff --git a/cpu/lpc2387/periph/Makefile b/cpu/lpc23xx/periph/Makefile similarity index 100% rename from cpu/lpc2387/periph/Makefile rename to cpu/lpc23xx/periph/Makefile diff --git a/cpu/lpc2387/periph/adc.c b/cpu/lpc23xx/periph/adc.c similarity index 100% rename from cpu/lpc2387/periph/adc.c rename to cpu/lpc23xx/periph/adc.c diff --git a/cpu/lpc2387/periph/dac.c b/cpu/lpc23xx/periph/dac.c similarity index 97% rename from cpu/lpc2387/periph/dac.c rename to cpu/lpc23xx/periph/dac.c index 51f6defbaba5..b7f5b2971b32 100644 --- a/cpu/lpc2387/periph/dac.c +++ b/cpu/lpc23xx/periph/dac.c @@ -7,7 +7,7 @@ */ /** - * @ingroup cpu_lpc2387 + * @ingroup cpu_lpc23xx * @{ * * @file diff --git a/cpu/lpc2387/periph/gpio.c b/cpu/lpc23xx/periph/gpio.c similarity index 97% rename from cpu/lpc2387/periph/gpio.c rename to cpu/lpc23xx/periph/gpio.c index 6f8463332bde..b9fe67228871 100644 --- a/cpu/lpc2387/periph/gpio.c +++ b/cpu/lpc23xx/periph/gpio.c @@ -7,12 +7,12 @@ */ /** - * @ingroup cpu_lpc2387 + * @ingroup cpu_lpc23xx * @ingroup drivers_periph_gpio * @{ * * @file - * @brief CPU specific low-level GPIO driver implementation for the LPC2387 + * @brief CPU specific low-level GPIO driver implementation for the LPC23XX family * * @author Kaspar Schleiser * @@ -52,7 +52,7 @@ static int _isr_map_entry(gpio_t pin) { unsigned _pin = pin & 31; unsigned port = pin >> 5; - /* lpc2387 can only interrupt in pins of port 0 and 2 */ + /* lpc23xx can only interrupt in pins of port 0 and 2 */ if (port && port != 2) { return -1; } @@ -214,7 +214,7 @@ int gpio_init_int(gpio_t pin, gpio_mode_t mode, gpio_flank_t flank, if (_state_index == 0xff) { #ifdef DEVELHELP - puts("lpc2387: gpio: warning: no free gpio callback state!"); + puts("lpc23xx: gpio: warning: no free gpio callback state!"); #endif return -1; } diff --git a/cpu/lpc2387/periph/i2c.c b/cpu/lpc23xx/periph/i2c.c similarity index 99% rename from cpu/lpc2387/periph/i2c.c rename to cpu/lpc23xx/periph/i2c.c index fa61ffbe8b8a..46f4988ba80a 100644 --- a/cpu/lpc2387/periph/i2c.c +++ b/cpu/lpc23xx/periph/i2c.c @@ -7,7 +7,7 @@ */ /** - * @ingroup cpu_lpc2387 + * @ingroup cpu_lpc23xx * @ingroup drivers_periph_i2c * @{ * @@ -124,7 +124,7 @@ void i2c_release(i2c_t dev) static void _set_baud(lpc23xx_i2c_t *i2c, uint32_t baud) { uint32_t pclksel, prescale; - lpc2387_pclk_scale(CLOCK_CORECLOCK, baud, &pclksel, &prescale); + lpc23xx_pclk_scale(CLOCK_CORECLOCK, baud, &pclksel, &prescale); switch ((uint32_t)i2c) { case I2C0_BASE_ADDR: diff --git a/cpu/lpc2387/periph/pm.c b/cpu/lpc23xx/periph/pm.c similarity index 98% rename from cpu/lpc2387/periph/pm.c rename to cpu/lpc23xx/periph/pm.c index 91022ade5c9f..1ef84ea45342 100644 --- a/cpu/lpc2387/periph/pm.c +++ b/cpu/lpc23xx/periph/pm.c @@ -7,7 +7,7 @@ */ /** - * @ingroup cpu_lpc2387 + * @ingroup cpu_lpc23xx * @ingroup drivers_periph_pm * @{ * diff --git a/cpu/lpc2387/periph/pwm.c b/cpu/lpc23xx/periph/pwm.c similarity index 98% rename from cpu/lpc2387/periph/pwm.c rename to cpu/lpc23xx/periph/pwm.c index 5cd4a21e8e43..79bd60319e82 100644 --- a/cpu/lpc2387/periph/pwm.c +++ b/cpu/lpc23xx/periph/pwm.c @@ -7,12 +7,12 @@ */ /** - * @ingroup cpu_lpc2387 + * @ingroup cpu_lpc23xx * @ingroup drivers_periph_pwm * @{ * * @file - * @brief CPU specific low-level PWM driver implementation for the LPC2387 + * @brief CPU specific low-level PWM driver implementation for the LPC23XX family * * The current implementation is somewhat limited: it supports only a single * hardware PWM device (fixed to PWM1) and it is fixed on supporting 3 channels. diff --git a/cpu/lpc2387/periph/rtc.c b/cpu/lpc23xx/periph/rtc.c similarity index 99% rename from cpu/lpc2387/periph/rtc.c rename to cpu/lpc23xx/periph/rtc.c index 5518c1da73eb..15d3fc6b04f2 100644 --- a/cpu/lpc2387/periph/rtc.c +++ b/cpu/lpc23xx/periph/rtc.c @@ -8,7 +8,7 @@ */ /** - * @ingroup cpu_lpc2387 + * @ingroup cpu_lpc23xx * @ingroup drivers_periph_rtc * @{ * @@ -29,7 +29,7 @@ /* cpu */ #include "periph/rtc.h" #include "VIC.h" -#include "lpc2387.h" +#include "lpc23xx.h" #define ENABLE_DEBUG (0) #include "debug.h" diff --git a/cpu/lpc2387/periph/spi.c b/cpu/lpc23xx/periph/spi.c similarity index 97% rename from cpu/lpc2387/periph/spi.c rename to cpu/lpc23xx/periph/spi.c index 1da169aeaab6..c1ab4b8fc281 100644 --- a/cpu/lpc2387/periph/spi.c +++ b/cpu/lpc23xx/periph/spi.c @@ -8,7 +8,7 @@ */ /** - * @ingroup cpu_lpc2387 + * @ingroup cpu_lpc23xx * @ingroup drivers_periph_spi * @{ * @@ -119,7 +119,7 @@ int spi_acquire(spi_t bus, spi_cs_t cs, spi_mode_t mode, spi_clk_t clk) dev->CR0 = 7; /* configure bus clock */ - lpc2387_pclk_scale(CLOCK_CORECLOCK / 1000, (uint32_t)clk, &pclksel, &cpsr); + lpc23xx_pclk_scale(CLOCK_CORECLOCK / 1000, (uint32_t)clk, &pclksel, &cpsr); switch ((uint32_t)dev) { case SSP0_BASE_ADDR: diff --git a/cpu/lpc2387/periph/timer.c b/cpu/lpc23xx/periph/timer.c similarity index 98% rename from cpu/lpc2387/periph/timer.c rename to cpu/lpc23xx/periph/timer.c index 6a409287bc11..f1d3e20a4004 100644 --- a/cpu/lpc2387/periph/timer.c +++ b/cpu/lpc23xx/periph/timer.c @@ -7,7 +7,7 @@ */ /** - * @ingroup cpu_lpc2387 + * @ingroup cpu_lpc23xx * @ingroup drivers_periph_timer * @{ * @@ -137,7 +137,7 @@ int timer_init(tim_t tim, unsigned long freq, timer_cb_t cb, void *arg) } uint32_t scale, prescale; - lpc2387_pclk_scale(CLOCK_PCLK, freq, &scale, &prescale); + lpc23xx_pclk_scale(CLOCK_PCLK, freq, &scale, &prescale); /* save the callback */ isr_ctx[tim].cb = cb; diff --git a/cpu/lpc2387/periph/uart.c b/cpu/lpc23xx/periph/uart.c similarity index 99% rename from cpu/lpc2387/periph/uart.c rename to cpu/lpc23xx/periph/uart.c index aeed7ea21e90..3a3a395b25ff 100644 --- a/cpu/lpc2387/periph/uart.c +++ b/cpu/lpc23xx/periph/uart.c @@ -7,7 +7,7 @@ */ /** - * @ingroup cpu_lpc2387 + * @ingroup cpu_lpc23xx * @ingroup drivers_periph_uart * @{ * diff --git a/cpu/lpc2387/startup.s b/cpu/lpc23xx/startup.s similarity index 100% rename from cpu/lpc2387/startup.s rename to cpu/lpc23xx/startup.s diff --git a/cpu/lpc2387/tools/openocd-lpc2387.cfg b/cpu/lpc23xx/tools/openocd-lpc23xx.cfg similarity index 100% rename from cpu/lpc2387/tools/openocd-lpc2387.cfg rename to cpu/lpc23xx/tools/openocd-lpc23xx.cfg