From 70d59331b8442362dfc8e0b710a6fbcf73412d2c Mon Sep 17 00:00:00 2001 From: Joakim Gebart <joakim.gebart@eistec.se> Date: Fri, 17 Jul 2015 10:05:33 +0200 Subject: [PATCH] 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. * -- GitLab