RTL8211 Ethernet PHY driver header file. More...
Go to the source code of this file.
Data Structures | |
| struct | rtl8211_config_t |
| RTL8211 PHY configuration structure. More... | |
Macros | |
| #define | RTL8211_ADDR (2U) |
| Default PHY address for RTL8211. More... | |
| #define | RTL8211_ID1 (0x001CU) |
| RTL8211 PHY ID register 1 value (OUI MSB) More... | |
| #define | RTL8211_ID2 (0x32U) |
| RTL8211 PHY ID register 2 value (OUI LSB) More... | |
Functions | |
| void | rtl8211_reset (TSW_Type *ptr, uint8_t port) |
| Reset RTL8211 PHY chip. More... | |
| void | rtl8211_basic_mode_default_config (TSW_Type *ptr, rtl8211_config_t *config) |
| Set default configuration for RTL8211 PHY basic mode. More... | |
| bool | rtl8211_basic_mode_init (TSW_Type *ptr, uint8_t port, rtl8211_config_t *config) |
| Initialize RTL8211 PHY chip in basic mode. More... | |
| void | rtl8211_get_phy_status (TSW_Type *ptr, uint8_t port, tsw_phy_status_t *status) |
| Get RTL8211 PHY status. More... | |
RTL8211 Ethernet PHY driver header file.
This file provides the API definitions for the RTL8211 Ethernet PHY chip driver. The RTL8211 is a single-port 10/100/1000-Mbps Ethernet physical layer transceiver.
| #define RTL8211_ADDR (2U) |
Default PHY address for RTL8211.
| #define RTL8211_ID1 (0x001CU) |
RTL8211 PHY ID register 1 value (OUI MSB)
| #define RTL8211_ID2 (0x32U) |
RTL8211 PHY ID register 2 value (OUI LSB)
| void rtl8211_basic_mode_default_config | ( | TSW_Type * | ptr, |
| rtl8211_config_t * | config | ||
| ) |
Set default configuration for RTL8211 PHY basic mode.
| [in] | ptr | Pointer to the TSW peripheral base address |
| [out] | config | Pointer to the configuration structure to be initialized |
This function initializes the configuration structure with default values:
| bool rtl8211_basic_mode_init | ( | TSW_Type * | ptr, |
| uint8_t | port, | ||
| rtl8211_config_t * | config | ||
| ) |
Initialize RTL8211 PHY chip in basic mode.
| [in] | ptr | Pointer to the TSW peripheral base address |
| [in] | port | Port number |
| [in] | config | Pointer to the PHY configuration structure |
| true | Initialization completed successfully |
| false | Initialization failed (PHY ID check failed) |
This function performs the following operations:
| void rtl8211_get_phy_status | ( | TSW_Type * | ptr, |
| uint8_t | port, | ||
| tsw_phy_status_t * | status | ||
| ) |
Get RTL8211 PHY status.
| [in] | ptr | Pointer to the TSW peripheral base address |
| [in] | port | Port number |
| [out] | status | Pointer to the status structure to store PHY status |
This function reads the PHY status register and extracts:
| void rtl8211_reset | ( | TSW_Type * | ptr, |
| uint8_t | port | ||
| ) |
Reset RTL8211 PHY chip.
| [in] | ptr | Pointer to the TSW peripheral base address |
| [in] | port | Port number |