From 7ff26d12ea96a13d9da338a9b987071c7ea8d447 Mon Sep 17 00:00:00 2001 From: Joakim Gebart Date: Mon, 6 Jul 2015 01:11:48 +0200 Subject: [PATCH 1/3] cpu/arm7_common: Rename Doxygen group to cpu_arm7_common --- cpu/arm7_common/arm_cpu.c | 2 +- cpu/arm7_common/bootloader.c | 2 +- cpu/arm7_common/include/VIC.h | 2 +- cpu/arm7_common/include/arm7_common.h | 10 +++++----- cpu/arm7_common/panic.c | 2 +- cpu/arm7_common/syscalls.c | 2 +- cpu/lpc2387/doc/lpc2387.doc | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cpu/arm7_common/arm_cpu.c b/cpu/arm7_common/arm_cpu.c index c95852680f..ec60c8660b 100644 --- a/cpu/arm7_common/arm_cpu.c +++ b/cpu/arm7_common/arm_cpu.c @@ -8,7 +8,7 @@ * General Public License v2.1. See the file LICENSE in the top level * directory for more details. * - * @ingroup arm7_common + * @ingroup cpu_arm7_common * @{ * @file * @author Kaspar Schleiser diff --git a/cpu/arm7_common/bootloader.c b/cpu/arm7_common/bootloader.c index 700b38df4c..0ecf5d59df 100644 --- a/cpu/arm7_common/bootloader.c +++ b/cpu/arm7_common/bootloader.c @@ -7,7 +7,7 @@ */ /** - * @ingroup arm7_common + * @ingroup cpu_arm7_common * @{ */ diff --git a/cpu/arm7_common/include/VIC.h b/cpu/arm7_common/include/VIC.h index f293f7d4f2..3c0601dc39 100644 --- a/cpu/arm7_common/include/VIC.h +++ b/cpu/arm7_common/include/VIC.h @@ -13,7 +13,7 @@ extern "C" { #endif /** - * @ingroup arm7_common + * @ingroup cpu_arm7_common * @{ */ diff --git a/cpu/arm7_common/include/arm7_common.h b/cpu/arm7_common/include/arm7_common.h index 6f2379d545..8377c079db 100644 --- a/cpu/arm7_common/include/arm7_common.h +++ b/cpu/arm7_common/include/arm7_common.h @@ -6,11 +6,11 @@ * more details. */ -#ifndef __ARM_COMMON_H -#define __ARM_COMMON_H +#ifndef ARM7_COMMON_H_ +#define ARM7_COMMON_H_ /** - * @defgroup arm7_common ARM CPU common + * @defgroup cpu_arm7_common ARM7 CPU common * @brief Common implementations and headers for ARM based micro-controllers * @ingroup cpu * @{ @@ -18,7 +18,7 @@ /** * @file - * @brief ARM CPU common declarations + * @brief ARM7 CPU common declarations * * @author Freie Universität Berlin, Computer Systems & Telematics * @@ -100,4 +100,4 @@ extern "C" { #endif /** @} */ -#endif // __ARM_COMMON_H +#endif /* ARM7_COMMON_H_ */ diff --git a/cpu/arm7_common/panic.c b/cpu/arm7_common/panic.c index 3f99c50f4c..93da793dfc 100644 --- a/cpu/arm7_common/panic.c +++ b/cpu/arm7_common/panic.c @@ -7,7 +7,7 @@ */ /** - * @ingroup arm7_common + * @ingroup cpu_arm7_common * @{ * * @file diff --git a/cpu/arm7_common/syscalls.c b/cpu/arm7_common/syscalls.c index 193a68df52..bb057712c7 100644 --- a/cpu/arm7_common/syscalls.c +++ b/cpu/arm7_common/syscalls.c @@ -9,7 +9,7 @@ /** * @file - * @ingroup arm7_common + * @ingroup cpu_arm7_common * @brief LPC2387 NewLib system calls implementation * * @author Michael Baar diff --git a/cpu/lpc2387/doc/lpc2387.doc b/cpu/lpc2387/doc/lpc2387.doc index 192bb7d843..7a7a7de59e 100644 --- a/cpu/lpc2387/doc/lpc2387.doc +++ b/cpu/lpc2387/doc/lpc2387.doc @@ -7,7 +7,7 @@ \li Documentation

Components

-\li \ref arm7_common +\li \ref cpu_arm7_common \li \ref lpc2387_rtc

Memory layout

From 897f40fabe987392f3949a64e1a79d46c3cf0658 Mon Sep 17 00:00:00 2001 From: Joakim Gebart Date: Mon, 6 Jul 2015 01:17:05 +0200 Subject: [PATCH 2/3] cpu/msp430-common: Clean up Doxygen groups --- cpu/msp430-common/include/assert.h | 2 +- cpu/msp430-common/include/cpu.h | 8 ++++---- cpu/msp430-common/include/hwtimer_cpu.h | 8 ++++---- cpu/msp430-common/panic.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cpu/msp430-common/include/assert.h b/cpu/msp430-common/include/assert.h index 8c5c0d1c7c..81bc8ec53c 100644 --- a/cpu/msp430-common/include/assert.h +++ b/cpu/msp430-common/include/assert.h @@ -7,7 +7,7 @@ */ /** - * @ingroup msp430 + * @ingroup cpu_msp430_common * @{ * * @file diff --git a/cpu/msp430-common/include/cpu.h b/cpu/msp430-common/include/cpu.h index 40d389f8fc..c929b774b1 100644 --- a/cpu/msp430-common/include/cpu.h +++ b/cpu/msp430-common/include/cpu.h @@ -7,11 +7,11 @@ * directory for more details. */ -#ifndef _CPU_H -#define _CPU_H +#ifndef CPU_H_ +#define CPU_H_ /** - * @defgroup msp430 TI MSP430 + * @defgroup cpu_msp430_common TI MSP430 * @ingroup cpu * @brief Texas Instruments MSP430 specific code @@ -167,4 +167,4 @@ void msp430_cpu_init(void); #endif /** @} */ -#endif // _CPU_H +#endif /* CPU_H_ */ diff --git a/cpu/msp430-common/include/hwtimer_cpu.h b/cpu/msp430-common/include/hwtimer_cpu.h index 167471c7f5..5586c07594 100644 --- a/cpu/msp430-common/include/hwtimer_cpu.h +++ b/cpu/msp430-common/include/hwtimer_cpu.h @@ -7,7 +7,7 @@ */ /** - * @ingroup cpu + * @ingroup cpu_msp430_common * @{ */ @@ -21,8 +21,8 @@ * */ -#ifndef __HWTIMER_CPU_H -#define __HWTIMER_CPU_H +#ifndef HWTIMER_CPU_H_ +#define HWTIMER_CPU_H_ #include @@ -72,4 +72,4 @@ typedef struct { } #endif -#endif // __HWTIMER_CPU_H +#endif /* HWTIMER_CPU_H_ */ diff --git a/cpu/msp430-common/panic.c b/cpu/msp430-common/panic.c index 9f461ab19d..1333472896 100644 --- a/cpu/msp430-common/panic.c +++ b/cpu/msp430-common/panic.c @@ -7,7 +7,7 @@ */ /** - * @ingroup msp430 + * @ingroup cpu_msp430_common * @{ * * @file From 70d59331b8442362dfc8e0b710a6fbcf73412d2c Mon Sep 17 00:00:00 2001 From: Joakim Gebart Date: Fri, 17 Jul 2015 10:05:33 +0200 Subject: [PATCH 3/3] arm7_common: Build fixes after discovering an include guard overlap --- boards/avsextrem/board_init.c | 1 - boards/msba2-common/board_common_init.c | 3 +- boards/pttu/board_init.c | 1 - cpu/arm7_common/include/VIC.h | 12 ++--- cpu/lpc2387/include/lpc2387.h | 66 +------------------------ cpu/lpc2387/periph/pwm.c | 2 - 6 files changed, 8 insertions(+), 77 deletions(-) diff --git a/boards/avsextrem/board_init.c b/boards/avsextrem/board_init.c index ab076b358f..4b95b7ee57 100644 --- a/boards/avsextrem/board_init.c +++ b/boards/avsextrem/board_init.c @@ -24,7 +24,6 @@ #include "lpc23xx.h" #include "cpu.h" -#define PCRTC BIT9 #define CL_CPU_DIV 4 diff --git a/boards/msba2-common/board_common_init.c b/boards/msba2-common/board_common_init.c index 5421a8c364..c433245dd7 100644 --- a/boards/msba2-common/board_common_init.c +++ b/boards/msba2-common/board_common_init.c @@ -28,10 +28,9 @@ #include "cpu.h" #include "config.h" -#define PCRTC BIT9 #define CL_CPU_DIV 4 -#define WD_INTERVAL 10 ///< number of seconds before WD triggers +#define WD_INTERVAL 10 /**< number of seconds before WD triggers */ /*---------------------------------------------------------------------------*/ /** diff --git a/boards/pttu/board_init.c b/boards/pttu/board_init.c index 3219f2e8dd..c672ad786d 100644 --- a/boards/pttu/board_init.c +++ b/boards/pttu/board_init.c @@ -24,7 +24,6 @@ #include "VIC.h" #include "cpu.h" -#define PCRTC BIT9 #define CL_CPU_DIV 4 /*---------------------------------------------------------------------------*/ diff --git a/cpu/arm7_common/include/VIC.h b/cpu/arm7_common/include/VIC.h index 3c0601dc39..ad0a872466 100644 --- a/cpu/arm7_common/include/VIC.h +++ b/cpu/arm7_common/include/VIC.h @@ -5,8 +5,8 @@ * */ -#ifndef __ARM_COMMON_H -#define __ARM_COMMON_H +#ifndef VIC_H_ +#define VIC_H_ #ifdef __cplusplus extern "C" { @@ -30,16 +30,16 @@ extern "C" { /** * @name IRQ Priority Mapping */ -//@{ +/** @{ */ #define HIGHEST_PRIORITY 0x01 -#define IRQP_RTIMER 1 // FIQ_PRIORITY // TODO: investigate problems with rtimer and FIQ +#define IRQP_RTIMER 1 /* FIQ_PRIORITY // TODO: investigate problems with rtimer and FIQ */ #define IRQP_TIMER1 1 #define IRQP_WATCHDOG 1 #define IRQP_CLOCK 3 #define IRQP_GPIO 4 #define IRQP_RTC 8 #define LOWEST_PRIORITY 0x0F -// @} +/** @} */ #define WDT_INT 0 @@ -89,4 +89,4 @@ bool cpu_install_irq(int IntNumber, void *HandlerAddr, int Priority); #endif /** @} */ -#endif /*ARMVIC_H_*/ +#endif /* VIC_H_*/ diff --git a/cpu/lpc2387/include/lpc2387.h b/cpu/lpc2387/include/lpc2387.h index d9ddfc840f..b2036bd0a5 100644 --- a/cpu/lpc2387/include/lpc2387.h +++ b/cpu/lpc2387/include/lpc2387.h @@ -12,6 +12,7 @@ #define __LPC2387_H #include "lpc23xx.h" +#include "arm7_common.h" #include "bitarithm.h" #ifdef __cplusplus @@ -31,24 +32,6 @@ extern "C" { #define _XTAL (72000) -/** - * @name Timer Symbols - * @{ - */ -#define MR0I BIT0 -#define MR0R BIT1 -#define MR0S BIT2 -#define MR1I BIT3 -#define MR1R BIT4 -#define MR1S BIT5 -#define MR2I BIT6 -#define MR2R BIT7 -#define MR2S BIT8 -#define MR3I BIT9 -#define MR3R BIT10 -#define MR3S BIT11 -/** @} */ - /** * @name RTC constants * @{ @@ -90,53 +73,6 @@ extern "C" { #define WDINT BIT3 /** @} */ -/** - * @name PCONP Constants - * @{ - */ -#define PCTIM0 BIT1 -#define PCTIM1 BIT2 -#define PCUART0 BIT3 -#define PCUART1 BIT4 -#define PCPWM1 BIT6 -#define PCI2C0 BIT7 -#define PCSPI BIT8 -#define PCRTC BIT9 -#define PCSSP1 BIT10 -#define PCEMC BIT11 -#define PCAD BIT12 -#define PCAN1 BIT13 -#define PCAN2 BIT14 -#define PCI2C1 BIT19 -#define PCSSP0 BIT21 -#define PCTIM2 BIT22 -#define PCTIM3 BIT23 -#define PCUART2 BIT24 -#define PCUART3 BIT25 -#define PCI2C2 BIT26 -#define PCI2S BIT27 -#define PCSDC BIT28 -#define PCGPDMA BIT29 -#define PCENET BIT30 -#define PCUSB BIT31 -/** @} */ - -/** - * @name PCON Constants - * @{ - */ -#define PM0 BIT0 -#define PM1 BIT1 -#define BODPDM BIT2 -#define BOGD BIT3 -#define BORD BIT4 -#define PM2 BIT7 - -#define PM_IDLE (PM0) -#define PM_SLEEP (PM2|PM0) -#define PM_POWERDOWN (PM1) -/** @} */ - /** * @name INTWAKE Constants * @{ diff --git a/cpu/lpc2387/periph/pwm.c b/cpu/lpc2387/periph/pwm.c index d8f5f3e637..8e009fc94b 100644 --- a/cpu/lpc2387/periph/pwm.c +++ b/cpu/lpc2387/periph/pwm.c @@ -26,8 +26,6 @@ /* guard file in case no PWM device is defined */ #if PWM_NUMOF -#define PCPWM1 BIT6 - /** * @note The PWM is always initialized with left-aligned mode. *