From 3d87970a4d3f0f72560d725ecb284eaac1a69835 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 29 Nov 2009 18:51:15 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1364 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/ARM7-AT91SAM7X-GCC/halconf.h | 7 ------- demos/ARM7-AT91SAM7X-LWIP-GCC/halconf.h | 7 ------- demos/ARM7-AT91SAM7X-UIP-GCC/halconf.h | 7 ------- demos/ARMCM3-STM32F103-FATFS-GCC/halconf.h | 7 ------- demos/ARMCM3-STM32F103-GCC/halconf.h | 7 ------- os/hal/platforms/AT91SAM7/at91sam7_mii.c | 5 ++++- os/hal/platforms/AT91SAM7/at91sam7_mii.h | 4 ++++ os/hal/platforms/AT91SAM7/mac_lld.c | 1 - os/hal/templates/halconf.h | 7 ------- 9 files changed, 8 insertions(+), 44 deletions(-) diff --git a/demos/ARM7-AT91SAM7X-GCC/halconf.h b/demos/ARM7-AT91SAM7X-GCC/halconf.h index 648a113e7..2faba92d8 100644 --- a/demos/ARM7-AT91SAM7X-GCC/halconf.h +++ b/demos/ARM7-AT91SAM7X-GCC/halconf.h @@ -55,13 +55,6 @@ #define CH_HAL_USE_MAC FALSE #endif -/** - * @brief Enables the MII subsystem. - */ -#if !defined(CH_HAL_USE_MII) || defined(__DOXYGEN__) -#define CH_HAL_USE_MII FALSE -#endif - /** * @brief Enables the SERIAL subsystem. */ diff --git a/demos/ARM7-AT91SAM7X-LWIP-GCC/halconf.h b/demos/ARM7-AT91SAM7X-LWIP-GCC/halconf.h index 29fa51738..9f7060cf3 100644 --- a/demos/ARM7-AT91SAM7X-LWIP-GCC/halconf.h +++ b/demos/ARM7-AT91SAM7X-LWIP-GCC/halconf.h @@ -55,13 +55,6 @@ #define CH_HAL_USE_MAC TRUE #endif -/** - * @brief Enables the MII subsystem. - */ -#if !defined(CH_HAL_USE_MII) || defined(__DOXYGEN__) -#define CH_HAL_USE_MII TRUE -#endif - /** * @brief Enables the SERIAL subsystem. */ diff --git a/demos/ARM7-AT91SAM7X-UIP-GCC/halconf.h b/demos/ARM7-AT91SAM7X-UIP-GCC/halconf.h index 29fa51738..9f7060cf3 100644 --- a/demos/ARM7-AT91SAM7X-UIP-GCC/halconf.h +++ b/demos/ARM7-AT91SAM7X-UIP-GCC/halconf.h @@ -55,13 +55,6 @@ #define CH_HAL_USE_MAC TRUE #endif -/** - * @brief Enables the MII subsystem. - */ -#if !defined(CH_HAL_USE_MII) || defined(__DOXYGEN__) -#define CH_HAL_USE_MII TRUE -#endif - /** * @brief Enables the SERIAL subsystem. */ diff --git a/demos/ARMCM3-STM32F103-FATFS-GCC/halconf.h b/demos/ARMCM3-STM32F103-FATFS-GCC/halconf.h index ffcfd2a0b..94136ff29 100644 --- a/demos/ARMCM3-STM32F103-FATFS-GCC/halconf.h +++ b/demos/ARMCM3-STM32F103-FATFS-GCC/halconf.h @@ -55,13 +55,6 @@ #define CH_HAL_USE_MAC FALSE #endif -/** - * @brief Enables the MII subsystem. - */ -#if !defined(CH_HAL_USE_MII) || defined(__DOXYGEN__) -#define CH_HAL_USE_MII FALSE -#endif - /** * @brief Enables the SERIAL subsystem. */ diff --git a/demos/ARMCM3-STM32F103-GCC/halconf.h b/demos/ARMCM3-STM32F103-GCC/halconf.h index 648a113e7..2faba92d8 100644 --- a/demos/ARMCM3-STM32F103-GCC/halconf.h +++ b/demos/ARMCM3-STM32F103-GCC/halconf.h @@ -55,13 +55,6 @@ #define CH_HAL_USE_MAC FALSE #endif -/** - * @brief Enables the MII subsystem. - */ -#if !defined(CH_HAL_USE_MII) || defined(__DOXYGEN__) -#define CH_HAL_USE_MII FALSE -#endif - /** * @brief Enables the SERIAL subsystem. */ diff --git a/os/hal/platforms/AT91SAM7/at91sam7_mii.c b/os/hal/platforms/AT91SAM7/at91sam7_mii.c index 2b7491e38..d48d81c10 100644 --- a/os/hal/platforms/AT91SAM7/at91sam7_mii.c +++ b/os/hal/platforms/AT91SAM7/at91sam7_mii.c @@ -26,9 +26,10 @@ #include "ch.h" #include "hal.h" - #include "at91sam7_mii.h" +#if CH_HAL_USE_MAC || defined(__DOXYGEN__) + /** * @brief Low level MII driver initialization. */ @@ -112,4 +113,6 @@ void miiPut(MACDriver *macp, phyaddr_t addr, phyreg_t value) { ; } +#endif /* CH_HAL_USE_MAC */ + /** @} */ diff --git a/os/hal/platforms/AT91SAM7/at91sam7_mii.h b/os/hal/platforms/AT91SAM7/at91sam7_mii.h index 6db87e31c..7bf472a61 100644 --- a/os/hal/platforms/AT91SAM7/at91sam7_mii.h +++ b/os/hal/platforms/AT91SAM7/at91sam7_mii.h @@ -27,6 +27,8 @@ #ifndef _AT91SAM7_MII_H_ #define _AT91SAM7_MII_H_ +#if CH_HAL_USE_MAC || defined(__DOXYGEN__) + /*===========================================================================*/ /* Driver pre-compile time settings. */ /*===========================================================================*/ @@ -96,6 +98,8 @@ extern "C" { } #endif +#endif /* CH_HAL_USE_MAC */ + #endif /* _AT91SAM7_MII_H_ */ /** @} */ diff --git a/os/hal/platforms/AT91SAM7/mac_lld.c b/os/hal/platforms/AT91SAM7/mac_lld.c index 6112a13ad..11c3413f8 100644 --- a/os/hal/platforms/AT91SAM7/mac_lld.c +++ b/os/hal/platforms/AT91SAM7/mac_lld.c @@ -29,7 +29,6 @@ #include "ch.h" #include "hal.h" #include "mii.h" - #include "at91sam7_mii.h" #if CH_HAL_USE_MAC || defined(__DOXYGEN__) diff --git a/os/hal/templates/halconf.h b/os/hal/templates/halconf.h index f08ffcda5..35948950b 100644 --- a/os/hal/templates/halconf.h +++ b/os/hal/templates/halconf.h @@ -55,13 +55,6 @@ #define CH_HAL_USE_MAC TRUE #endif -/** - * @brief Enables the MII subsystem. - */ -#if !defined(CH_HAL_USE_MII) || defined(__DOXYGEN__) -#define CH_HAL_USE_MII TRUE -#endif - /** * @brief Enables the SERIAL subsystem. */