Skip to content

Commit c696311

Browse files
committed
Define the PHY identifier registers the removed IDF header supplied
1 parent ff41529 commit c696311

2 files changed

Lines changed: 38 additions & 0 deletions

File tree

ESP32/TLS13-ENC28J60-client/main/esp_eth_phy_enc28j60.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,25 @@ typedef union {
7575
} bmcr_reg_t;
7676
#define ETH_PHY_BMCR_REG_ADDR (0x00)
7777

78+
/* standard 802.3 PHY identifier registers, also from the removed header */
79+
typedef union {
80+
struct {
81+
uint32_t oui_msb : 16; // Organizationally Unique Identifier bits 3:18
82+
};
83+
uint32_t val;
84+
} phyidr1_reg_t;
85+
#define ETH_PHY_IDR1_REG_ADDR (0x02)
86+
87+
typedef union {
88+
struct {
89+
uint32_t model_revision : 4; // Model revision number
90+
uint32_t vendor_model : 6; // Vendor model number
91+
uint32_t oui_lsb : 6; // Organizationally Unique Identifier bits 19:24
92+
};
93+
uint32_t val;
94+
} phyidr2_reg_t;
95+
#define ETH_PHY_IDR2_REG_ADDR (0x03)
96+
7897
typedef union {
7998
struct {
8099
uint32_t reserved_4_0 : 5; // Reserved

ESP32/TLS13-ENC28J60-server/main/esp_eth_phy_enc28j60.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,25 @@ typedef union {
7575
} bmcr_reg_t;
7676
#define ETH_PHY_BMCR_REG_ADDR (0x00)
7777

78+
/* standard 802.3 PHY identifier registers, also from the removed header */
79+
typedef union {
80+
struct {
81+
uint32_t oui_msb : 16; // Organizationally Unique Identifier bits 3:18
82+
};
83+
uint32_t val;
84+
} phyidr1_reg_t;
85+
#define ETH_PHY_IDR1_REG_ADDR (0x02)
86+
87+
typedef union {
88+
struct {
89+
uint32_t model_revision : 4; // Model revision number
90+
uint32_t vendor_model : 6; // Vendor model number
91+
uint32_t oui_lsb : 6; // Organizationally Unique Identifier bits 19:24
92+
};
93+
uint32_t val;
94+
} phyidr2_reg_t;
95+
#define ETH_PHY_IDR2_REG_ADDR (0x03)
96+
7897
typedef union {
7998
struct {
8099
uint32_t reserved_4_0 : 5; // Reserved

0 commit comments

Comments
 (0)