Skip to content

Commit b84abd8

Browse files
committed
Add RTL8201F PHY support, make PHY_TYPE overridable
Add RTL8201F as a third PHY option and wrap PHY_TYPE in an ifndef guard so it can be overridden at build time without modifying the header.
1 parent dbd762e commit b84abd8

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

lib-gd32/gd32f20x/GD32F20x_standard_peripheral/Include/gd32f20x_enet.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,12 @@ OF SUCH DAMAGE.
6262
/* #define USE_DELAY */
6363

6464
#ifndef _PHY_H_
65-
#define DP83848 0U
66-
#define LAN8700 1U
67-
#define PHY_TYPE DP83848
65+
#define DP83848 0
66+
#define LAN8700 1
67+
#define RTL8201F 2 // AvV
68+
#ifndef PHY_TYPE // AvV
69+
#define PHY_TYPE DP83848 // AvV
70+
#endif // AvV
6871

6972
#define PHY_ADDRESS ((uint16_t)1U) /*!< phy address determined by the hardware */
7073

0 commit comments

Comments
 (0)