diff options
| author | wuyangyong <[email protected]> | 2011-11-25 06:37:32 +0000 |
|---|---|---|
| committer | wuyangyong <[email protected]> | 2011-11-25 06:37:32 +0000 |
| commit | 7eaac75bcb1fff4999eab17fa3fc988479b5d40f (patch) | |
| tree | 70d0f1069602c0419ac72a3b542c5d926af61811 /bsp | |
| parent | fad264815752b88e4ca4fc647b4ef0dd843a938e (diff) | |
update stm32f107 bsp
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1803 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'bsp')
| -rw-r--r-- | bsp/stm32f107/rtconfig.py | 2 | ||||
| -rw-r--r-- | bsp/stm32f107/stm32_eth.c | 12 | ||||
| -rw-r--r-- | bsp/stm32f107/stm32_eth.h | 2 |
3 files changed, 7 insertions, 9 deletions
diff --git a/bsp/stm32f107/rtconfig.py b/bsp/stm32f107/rtconfig.py index e3e67b378c..8128d0f6e1 100644 --- a/bsp/stm32f107/rtconfig.py +++ b/bsp/stm32f107/rtconfig.py @@ -1,6 +1,6 @@ # toolchains options
ARCH='arm'
-CPU='stm32'
+CPU='cortex-m3'
CROSS_TOOL='keil'
# cross_tool provides the cross compiler
diff --git a/bsp/stm32f107/stm32_eth.c b/bsp/stm32f107/stm32_eth.c index 95c4629f0d..0903f6ca16 100644 --- a/bsp/stm32f107/stm32_eth.c +++ b/bsp/stm32f107/stm32_eth.c @@ -3062,12 +3062,11 @@ uint32_t ETH_HandlePTPRxPkt(uint8_t *ppkt, uint32_t *PTPRxTab) #include <lwip/icmp.h>
#include "lwipopts.h"
-#define STM32_ETH_DEBUG
-//#define STM32_ETH_PHY_DUMP
-//#define STM32_ETH_RX_DUMP
-//#define STM32_ETH_TX_DUMP
+#define ETH_DEBUG
+//#define ETH_RX_DUMP
+//#define ETH_TX_DUMP
-#ifdef STM32_ETH_DEBUG
+#ifdef ETH_DEBUG
#define STM32_ETH_TRACE rt_kprintf
#else
#define STM32_ETH_TRACE(...)
@@ -3360,7 +3359,7 @@ rt_err_t rt_stm32_eth_tx( rt_device_t dev, struct pbuf* p) }
}
-#ifdef STM32_ETH_TX_DUMP
+#ifdef ETH_TX_DUMP
{
rt_uint32_t i;
rt_uint8_t *ptr = (rt_uint8_t*)(DMATxDescToSet->Buffer1Addr);
@@ -3416,7 +3415,6 @@ rt_err_t rt_stm32_eth_tx( rt_device_t dev, struct pbuf* p) ETH->DMASR = ETH_DMASR_TBUS;
/* Transmit Poll Demand to resume DMA transmission*/
ETH->DMATPDR = 0;
- STM32_ETH_TRACE("transmit poll demand\n");
}
/* Update the ETHERNET DMA global Tx descriptor with next Tx decriptor */
diff --git a/bsp/stm32f107/stm32_eth.h b/bsp/stm32f107/stm32_eth.h index e99ef49bd2..17c5caf39d 100644 --- a/bsp/stm32f107/stm32_eth.h +++ b/bsp/stm32f107/stm32_eth.h @@ -487,7 +487,7 @@ typedef struct { */
#define PHY_Speed_Status ((u16)0x0002) /*!< Configured information of Speed: 10Mbps */
#define PHY_Duplex_Status ((u16)0x0004) /*!< Configured information of Duplex: Full-duplex */
-#define IS_ETH_PHY_ADDRESS(ADDRESS) ((ADDRESS) <= 0x20)
+#define IS_ETH_PHY_ADDRESS(ADDRESS) ((ADDRESS) <= 0x1F)
#define IS_ETH_PHY_REG(REG) (REG <= 0x1F)
/**--------------------------------------------------------------------------**/
|
