[phy] fix the PHY_FULL_DUPLEX conflicts

This commit is contained in:
Meco Man
2022-08-03 00:14:49 -04:00
committed by Man, Jianting (Meco)
parent 1990af6c96
commit 067315ff40
7 changed files with 36 additions and 58 deletions

View File

@@ -30,6 +30,11 @@
#define MAX_ADDR_LEN 6
#undef PHY_FULL_DUPLEX
#define PHY_LINK (1 << 0)
#define PHY_100M (1 << 1)
#define PHY_FULL_DUPLEX (1 << 2)
struct rt_stm32_eth
{
/* inherit from ethernet device */
@@ -401,12 +406,6 @@ void HAL_ETH_ErrorCallback(ETH_HandleTypeDef *heth)
LOG_E("eth err");
}
enum {
PHY_LINK = (1 << 0),
PHY_100M = (1 << 1),
PHY_FULL_DUPLEX = (1 << 2),
};
static void phy_linkchange()
{
static rt_uint8_t phy_speed = 0;

View File

@@ -22,6 +22,15 @@
#define LOG_TAG "drv.emac"
#include <drv_log.h>
#undef PHY_FULL_DUPLEX
#undef PHY_HALF_DUPLEX
#define PHY_LINK (1 << 0)
#define PHY_10M (1 << 1)
#define PHY_100M (1 << 2)
#define PHY_1000M (1 << 3)
#define PHY_FULL_DUPLEX (1 << 4)
#define PHY_HALF_DUPLEX (1 << 5)
#define MAX_ADDR_LEN 6
rt_base_t level;

View File

@@ -50,16 +50,6 @@ typedef struct
uint32_t rdes3;
} RxDmaDesc;
enum {
PHY_LINK = (1 << 0),
PHY_10M = (1 << 1),
PHY_100M = (1 << 2),
PHY_1000M = (1 << 3),
PHY_FULL_DUPLEX = (1 << 4),
PHY_HALF_DUPLEX = (1 << 5)
};
#define RTL8211F_PHY_ADDR 1 /* PHY address */
#define ETH_TXBUFNB 4 /* 4 Tx buffers of size ETH_TX_BUF_SIZE */

View File

@@ -30,6 +30,15 @@ rt_base_t level;
#define TX_DMA_ADD_BASE 0x2FFC7000
#define RX_DMA_ADD_BASE 0x2FFC7100
#undef PHY_FULL_DUPLEX
#undef PHY_HALF_DUPLEX
#define PHY_LINK (1 << 0)
#define PHY_10M (1 << 1)
#define PHY_100M (1 << 2)
#define PHY_1000M (1 << 3)
#define PHY_FULL_DUPLEX (1 << 4)
#define PHY_HALF_DUPLEX (1 << 5)
#if defined(__ICCARM__)
/* transmit buffer */
#pragma location = TX_ADD_BASE

View File

@@ -42,15 +42,6 @@ typedef struct
uint32_t rdes3;
} RxDmaDesc;
enum {
PHY_LINK = (1 << 0),
PHY_10M = (1 << 1),
PHY_100M = (1 << 2),
PHY_1000M = (1 << 3),
PHY_FULL_DUPLEX = (1 << 4),
PHY_HALF_DUPLEX = (1 << 5)
};
#define RTL8211E_PHY_ADDR 7 /* PHY address */
#define ETH_TXBUFNB 4 /* 4 Tx buffers of size ETH_TX_BUF_SIZE */