Merge pull request #14539 from aabadie/pr/cpu/lpc2387_rename

cpu/lpc2387: rename to lpc23xx
This commit is contained in:
Alexandre Abadie 2020-07-16 18:38:47 +02:00 committed by GitHub
commit d0fb8d727a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
37 changed files with 55 additions and 53 deletions

View File

@ -1,4 +1,5 @@
CPU = lpc2387 CPU = lpc23xx
CPU_MODEL = lpc2387
# Put defined MCU peripherals here (in alphabetical order) # Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_rtc FEATURES_PROVIDED += periph_rtc

View File

@ -23,7 +23,7 @@
#ifndef BOARD_H #ifndef BOARD_H
#define BOARD_H #define BOARD_H
#include "lpc2387.h" #include "lpc23xx.h"
#include "bitarithm.h" #include "bitarithm.h"
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -1,4 +1,4 @@
CPU = lpc2387 CPU = lpc23xx
CPU_MODEL = lpc2388 CPU_MODEL = lpc2388
# Put defined MCU peripherals here (in alphabetical order) # Put defined MCU peripherals here (in alphabetical order)

View File

@ -19,7 +19,7 @@
#ifndef BOARD_H #ifndef BOARD_H
#define BOARD_H #define BOARD_H
#include "lpc2387.h" #include "lpc23xx.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@ -1,4 +1,5 @@
CPU = lpc2387 CPU = lpc23xx
CPU_MODEL = lpc2387
# Put defined MCU peripherals here (in alphabetical order) # Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_adc FEATURES_PROVIDED += periph_adc

View File

@ -19,7 +19,7 @@
#ifndef BOARD_H #ifndef BOARD_H
#define BOARD_H #define BOARD_H
#include "lpc2387.h" #include "lpc23xx.h"
#include "bitarithm.h" #include "bitarithm.h"
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -12,5 +12,5 @@
* *
* This module contains all CPU specific source files. In case of multiple CPUs * This module contains all CPU specific source files. In case of multiple CPUs
* sharing the same architecture, the implementation is split into several CPU * 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).
*/ */

View File

@ -7,10 +7,10 @@
*/ */
/** /**
* @ingroup cpu_lpc2387 * @ingroup cpu_lpc23xx
* @{ * @{
* @file * @file
* @brief LPC2387 clock initialization * @brief LPC23XX family clock initialization
* *
* @author Heiko Will * @author Heiko Will
* @author Kaspar Schleiser <kaspar@schleiser.de> * @author Kaspar Schleiser <kaspar@schleiser.de>
@ -24,7 +24,7 @@
#include "board.h" #include "board.h"
#include "cpu.h" #include "cpu.h"
#include "periph_conf.h" #include "periph_conf.h"
#include "lpc2387.h" #include "lpc23xx.h"
#define CL_CPU_DIV 4 #define CL_CPU_DIV 4

View File

@ -7,7 +7,7 @@
*/ */
/** /**
* @ingroup cpu_lpc2387 * @ingroup cpu_lpc23xx
* @{ * @{
*/ */
@ -19,7 +19,7 @@
#include "stdio_base.h" #include "stdio_base.h"
#include "periph/init.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; uint32_t pclkdiv;
*prescale = source / target; *prescale = source / target;
@ -52,7 +52,7 @@ void cpu_clock_scale(uint32_t source, uint32_t target, uint32_t *prescale)
{ {
uint32_t pclksel; 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 & ~(BIT2 | BIT3)) | (pclksel << 2); /* timer 0 */
PCLKSEL0 = (PCLKSEL0 & ~(BIT4 | BIT5)) | (pclksel << 4); /* timer 1 */ PCLKSEL0 = (PCLKSEL0 & ~(BIT4 | BIT5)) | (pclksel << 4); /* timer 1 */

View File

@ -1,6 +1,6 @@
/** /**
* @defgroup lpc2387_intro LPC2387 Introduction * @defgroup lpc23xx_intro LPC23XX Introduction
* @ingroup cpu_lpc2387 * @ingroup cpu_lpc23xx
<h2>First steps</h2> <h2>First steps</h2>
\li See the manual for toolchain and ide setup \li See the manual for toolchain and ide setup
@ -8,7 +8,7 @@
<h2>Components</h2> <h2>Components</h2>
\li \ref cpu_arm7_common \li \ref cpu_arm7_common
\li \ref lpc2387_rtc \li \ref lpc23xx_rtc
<h2>Memory layout</h2> <h2>Memory layout</h2>
The following table gives a rough overview of the memory usage. For detailed values please The following table gives a rough overview of the memory usage. For detailed values please

View File

@ -10,16 +10,16 @@
#define CPU_H #define CPU_H
/** /**
* @defgroup cpu_lpc2387 NXP LPC2387 * @defgroup cpu_lpc23xx NXP LPC23XX
* @ingroup cpu * @ingroup cpu
* @brief NXP LPC2387 specific code * @brief NXP LPC23XX family specific code
* @{ * @{
*/ */
#include <stdio.h> #include <stdio.h>
#include <stdbool.h> #include <stdbool.h>
#include "lpc2387.h" #include "lpc23xx.h"
#include "arm_cpu.h" #include "arm_cpu.h"
#ifdef __cplusplus #ifdef __cplusplus
@ -39,17 +39,17 @@ void cpu_init_pll(void);
void cpu_init_mam(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); void cpu_init_clks(void);
/** /**
* @brief install lpc2387 irq * @brief install lpc23xx irq
*/ */
bool install_irq(int IntNumber, void (*HandlerAddr)(void), int Priority); bool install_irq(int IntNumber, void (*HandlerAddr)(void), int Priority);

View File

@ -14,14 +14,14 @@ extern "C" {
#endif #endif
/** /**
* @ingroup cpu_lpc2387 * @ingroup cpu_lpc23xx
* *
* @{ * @{
*/ */
/** /**
* @file * @file
* @brief LPC2387 CPUconfiguration * @brief LPC23XX CPU configuration
* *
* @author baar * @author baar
* @version $Revision$ * @version $Revision$

View File

@ -8,8 +8,8 @@
* Parts taken from FeuerWhere-Project, lpc2387.h. * Parts taken from FeuerWhere-Project, lpc2387.h.
*/ */
#ifndef LPC2387_H #ifndef LPC23XX_H
#define LPC2387_H #define LPC23XX_H
#include "vendor/lpc23xx.h" #include "vendor/lpc23xx.h"
#include "arm7_common.h" #include "arm7_common.h"
@ -154,4 +154,4 @@ extern "C" {
} }
#endif #endif
#endif /* LPC2387_H */ #endif /* LPC23XX_H */

View File

@ -7,7 +7,7 @@
*/ */
/** /**
* @ingroup cpu_lpc2387 * @ingroup cpu_lpc23xx
* @{ * @{
* *
* @file * @file

View File

@ -12,8 +12,8 @@
* *
******************************************************************************/ ******************************************************************************/
#ifndef LPC23XX_H #ifndef LPC23XX_VENDOR_H
#define LPC23XX_H #define LPC23XX_VENDOR_H
#include <stdint.h> #include <stdint.h>
@ -1256,4 +1256,4 @@ with the spec. update in USB Device Section. */
} }
#endif #endif
#endif /* LPC23XX_H */ #endif /* LPC23XX_VENDOR_H */

View File

@ -6,7 +6,7 @@
* directory for more details. * 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 MEMORY
{ {
rom (rx) : ORIGIN = 0, LENGTH = 504K /* FLASH ROM 512kByte without ISP bootloader*/ rom (rx) : ORIGIN = 0, LENGTH = 504K /* FLASH ROM 512kByte without ISP bootloader*/

View File

@ -7,13 +7,13 @@
*/ */
/** /**
* @ingroup cpu_lpc2387 * @ingroup cpu_lpc23xx
* @{ * @{
*/ */
/** /**
* @file * @file
* @brief lpc2387 in-application programming driver (for flashrom) * @brief lpc23xx in-application programming driver (for flashrom)
* *
* @author Oliver Hahm <oliver.hahm@inria.fr> * @author Oliver Hahm <oliver.hahm@inria.fr>
* *
@ -24,7 +24,7 @@
#include "irq.h" #include "irq.h"
#include "flashrom.h" #include "flashrom.h"
#include "iap.h" #include "iap.h"
#include "lpc2387.h" #include "lpc23xx.h"
#define ENABLE_DEBUG (0) #define ENABLE_DEBUG (0)
#include "debug.h" #include "debug.h"

View File

@ -7,7 +7,7 @@
*/ */
/** /**
* @ingroup cpu_lpc2387 * @ingroup cpu_lpc23xx
* @{ * @{
* *
* @file * @file

View File

@ -7,12 +7,12 @@
*/ */
/** /**
* @ingroup cpu_lpc2387 * @ingroup cpu_lpc23xx
* @ingroup drivers_periph_gpio * @ingroup drivers_periph_gpio
* @{ * @{
* *
* @file * @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 <kaspar@schleiser.de> * @author Kaspar Schleiser <kaspar@schleiser.de>
* *
@ -52,7 +52,7 @@ static int _isr_map_entry(gpio_t pin) {
unsigned _pin = pin & 31; unsigned _pin = pin & 31;
unsigned port = pin >> 5; 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) { if (port && port != 2) {
return -1; 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) { if (_state_index == 0xff) {
#ifdef DEVELHELP #ifdef DEVELHELP
puts("lpc2387: gpio: warning: no free gpio callback state!"); puts("lpc23xx: gpio: warning: no free gpio callback state!");
#endif #endif
return -1; return -1;
} }

View File

@ -7,7 +7,7 @@
*/ */
/** /**
* @ingroup cpu_lpc2387 * @ingroup cpu_lpc23xx
* @ingroup drivers_periph_i2c * @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) static void _set_baud(lpc23xx_i2c_t *i2c, uint32_t baud)
{ {
uint32_t pclksel, prescale; uint32_t pclksel, prescale;
lpc2387_pclk_scale(CLOCK_CORECLOCK, baud, &pclksel, &prescale); lpc23xx_pclk_scale(CLOCK_CORECLOCK, baud, &pclksel, &prescale);
switch ((uint32_t)i2c) { switch ((uint32_t)i2c) {
case I2C0_BASE_ADDR: case I2C0_BASE_ADDR:

View File

@ -7,7 +7,7 @@
*/ */
/** /**
* @ingroup cpu_lpc2387 * @ingroup cpu_lpc23xx
* @ingroup drivers_periph_pm * @ingroup drivers_periph_pm
* @{ * @{
* *

View File

@ -7,12 +7,12 @@
*/ */
/** /**
* @ingroup cpu_lpc2387 * @ingroup cpu_lpc23xx
* @ingroup drivers_periph_pwm * @ingroup drivers_periph_pwm
* @{ * @{
* *
* @file * @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 * 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. * hardware PWM device (fixed to PWM1) and it is fixed on supporting 3 channels.

View File

@ -8,7 +8,7 @@
*/ */
/** /**
* @ingroup cpu_lpc2387 * @ingroup cpu_lpc23xx
* @ingroup drivers_periph_rtc * @ingroup drivers_periph_rtc
* @{ * @{
* *
@ -29,7 +29,7 @@
/* cpu */ /* cpu */
#include "periph/rtc.h" #include "periph/rtc.h"
#include "VIC.h" #include "VIC.h"
#include "lpc2387.h" #include "lpc23xx.h"
#define ENABLE_DEBUG (0) #define ENABLE_DEBUG (0)
#include "debug.h" #include "debug.h"

View File

@ -8,7 +8,7 @@
*/ */
/** /**
* @ingroup cpu_lpc2387 * @ingroup cpu_lpc23xx
* @ingroup drivers_periph_spi * @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; dev->CR0 = 7;
/* configure bus clock */ /* 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) { switch ((uint32_t)dev) {
case SSP0_BASE_ADDR: case SSP0_BASE_ADDR:

View File

@ -7,7 +7,7 @@
*/ */
/** /**
* @ingroup cpu_lpc2387 * @ingroup cpu_lpc23xx
* @ingroup drivers_periph_timer * @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; uint32_t scale, prescale;
lpc2387_pclk_scale(CLOCK_PCLK, freq, &scale, &prescale); lpc23xx_pclk_scale(CLOCK_PCLK, freq, &scale, &prescale);
/* save the callback */ /* save the callback */
isr_ctx[tim].cb = cb; isr_ctx[tim].cb = cb;

View File

@ -7,7 +7,7 @@
*/ */
/** /**
* @ingroup cpu_lpc2387 * @ingroup cpu_lpc23xx
* @ingroup drivers_periph_uart * @ingroup drivers_periph_uart
* @{ * @{
* *