RTL8201 Gigabit Ethernet PHY driver. More...
#include "core/nic.h"
Go to the source code of this file.
Functions | |
error_t | rtl8201Init (NetInterface *interface) |
RTL8201 PHY transceiver initialization. More... | |
void | rtl8201InitHook (NetInterface *interface) |
RTL8201 custom configuration. More... | |
void | rtl8201Tick (NetInterface *interface) |
RTL8201 timer handler. More... | |
void | rtl8201EnableIrq (NetInterface *interface) |
Enable interrupts. More... | |
void | rtl8201DisableIrq (NetInterface *interface) |
Disable interrupts. More... | |
void | rtl8201EventHandler (NetInterface *interface) |
RTL8201 event handler. More... | |
void | rtl8201WritePhyReg (NetInterface *interface, uint8_t address, uint16_t data) |
Write PHY register. More... | |
uint16_t | rtl8201ReadPhyReg (NetInterface *interface, uint8_t address) |
Read PHY register. More... | |
void | rtl8201DumpPhyReg (NetInterface *interface) |
Dump PHY registers for debugging purpose. More... | |
void | rtl8201WriteMmdReg (NetInterface *interface, uint8_t devAddr, uint16_t regAddr, uint16_t data) |
Write MMD register. More... | |
uint16_t | rtl8201ReadMmdReg (NetInterface *interface, uint8_t devAddr, uint16_t regAddr) |
Read MMD register. More... | |
Variables | |
const PhyDriver | rtl8201PhyDriver |
RTL8201 Ethernet PHY driver. More... | |
Detailed Description
RTL8201 Gigabit Ethernet PHY driver.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneTCP Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.4.4
Definition in file rtl8201_driver.h.
Macro Definition Documentation
◆ RTL8201_ANAR
#define RTL8201_ANAR 0x04 |
Definition at line 49 of file rtl8201_driver.h.
◆ RTL8201_ANAR_100BT4
#define RTL8201_ANAR_100BT4 0x0200 |
Definition at line 123 of file rtl8201_driver.h.
◆ RTL8201_ANAR_100BTX_FD
#define RTL8201_ANAR_100BTX_FD 0x0100 |
Definition at line 124 of file rtl8201_driver.h.
◆ RTL8201_ANAR_100BTX_HD
#define RTL8201_ANAR_100BTX_HD 0x0080 |
Definition at line 125 of file rtl8201_driver.h.
◆ RTL8201_ANAR_10BT_FD
#define RTL8201_ANAR_10BT_FD 0x0040 |
Definition at line 126 of file rtl8201_driver.h.
◆ RTL8201_ANAR_10BT_HD
#define RTL8201_ANAR_10BT_HD 0x0020 |
Definition at line 127 of file rtl8201_driver.h.
◆ RTL8201_ANAR_ACK
#define RTL8201_ANAR_ACK 0x4000 |
Definition at line 119 of file rtl8201_driver.h.
◆ RTL8201_ANAR_ASYM_PAUSE
#define RTL8201_ANAR_ASYM_PAUSE 0x0800 |
Definition at line 121 of file rtl8201_driver.h.
◆ RTL8201_ANAR_NEXT_PAGE
#define RTL8201_ANAR_NEXT_PAGE 0x8000 |
Definition at line 118 of file rtl8201_driver.h.
◆ RTL8201_ANAR_PAUSE
#define RTL8201_ANAR_PAUSE 0x0400 |
Definition at line 122 of file rtl8201_driver.h.
◆ RTL8201_ANAR_REMOTE_FAULT
#define RTL8201_ANAR_REMOTE_FAULT 0x2000 |
Definition at line 120 of file rtl8201_driver.h.
◆ RTL8201_ANAR_SELECTOR
#define RTL8201_ANAR_SELECTOR 0x001F |
Definition at line 128 of file rtl8201_driver.h.
◆ RTL8201_ANAR_SELECTOR_DEFAULT
#define RTL8201_ANAR_SELECTOR_DEFAULT 0x0001 |
Definition at line 129 of file rtl8201_driver.h.
◆ RTL8201_ANER
#define RTL8201_ANER 0x06 |
Definition at line 51 of file rtl8201_driver.h.
◆ RTL8201_ANER_LP_AN_ABLE
#define RTL8201_ANER_LP_AN_ABLE 0x0001 |
Definition at line 150 of file rtl8201_driver.h.
◆ RTL8201_ANER_LP_NEXT_PAGE_ABLE
#define RTL8201_ANER_LP_NEXT_PAGE_ABLE 0x0008 |
Definition at line 147 of file rtl8201_driver.h.
◆ RTL8201_ANER_NEXT_PAGE_ABLE
#define RTL8201_ANER_NEXT_PAGE_ABLE 0x0004 |
Definition at line 148 of file rtl8201_driver.h.
◆ RTL8201_ANER_PAGE_RECEIVED
#define RTL8201_ANER_PAGE_RECEIVED 0x0002 |
Definition at line 149 of file rtl8201_driver.h.
◆ RTL8201_ANER_PAR_DETECT_FAULT
#define RTL8201_ANER_PAR_DETECT_FAULT 0x0010 |
Definition at line 146 of file rtl8201_driver.h.
◆ RTL8201_ANLPAR
#define RTL8201_ANLPAR 0x05 |
Definition at line 50 of file rtl8201_driver.h.
◆ RTL8201_ANLPAR_100BT4
#define RTL8201_ANLPAR_100BT4 0x0200 |
Definition at line 137 of file rtl8201_driver.h.
◆ RTL8201_ANLPAR_100BTX_FD
#define RTL8201_ANLPAR_100BTX_FD 0x0100 |
Definition at line 138 of file rtl8201_driver.h.
◆ RTL8201_ANLPAR_100BTX_HD
#define RTL8201_ANLPAR_100BTX_HD 0x0080 |
Definition at line 139 of file rtl8201_driver.h.
◆ RTL8201_ANLPAR_10BT_FD
#define RTL8201_ANLPAR_10BT_FD 0x0040 |
Definition at line 140 of file rtl8201_driver.h.
◆ RTL8201_ANLPAR_10BT_HD
#define RTL8201_ANLPAR_10BT_HD 0x0020 |
Definition at line 141 of file rtl8201_driver.h.
◆ RTL8201_ANLPAR_ACK
#define RTL8201_ANLPAR_ACK 0x4000 |
Definition at line 133 of file rtl8201_driver.h.
◆ RTL8201_ANLPAR_ASYM_PAUSE
#define RTL8201_ANLPAR_ASYM_PAUSE 0x0800 |
Definition at line 135 of file rtl8201_driver.h.
◆ RTL8201_ANLPAR_NEXT_PAGE
#define RTL8201_ANLPAR_NEXT_PAGE 0x8000 |
Definition at line 132 of file rtl8201_driver.h.
◆ RTL8201_ANLPAR_PAUSE
#define RTL8201_ANLPAR_PAUSE 0x0400 |
Definition at line 136 of file rtl8201_driver.h.
◆ RTL8201_ANLPAR_REMOTE_FAULT
#define RTL8201_ANLPAR_REMOTE_FAULT 0x2000 |
Definition at line 134 of file rtl8201_driver.h.
◆ RTL8201_ANLPAR_SELECTOR
#define RTL8201_ANLPAR_SELECTOR 0x001F |
Definition at line 142 of file rtl8201_driver.h.
◆ RTL8201_ANLPAR_SELECTOR_DEFAULT
#define RTL8201_ANLPAR_SELECTOR_DEFAULT 0x0001 |
Definition at line 143 of file rtl8201_driver.h.
◆ RTL8201_BMCR
#define RTL8201_BMCR 0x00 |
Definition at line 45 of file rtl8201_driver.h.
◆ RTL8201_BMCR_AN_EN
#define RTL8201_BMCR_AN_EN 0x1000 |
Definition at line 83 of file rtl8201_driver.h.
◆ RTL8201_BMCR_COL_TEST
#define RTL8201_BMCR_COL_TEST 0x0080 |
Definition at line 88 of file rtl8201_driver.h.
◆ RTL8201_BMCR_DUPLEX_MODE
#define RTL8201_BMCR_DUPLEX_MODE 0x0100 |
Definition at line 87 of file rtl8201_driver.h.
◆ RTL8201_BMCR_ISOLATE
#define RTL8201_BMCR_ISOLATE 0x0400 |
Definition at line 85 of file rtl8201_driver.h.
◆ RTL8201_BMCR_LOOPBACK
#define RTL8201_BMCR_LOOPBACK 0x4000 |
Definition at line 81 of file rtl8201_driver.h.
◆ RTL8201_BMCR_POWER_DOWN
#define RTL8201_BMCR_POWER_DOWN 0x0800 |
Definition at line 84 of file rtl8201_driver.h.
◆ RTL8201_BMCR_RESET
#define RTL8201_BMCR_RESET 0x8000 |
Definition at line 80 of file rtl8201_driver.h.
◆ RTL8201_BMCR_RESTART_AN
#define RTL8201_BMCR_RESTART_AN 0x0200 |
Definition at line 86 of file rtl8201_driver.h.
◆ RTL8201_BMCR_SPEED_SEL_LSB
#define RTL8201_BMCR_SPEED_SEL_LSB 0x2000 |
Definition at line 82 of file rtl8201_driver.h.
◆ RTL8201_BMCR_SPEED_SEL_MSB
#define RTL8201_BMCR_SPEED_SEL_MSB 0x0040 |
Definition at line 89 of file rtl8201_driver.h.
◆ RTL8201_BMSR
#define RTL8201_BMSR 0x01 |
Definition at line 46 of file rtl8201_driver.h.
◆ RTL8201_BMSR_100BT4
#define RTL8201_BMSR_100BT4 0x8000 |
Definition at line 92 of file rtl8201_driver.h.
◆ RTL8201_BMSR_100BTX_FD
#define RTL8201_BMSR_100BTX_FD 0x4000 |
Definition at line 93 of file rtl8201_driver.h.
◆ RTL8201_BMSR_100BTX_HD
#define RTL8201_BMSR_100BTX_HD 0x2000 |
Definition at line 94 of file rtl8201_driver.h.
◆ RTL8201_BMSR_10BT_FD
#define RTL8201_BMSR_10BT_FD 0x1000 |
Definition at line 95 of file rtl8201_driver.h.
◆ RTL8201_BMSR_10BT_HD
#define RTL8201_BMSR_10BT_HD 0x0800 |
Definition at line 96 of file rtl8201_driver.h.
◆ RTL8201_BMSR_AN_CAPABLE
#define RTL8201_BMSR_AN_CAPABLE 0x0008 |
Definition at line 100 of file rtl8201_driver.h.
◆ RTL8201_BMSR_AN_COMPLETE
#define RTL8201_BMSR_AN_COMPLETE 0x0020 |
Definition at line 98 of file rtl8201_driver.h.
◆ RTL8201_BMSR_EXTENDED_CAPABLE
#define RTL8201_BMSR_EXTENDED_CAPABLE 0x0001 |
Definition at line 103 of file rtl8201_driver.h.
◆ RTL8201_BMSR_JABBER_DETECT
#define RTL8201_BMSR_JABBER_DETECT 0x0002 |
Definition at line 102 of file rtl8201_driver.h.
◆ RTL8201_BMSR_LINK_STATUS
#define RTL8201_BMSR_LINK_STATUS 0x0004 |
Definition at line 101 of file rtl8201_driver.h.
◆ RTL8201_BMSR_MF_PREAMBLE_SUPPR
#define RTL8201_BMSR_MF_PREAMBLE_SUPPR 0x0040 |
Definition at line 97 of file rtl8201_driver.h.
◆ RTL8201_BMSR_REMOTE_FAULT
#define RTL8201_BMSR_REMOTE_FAULT 0x0010 |
Definition at line 99 of file rtl8201_driver.h.
◆ RTL8201_CLSR
#define RTL8201_CLSR 0x11 |
Definition at line 65 of file rtl8201_driver.h.
◆ RTL8201_CLSR_LED_SEL0
#define RTL8201_CLSR_LED_SEL0 0x000F |
Definition at line 200 of file rtl8201_driver.h.
◆ RTL8201_CLSR_LED_SEL0_ACT
#define RTL8201_CLSR_LED_SEL0_ACT 0x0008 |
Definition at line 201 of file rtl8201_driver.h.
◆ RTL8201_CLSR_LED_SEL0_LINK_100M
#define RTL8201_CLSR_LED_SEL0_LINK_100M 0x0002 |
Definition at line 202 of file rtl8201_driver.h.
◆ RTL8201_CLSR_LED_SEL0_LINK_10M
#define RTL8201_CLSR_LED_SEL0_LINK_10M 0x0001 |
Definition at line 203 of file rtl8201_driver.h.
◆ RTL8201_CLSR_LED_SEL1
#define RTL8201_CLSR_LED_SEL1 0x00F0 |
Definition at line 196 of file rtl8201_driver.h.
◆ RTL8201_CLSR_LED_SEL1_ACT
#define RTL8201_CLSR_LED_SEL1_ACT 0x0080 |
Definition at line 197 of file rtl8201_driver.h.
◆ RTL8201_CLSR_LED_SEL1_LINK_100M
#define RTL8201_CLSR_LED_SEL1_LINK_100M 0x0020 |
Definition at line 198 of file rtl8201_driver.h.
◆ RTL8201_CLSR_LED_SEL1_LINK_10M
#define RTL8201_CLSR_LED_SEL1_LINK_10M 0x0010 |
Definition at line 199 of file rtl8201_driver.h.
◆ RTL8201_EEEAR
#define RTL8201_EEEAR 0x07, 0x3C |
Definition at line 76 of file rtl8201_driver.h.
◆ RTL8201_EEEAR_100BTX_EEE
#define RTL8201_EEEAR_100BTX_EEE 0x0002 |
Definition at line 241 of file rtl8201_driver.h.
◆ RTL8201_EEECER
#define RTL8201_EEECER 0x10 |
Definition at line 60 of file rtl8201_driver.h.
◆ RTL8201_EEECER_EEE_10_CAP
#define RTL8201_EEECER_EEE_10_CAP 0x2000 |
Definition at line 179 of file rtl8201_driver.h.
◆ RTL8201_EEECER_EEE_NWAY_EN
#define RTL8201_EEECER_EEE_NWAY_EN 0x1000 |
Definition at line 180 of file rtl8201_driver.h.
◆ RTL8201_EEECER_RX_QUIET_EN
#define RTL8201_EEECER_RX_QUIET_EN 0x0100 |
Definition at line 182 of file rtl8201_driver.h.
◆ RTL8201_EEECER_TX_QUIET_EN
#define RTL8201_EEECER_TX_QUIET_EN 0x0200 |
Definition at line 181 of file rtl8201_driver.h.
◆ RTL8201_EEECR
#define RTL8201_EEECR 0x15 |
Definition at line 61 of file rtl8201_driver.h.
◆ RTL8201_EEECR2
#define RTL8201_EEECR2 0x03, 0x14 |
Definition at line 74 of file rtl8201_driver.h.
◆ RTL8201_EEECR2_100BTX_EEE
#define RTL8201_EEECR2_100BTX_EEE 0x0002 |
Definition at line 235 of file rtl8201_driver.h.
◆ RTL8201_EEECR_EEE_100_CAP
#define RTL8201_EEECR_EEE_100_CAP 0x0001 |
Definition at line 186 of file rtl8201_driver.h.
◆ RTL8201_EEECR_RG_DIS_LDVT
#define RTL8201_EEECR_RG_DIS_LDVT 0x1000 |
Definition at line 185 of file rtl8201_driver.h.
◆ RTL8201_EEELER
#define RTL8201_EEELER 0x12 |
Definition at line 66 of file rtl8201_driver.h.
◆ RTL8201_EEELER_EEE_LED_EN0
#define RTL8201_EEELER_EEE_LED_EN0 0x0001 |
Definition at line 207 of file rtl8201_driver.h.
◆ RTL8201_EEELER_EEE_LED_EN1
#define RTL8201_EEELER_EEE_LED_EN1 0x0002 |
Definition at line 206 of file rtl8201_driver.h.
◆ RTL8201_EEELPAR
#define RTL8201_EEELPAR 0x07, 0x3D |
Definition at line 77 of file rtl8201_driver.h.
◆ RTL8201_EEELPAR_LP_100BTX_EEE
#define RTL8201_EEELPAR_LP_100BTX_EEE 0x0002 |
Definition at line 244 of file rtl8201_driver.h.
◆ RTL8201_EEEPC1R
#define RTL8201_EEEPC1R 0x03, 0x00 |
Definition at line 72 of file rtl8201_driver.h.
◆ RTL8201_EEEPC1R_CLOCK_STOP_EN
#define RTL8201_EEEPC1R_CLOCK_STOP_EN 0x0400 |
Definition at line 225 of file rtl8201_driver.h.
◆ RTL8201_EEEPS1R
#define RTL8201_EEEPS1R 0x03, 0x01 |
Definition at line 73 of file rtl8201_driver.h.
◆ RTL8201_EEEPS1R_CLK_STOP_CAPABLE
#define RTL8201_EEEPS1R_CLK_STOP_CAPABLE 0x0040 |
Definition at line 232 of file rtl8201_driver.h.
◆ RTL8201_EEEPS1R_RX_LPI_IND
#define RTL8201_EEEPS1R_RX_LPI_IND 0x0100 |
Definition at line 231 of file rtl8201_driver.h.
◆ RTL8201_EEEPS1R_RX_LPI_RCVD
#define RTL8201_EEEPS1R_RX_LPI_RCVD 0x0400 |
Definition at line 229 of file rtl8201_driver.h.
◆ RTL8201_EEEPS1R_TX_LPI_IND
#define RTL8201_EEEPS1R_TX_LPI_IND 0x0200 |
Definition at line 230 of file rtl8201_driver.h.
◆ RTL8201_EEEPS1R_TX_LPI_RCVD
#define RTL8201_EEEPS1R_TX_LPI_RCVD 0x0800 |
Definition at line 228 of file rtl8201_driver.h.
◆ RTL8201_EEEWER
#define RTL8201_EEEWER 0x03, 0x16 |
Definition at line 75 of file rtl8201_driver.h.
◆ RTL8201_EEEWER_EEE_WAKE_ERROR_COUNTER
#define RTL8201_EEEWER_EEE_WAKE_ERROR_COUNTER 0xFFFF |
Definition at line 238 of file rtl8201_driver.h.
◆ RTL8201_FMLR
#define RTL8201_FMLR 0x1C |
Definition at line 55 of file rtl8201_driver.h.
◆ RTL8201_FMLR_EN_AUTO_MDIX
#define RTL8201_FMLR_EN_AUTO_MDIX 0x0004 |
Definition at line 165 of file rtl8201_driver.h.
◆ RTL8201_FMLR_FORCE_MDI
#define RTL8201_FMLR_FORCE_MDI 0x0002 |
Definition at line 166 of file rtl8201_driver.h.
◆ RTL8201_FMLR_FX_MODE
#define RTL8201_FMLR_FX_MODE 0x0020 |
Definition at line 164 of file rtl8201_driver.h.
◆ RTL8201_IISDR
#define RTL8201_IISDR 0x1E |
Definition at line 56 of file rtl8201_driver.h.
◆ RTL8201_IISDR_AN_ERR
#define RTL8201_IISDR_AN_ERR 0x8000 |
Definition at line 169 of file rtl8201_driver.h.
◆ RTL8201_IISDR_DUPLEX_CHG
#define RTL8201_IISDR_DUPLEX_CHG 0x2000 |
Definition at line 171 of file rtl8201_driver.h.
◆ RTL8201_IISDR_LINK_STATUS_CHG
#define RTL8201_IISDR_LINK_STATUS_CHG 0x0800 |
Definition at line 172 of file rtl8201_driver.h.
◆ RTL8201_IISDR_SNR_O
#define RTL8201_IISDR_SNR_O 0x000F |
Definition at line 173 of file rtl8201_driver.h.
◆ RTL8201_IISDR_SPD_CHG
#define RTL8201_IISDR_SPD_CHG 0x4000 |
Definition at line 170 of file rtl8201_driver.h.
◆ RTL8201_IWELFR
#define RTL8201_IWELFR 0x13 |
Definition at line 67 of file rtl8201_driver.h.
◆ RTL8201_IWELFR_CUSTOMIZED_LED
#define RTL8201_IWELFR_CUSTOMIZED_LED 0x0008 |
Definition at line 215 of file rtl8201_driver.h.
◆ RTL8201_IWELFR_EN_10M_LPI
#define RTL8201_IWELFR_EN_10M_LPI 0x0001 |
Definition at line 216 of file rtl8201_driver.h.
◆ RTL8201_IWELFR_INT_AN_ERR
#define RTL8201_IWELFR_INT_AN_ERR 0x0800 |
Definition at line 212 of file rtl8201_driver.h.
◆ RTL8201_IWELFR_INT_DUP_CHG
#define RTL8201_IWELFR_INT_DUP_CHG 0x1000 |
Definition at line 211 of file rtl8201_driver.h.
◆ RTL8201_IWELFR_INT_LINK_CHG
#define RTL8201_IWELFR_INT_LINK_CHG 0x2000 |
Definition at line 210 of file rtl8201_driver.h.
◆ RTL8201_IWELFR_LED_SEL
#define RTL8201_IWELFR_LED_SEL 0x0030 |
Definition at line 214 of file rtl8201_driver.h.
◆ RTL8201_IWELFR_RG_LED0_WOL_SEL
#define RTL8201_IWELFR_RG_LED0_WOL_SEL 0x0400 |
Definition at line 213 of file rtl8201_driver.h.
◆ RTL8201_MAADR
#define RTL8201_MAADR 0x0E |
Definition at line 53 of file rtl8201_driver.h.
◆ RTL8201_MACR
#define RTL8201_MACR 0x0D |
Definition at line 52 of file rtl8201_driver.h.
◆ RTL8201_MACR_DEVAD
#define RTL8201_MACR_DEVAD 0x001F |
Definition at line 158 of file rtl8201_driver.h.
◆ RTL8201_MACR_FUNC
#define RTL8201_MACR_FUNC 0xC000 |
Definition at line 153 of file rtl8201_driver.h.
◆ RTL8201_MACR_FUNC_ADDR
#define RTL8201_MACR_FUNC_ADDR 0x0000 |
Definition at line 154 of file rtl8201_driver.h.
◆ RTL8201_MACR_FUNC_DATA_NO_POST_INC
#define RTL8201_MACR_FUNC_DATA_NO_POST_INC 0x4000 |
Definition at line 155 of file rtl8201_driver.h.
◆ RTL8201_MACR_FUNC_DATA_POST_INC_RW
#define RTL8201_MACR_FUNC_DATA_POST_INC_RW 0x8000 |
Definition at line 156 of file rtl8201_driver.h.
◆ RTL8201_MACR_FUNC_DATA_POST_INC_W
#define RTL8201_MACR_FUNC_DATA_POST_INC_W 0xC000 |
Definition at line 157 of file rtl8201_driver.h.
◆ RTL8201_MTIR
#define RTL8201_MTIR 0x14 |
Definition at line 68 of file rtl8201_driver.h.
◆ RTL8201_MTIR_RG_TX_ISOLATE_EN
#define RTL8201_MTIR_RG_TX_ISOLATE_EN 0x8000 |
Definition at line 219 of file rtl8201_driver.h.
◆ RTL8201_PDR
#define RTL8201_PDR 0x1F |
Definition at line 57 of file rtl8201_driver.h.
◆ RTL8201_PDR_PAGE_SEL
#define RTL8201_PDR_PAGE_SEL 0x00FF |
Definition at line 176 of file rtl8201_driver.h.
◆ RTL8201_PHY_ADDR
#define RTL8201_PHY_ADDR 1 |
Definition at line 39 of file rtl8201_driver.h.
◆ RTL8201_PHYID1
#define RTL8201_PHYID1 0x02 |
Definition at line 47 of file rtl8201_driver.h.
◆ RTL8201_PHYID1_OUI_MSB
#define RTL8201_PHYID1_OUI_MSB 0xFFFF |
Definition at line 106 of file rtl8201_driver.h.
◆ RTL8201_PHYID1_OUI_MSB_DEFAULT
#define RTL8201_PHYID1_OUI_MSB_DEFAULT 0x001C |
Definition at line 107 of file rtl8201_driver.h.
◆ RTL8201_PHYID2
#define RTL8201_PHYID2 0x03 |
Definition at line 48 of file rtl8201_driver.h.
◆ RTL8201_PHYID2_MODEL_NUM
#define RTL8201_PHYID2_MODEL_NUM 0x03F0 |
Definition at line 112 of file rtl8201_driver.h.
◆ RTL8201_PHYID2_MODEL_NUM_DEFAULT
#define RTL8201_PHYID2_MODEL_NUM_DEFAULT 0x0010 |
Definition at line 113 of file rtl8201_driver.h.
◆ RTL8201_PHYID2_OUI_LSB
#define RTL8201_PHYID2_OUI_LSB 0xFC00 |
Definition at line 110 of file rtl8201_driver.h.
◆ RTL8201_PHYID2_OUI_LSB_DEFAULT
#define RTL8201_PHYID2_OUI_LSB_DEFAULT 0xC800 |
Definition at line 111 of file rtl8201_driver.h.
◆ RTL8201_PHYID2_REVISION_NUM
#define RTL8201_PHYID2_REVISION_NUM 0x000F |
Definition at line 114 of file rtl8201_driver.h.
◆ RTL8201_PHYID2_REVISION_NUM_DEFAULT
#define RTL8201_PHYID2_REVISION_NUM_DEFAULT 0x0006 |
Definition at line 115 of file rtl8201_driver.h.
◆ RTL8201_PSMR
#define RTL8201_PSMR 0x18 |
Definition at line 54 of file rtl8201_driver.h.
◆ RTL8201_PSMR_EN_PWR_SAVE
#define RTL8201_PSMR_EN_PWR_SAVE 0x8000 |
Definition at line 161 of file rtl8201_driver.h.
◆ RTL8201_RMSR
#define RTL8201_RMSR 0x10 |
Definition at line 64 of file rtl8201_driver.h.
◆ RTL8201_RMSR_RG_RMII_CLKDIR
#define RTL8201_RMSR_RG_RMII_CLKDIR 0x1000 |
Definition at line 189 of file rtl8201_driver.h.
◆ RTL8201_RMSR_RG_RMII_RX_OFFSET
#define RTL8201_RMSR_RG_RMII_RX_OFFSET 0x00F0 |
Definition at line 191 of file rtl8201_driver.h.
◆ RTL8201_RMSR_RG_RMII_RXDSEL
#define RTL8201_RMSR_RG_RMII_RXDSEL 0x0002 |
Definition at line 193 of file rtl8201_driver.h.
◆ RTL8201_RMSR_RG_RMII_RXDV_SEL
#define RTL8201_RMSR_RG_RMII_RXDV_SEL 0x0004 |
Definition at line 192 of file rtl8201_driver.h.
◆ RTL8201_RMSR_RG_RMII_TX_OFFSET
#define RTL8201_RMSR_RG_RMII_TX_OFFSET 0x0F00 |
Definition at line 190 of file rtl8201_driver.h.
◆ RTL8201_SSCR
#define RTL8201_SSCR 0x18 |
Definition at line 69 of file rtl8201_driver.h.
◆ RTL8201_SSCR_RG_DIS_SSC
#define RTL8201_SSCR_RG_DIS_SSC 0x0001 |
Definition at line 222 of file rtl8201_driver.h.
Function Documentation
◆ rtl8201DisableIrq()
void rtl8201DisableIrq | ( | NetInterface * | interface | ) |
Disable interrupts.
- Parameters
-
[in] interface Underlying network interface
Definition at line 189 of file rtl8201_driver.c.
◆ rtl8201DumpPhyReg()
void rtl8201DumpPhyReg | ( | NetInterface * | interface | ) |
Dump PHY registers for debugging purpose.
- Parameters
-
[in] interface Underlying network interface
Definition at line 320 of file rtl8201_driver.c.
◆ rtl8201EnableIrq()
void rtl8201EnableIrq | ( | NetInterface * | interface | ) |
Enable interrupts.
- Parameters
-
[in] interface Underlying network interface
Definition at line 174 of file rtl8201_driver.c.
◆ rtl8201EventHandler()
void rtl8201EventHandler | ( | NetInterface * | interface | ) |
RTL8201 event handler.
- Parameters
-
[in] interface Underlying network interface
Definition at line 204 of file rtl8201_driver.c.
◆ rtl8201Init()
error_t rtl8201Init | ( | NetInterface * | interface | ) |
RTL8201 PHY transceiver initialization.
- Parameters
-
[in] interface Underlying network interface
- Returns
- Error code
Definition at line 60 of file rtl8201_driver.c.
◆ rtl8201InitHook()
void rtl8201InitHook | ( | NetInterface * | interface | ) |
RTL8201 custom configuration.
- Parameters
-
[in] interface Underlying network interface
Definition at line 126 of file rtl8201_driver.c.
◆ rtl8201ReadMmdReg()
uint16_t rtl8201ReadMmdReg | ( | NetInterface * | interface, |
uint8_t | devAddr, | ||
uint16_t | regAddr | ||
) |
Read MMD register.
- Parameters
-
[in] interface Underlying network interface [in] devAddr Device address [in] regAddr Register address
- Returns
- MMD register value
Definition at line 372 of file rtl8201_driver.c.
◆ rtl8201ReadPhyReg()
uint16_t rtl8201ReadPhyReg | ( | NetInterface * | interface, |
uint8_t | address | ||
) |
Read PHY register.
- Parameters
-
[in] interface Underlying network interface [in] address PHY register address
- Returns
- Register value
Definition at line 294 of file rtl8201_driver.c.
◆ rtl8201Tick()
void rtl8201Tick | ( | NetInterface * | interface | ) |
RTL8201 timer handler.
- Parameters
-
[in] interface Underlying network interface
Definition at line 136 of file rtl8201_driver.c.
◆ rtl8201WriteMmdReg()
void rtl8201WriteMmdReg | ( | NetInterface * | interface, |
uint8_t | devAddr, | ||
uint16_t | regAddr, | ||
uint16_t | data | ||
) |
Write MMD register.
- Parameters
-
[in] interface Underlying network interface [in] devAddr Device address [in] regAddr Register address [in] data MMD register value
Definition at line 345 of file rtl8201_driver.c.
◆ rtl8201WritePhyReg()
void rtl8201WritePhyReg | ( | NetInterface * | interface, |
uint8_t | address, | ||
uint16_t | data | ||
) |
Write PHY register.
- Parameters
-
[in] interface Underlying network interface [in] address PHY register address [in] data Register value
Definition at line 270 of file rtl8201_driver.c.
Variable Documentation
◆ rtl8201PhyDriver
|
extern |
RTL8201 Ethernet PHY driver.
Definition at line 44 of file rtl8201_driver.c.