LAN8671 10Base-T1S Ethernet PHY driver. More...
#include "core/nic.h"
Go to the source code of this file.
Functions | |
error_t | lan8671Init (NetInterface *interface) |
LAN8671 PHY transceiver initialization. More... | |
void | lan8671InitHook (NetInterface *interface) |
LAN8671 custom configuration. More... | |
void | lan8671Tick (NetInterface *interface) |
LAN8671 timer handler. More... | |
void | lan8671EnableIrq (NetInterface *interface) |
Enable interrupts. More... | |
void | lan8671DisableIrq (NetInterface *interface) |
Disable interrupts. More... | |
void | lan8671EventHandler (NetInterface *interface) |
LAN8671 event handler. More... | |
void | lan8671WritePhyReg (NetInterface *interface, uint8_t address, uint16_t data) |
Write PHY register. More... | |
uint16_t | lan8671ReadPhyReg (NetInterface *interface, uint8_t address) |
Read PHY register. More... | |
void | lan8671DumpPhyReg (NetInterface *interface) |
Dump PHY registers for debugging purpose. More... | |
void | lan8671WriteMmdReg (NetInterface *interface, uint8_t devAddr, uint16_t regAddr, uint16_t data) |
Write MMD register. More... | |
uint16_t | lan8671ReadMmdReg (NetInterface *interface, uint8_t devAddr, uint16_t regAddr) |
Read MMD register. More... | |
void | lan8671ModifyMmdReg (NetInterface *interface, uint8_t devAddr, uint16_t regAddr, uint16_t mask, uint16_t data) |
Modify MMD register. More... | |
Variables | |
const PhyDriver | lan8671PhyDriver |
LAN8671 Ethernet PHY driver. More... | |
Detailed Description
LAN8671 10Base-T1S 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 lan8671_driver.h.
Macro Definition Documentation
◆ LAN8671_BASIC_CONTROL
#define LAN8671_BASIC_CONTROL 0x00 |
Definition at line 66 of file lan8671_driver.h.
◆ LAN8671_BASIC_CONTROL_AUTO_NEG_EN
#define LAN8671_BASIC_CONTROL_AUTO_NEG_EN 0x1000 |
Definition at line 107 of file lan8671_driver.h.
◆ LAN8671_BASIC_CONTROL_COL_TEST
#define LAN8671_BASIC_CONTROL_COL_TEST 0x0080 |
Definition at line 112 of file lan8671_driver.h.
◆ LAN8671_BASIC_CONTROL_DUPLEX_MODE
#define LAN8671_BASIC_CONTROL_DUPLEX_MODE 0x0100 |
Definition at line 111 of file lan8671_driver.h.
◆ LAN8671_BASIC_CONTROL_ISOLATE
#define LAN8671_BASIC_CONTROL_ISOLATE 0x0400 |
Definition at line 109 of file lan8671_driver.h.
◆ LAN8671_BASIC_CONTROL_LOOPBACK
#define LAN8671_BASIC_CONTROL_LOOPBACK 0x4000 |
Definition at line 105 of file lan8671_driver.h.
◆ LAN8671_BASIC_CONTROL_PD
#define LAN8671_BASIC_CONTROL_PD 0x0800 |
Definition at line 108 of file lan8671_driver.h.
◆ LAN8671_BASIC_CONTROL_RE_AUTO_NEG
#define LAN8671_BASIC_CONTROL_RE_AUTO_NEG 0x0200 |
Definition at line 110 of file lan8671_driver.h.
◆ LAN8671_BASIC_CONTROL_SPD_SEL_LSB
#define LAN8671_BASIC_CONTROL_SPD_SEL_LSB 0x2000 |
Definition at line 106 of file lan8671_driver.h.
◆ LAN8671_BASIC_CONTROL_SPD_SEL_MSB
#define LAN8671_BASIC_CONTROL_SPD_SEL_MSB 0x0040 |
Definition at line 113 of file lan8671_driver.h.
◆ LAN8671_BASIC_CONTROL_SW_RESET
#define LAN8671_BASIC_CONTROL_SW_RESET 0x8000 |
Definition at line 104 of file lan8671_driver.h.
◆ LAN8671_BASIC_STATUS
#define LAN8671_BASIC_STATUS 0x01 |
Definition at line 67 of file lan8671_driver.h.
◆ LAN8671_BASIC_STATUS_100BT2_FD
#define LAN8671_BASIC_STATUS_100BT2_FD 0x0400 |
Definition at line 121 of file lan8671_driver.h.
◆ LAN8671_BASIC_STATUS_100BT2_HD
#define LAN8671_BASIC_STATUS_100BT2_HD 0x0200 |
Definition at line 122 of file lan8671_driver.h.
◆ LAN8671_BASIC_STATUS_100BT4
#define LAN8671_BASIC_STATUS_100BT4 0x8000 |
Definition at line 116 of file lan8671_driver.h.
◆ LAN8671_BASIC_STATUS_100BTX_FD
#define LAN8671_BASIC_STATUS_100BTX_FD 0x4000 |
Definition at line 117 of file lan8671_driver.h.
◆ LAN8671_BASIC_STATUS_100BTX_HD
#define LAN8671_BASIC_STATUS_100BTX_HD 0x2000 |
Definition at line 118 of file lan8671_driver.h.
◆ LAN8671_BASIC_STATUS_10BT_FD
#define LAN8671_BASIC_STATUS_10BT_FD 0x1000 |
Definition at line 119 of file lan8671_driver.h.
◆ LAN8671_BASIC_STATUS_10BT_HD
#define LAN8671_BASIC_STATUS_10BT_HD 0x0800 |
Definition at line 120 of file lan8671_driver.h.
◆ LAN8671_BASIC_STATUS_AUTO_NEG
#define LAN8671_BASIC_STATUS_AUTO_NEG 0x0008 |
Definition at line 127 of file lan8671_driver.h.
◆ LAN8671_BASIC_STATUS_AUTO_NEG_COMP
#define LAN8671_BASIC_STATUS_AUTO_NEG_COMP 0x0020 |
Definition at line 125 of file lan8671_driver.h.
◆ LAN8671_BASIC_STATUS_EXT_CAP
#define LAN8671_BASIC_STATUS_EXT_CAP 0x0001 |
Definition at line 130 of file lan8671_driver.h.
◆ LAN8671_BASIC_STATUS_EXT_STAT
#define LAN8671_BASIC_STATUS_EXT_STAT 0x0100 |
Definition at line 123 of file lan8671_driver.h.
◆ LAN8671_BASIC_STATUS_JAB_DET
#define LAN8671_BASIC_STATUS_JAB_DET 0x0002 |
Definition at line 129 of file lan8671_driver.h.
◆ LAN8671_BASIC_STATUS_LINK_STAT
#define LAN8671_BASIC_STATUS_LINK_STAT 0x0004 |
Definition at line 128 of file lan8671_driver.h.
◆ LAN8671_BASIC_STATUS_MF_PRE_SUP
#define LAN8671_BASIC_STATUS_MF_PRE_SUP 0x0040 |
Definition at line 124 of file lan8671_driver.h.
◆ LAN8671_BASIC_STATUS_RMT_FAULT
#define LAN8671_BASIC_STATUS_RMT_FAULT 0x0010 |
Definition at line 126 of file lan8671_driver.h.
◆ LAN8671_BCNCNTH
#define LAN8671_BCNCNTH 0x1F, 0x0026 |
Definition at line 93 of file lan8671_driver.h.
◆ LAN8671_BCNCNTH_BCNCNT_31_16
#define LAN8671_BCNCNTH_BCNCNT_31_16 0xFFFF |
Definition at line 263 of file lan8671_driver.h.
◆ LAN8671_BCNCNTL
#define LAN8671_BCNCNTL 0x1F, 0x0027 |
Definition at line 94 of file lan8671_driver.h.
◆ LAN8671_BCNCNTL_BCNCNT_15_0
#define LAN8671_BCNCNTL_BCNCNT_15_0 0xFFFF |
Definition at line 266 of file lan8671_driver.h.
◆ LAN8671_CTRCTRL
#define LAN8671_CTRCTRL 0x1F, 0x0020 |
Definition at line 90 of file lan8671_driver.h.
◆ LAN8671_CTRCTRL_BCNCTRE
#define LAN8671_CTRCTRL_BCNCTRE 0x0001 |
Definition at line 254 of file lan8671_driver.h.
◆ LAN8671_CTRCTRL_TOCTRE
#define LAN8671_CTRCTRL_TOCTRE 0x0002 |
Definition at line 253 of file lan8671_driver.h.
◆ LAN8671_CTRL1
#define LAN8671_CTRL1 0x1F, 0x0010 |
Definition at line 84 of file lan8671_driver.h.
◆ LAN8671_CTRL1_DIGLBE
#define LAN8671_CTRL1_DIGLBE 0x0002 |
Definition at line 219 of file lan8671_driver.h.
◆ LAN8671_IMSK1
#define LAN8671_IMSK1 0x1F, 0x001C |
Definition at line 88 of file lan8671_driver.h.
◆ LAN8671_IMSK1_BCNBFTOM
#define LAN8671_IMSK1_BCNBFTOM 0x0010 |
Definition at line 244 of file lan8671_driver.h.
◆ LAN8671_IMSK1_DEC5BM
#define LAN8671_IMSK1_DEC5BM 0x0001 |
Definition at line 247 of file lan8671_driver.h.
◆ LAN8671_IMSK1_EMPCYCM
#define LAN8671_IMSK1_EMPCYCM 0x0080 |
Definition at line 241 of file lan8671_driver.h.
◆ LAN8671_IMSK1_ESDERRM
#define LAN8671_IMSK1_ESDERRM 0x0002 |
Definition at line 246 of file lan8671_driver.h.
◆ LAN8671_IMSK1_PLCASYMM
#define LAN8671_IMSK1_PLCASYMM 0x0004 |
Definition at line 245 of file lan8671_driver.h.
◆ LAN8671_IMSK1_RXINTOM
#define LAN8671_IMSK1_RXINTOM 0x0040 |
Definition at line 242 of file lan8671_driver.h.
◆ LAN8671_IMSK1_TXCOLM
#define LAN8671_IMSK1_TXCOLM 0x0400 |
Definition at line 239 of file lan8671_driver.h.
◆ LAN8671_IMSK1_TXJABM
#define LAN8671_IMSK1_TXJABM 0x0200 |
Definition at line 240 of file lan8671_driver.h.
◆ LAN8671_IMSK1_UNEXPBM
#define LAN8671_IMSK1_UNEXPBM 0x0020 |
Definition at line 243 of file lan8671_driver.h.
◆ LAN8671_IMSK2
#define LAN8671_IMSK2 0x1F, 0x001D |
Definition at line 89 of file lan8671_driver.h.
◆ LAN8671_IMSK2_RESETCM
#define LAN8671_IMSK2_RESETCM 0x0800 |
Definition at line 250 of file lan8671_driver.h.
◆ LAN8671_LOCAL_ID
#define LAN8671_LOCAL_ID 1 |
Definition at line 60 of file lan8671_driver.h.
◆ LAN8671_MIDVER
#define LAN8671_MIDVER 0x1F, 0xCA00 |
Definition at line 96 of file lan8671_driver.h.
◆ LAN8671_MIDVER_IDM
#define LAN8671_MIDVER_IDM 0xFF00 |
Definition at line 291 of file lan8671_driver.h.
◆ LAN8671_MIDVER_IDM_DEFAULT
#define LAN8671_MIDVER_IDM_DEFAULT 0x0A00 |
Definition at line 292 of file lan8671_driver.h.
◆ LAN8671_MIDVER_VER
#define LAN8671_MIDVER_VER 0x00FF |
Definition at line 293 of file lan8671_driver.h.
◆ LAN8671_MIDVER_VER_DEFAULT
#define LAN8671_MIDVER_VER_DEFAULT 0x0010 |
Definition at line 294 of file lan8671_driver.h.
◆ LAN8671_MMDAD
#define LAN8671_MMDAD 0x0E |
Definition at line 71 of file lan8671_driver.h.
◆ LAN8671_MMDAD_ADR_DATA
#define LAN8671_MMDAD_ADR_DATA 0xFFFF |
Definition at line 159 of file lan8671_driver.h.
◆ LAN8671_MMDCTRL
#define LAN8671_MMDCTRL 0x0D |
Definition at line 70 of file lan8671_driver.h.
◆ LAN8671_MMDCTRL_DEVAD
#define LAN8671_MMDCTRL_DEVAD 0x001F |
Definition at line 153 of file lan8671_driver.h.
◆ LAN8671_MMDCTRL_DEVAD_PCS
#define LAN8671_MMDCTRL_DEVAD_PCS 0x0002 |
Definition at line 155 of file lan8671_driver.h.
◆ LAN8671_MMDCTRL_DEVAD_PMA_PMD
#define LAN8671_MMDCTRL_DEVAD_PMA_PMD 0x0001 |
Definition at line 154 of file lan8671_driver.h.
◆ LAN8671_MMDCTRL_DEVAD_VENDOR_SPECIFIC_2
#define LAN8671_MMDCTRL_DEVAD_VENDOR_SPECIFIC_2 0x001F |
Definition at line 156 of file lan8671_driver.h.
◆ LAN8671_MMDCTRL_FNCTN
#define LAN8671_MMDCTRL_FNCTN 0xC000 |
Definition at line 148 of file lan8671_driver.h.
◆ LAN8671_MMDCTRL_FNCTN_ADDR
#define LAN8671_MMDCTRL_FNCTN_ADDR 0x0000 |
Definition at line 149 of file lan8671_driver.h.
◆ LAN8671_MMDCTRL_FNCTN_DATA_NO_POST_INC
#define LAN8671_MMDCTRL_FNCTN_DATA_NO_POST_INC 0x4000 |
Definition at line 150 of file lan8671_driver.h.
◆ LAN8671_MMDCTRL_FNCTN_DATA_POST_INC_RW
#define LAN8671_MMDCTRL_FNCTN_DATA_POST_INC_RW 0x8000 |
Definition at line 151 of file lan8671_driver.h.
◆ LAN8671_MMDCTRL_FNCTN_DATA_POST_INC_W
#define LAN8671_MMDCTRL_FNCTN_DATA_POST_INC_W 0xC000 |
Definition at line 152 of file lan8671_driver.h.
◆ LAN8671_NODE_COUNT
#define LAN8671_NODE_COUNT 8 |
Definition at line 53 of file lan8671_driver.h.
◆ LAN8671_PADCTRL3
#define LAN8671_PADCTRL3 0x1F, 0x00CB |
Definition at line 95 of file lan8671_driver.h.
◆ LAN8671_PADCTRL3_PDRV1
#define LAN8671_PADCTRL3_PDRV1 0x0300 |
Definition at line 284 of file lan8671_driver.h.
◆ LAN8671_PADCTRL3_PDRV1_HIGH
#define LAN8671_PADCTRL3_PDRV1_HIGH 0x0300 |
Definition at line 288 of file lan8671_driver.h.
◆ LAN8671_PADCTRL3_PDRV1_LOW
#define LAN8671_PADCTRL3_PDRV1_LOW 0x0000 |
Definition at line 285 of file lan8671_driver.h.
◆ LAN8671_PADCTRL3_PDRV1_MEDIUM_HIGH
#define LAN8671_PADCTRL3_PDRV1_MEDIUM_HIGH 0x0200 |
Definition at line 287 of file lan8671_driver.h.
◆ LAN8671_PADCTRL3_PDRV1_MEDIUM_LOW
#define LAN8671_PADCTRL3_PDRV1_MEDIUM_LOW 0x0100 |
Definition at line 286 of file lan8671_driver.h.
◆ LAN8671_PADCTRL3_PDRV2
#define LAN8671_PADCTRL3_PDRV2 0x0C00 |
Definition at line 279 of file lan8671_driver.h.
◆ LAN8671_PADCTRL3_PDRV2_HIGH
#define LAN8671_PADCTRL3_PDRV2_HIGH 0x0C00 |
Definition at line 283 of file lan8671_driver.h.
◆ LAN8671_PADCTRL3_PDRV2_LOW
#define LAN8671_PADCTRL3_PDRV2_LOW 0x0000 |
Definition at line 280 of file lan8671_driver.h.
◆ LAN8671_PADCTRL3_PDRV2_MEDIUM_HIGH
#define LAN8671_PADCTRL3_PDRV2_MEDIUM_HIGH 0x0800 |
Definition at line 282 of file lan8671_driver.h.
◆ LAN8671_PADCTRL3_PDRV2_MEDIUM_LOW
#define LAN8671_PADCTRL3_PDRV2_MEDIUM_LOW 0x0400 |
Definition at line 281 of file lan8671_driver.h.
◆ LAN8671_PADCTRL3_PDRV3
#define LAN8671_PADCTRL3_PDRV3 0x3000 |
Definition at line 274 of file lan8671_driver.h.
◆ LAN8671_PADCTRL3_PDRV3_HIGH
#define LAN8671_PADCTRL3_PDRV3_HIGH 0x3000 |
Definition at line 278 of file lan8671_driver.h.
◆ LAN8671_PADCTRL3_PDRV3_LOW
#define LAN8671_PADCTRL3_PDRV3_LOW 0x0000 |
Definition at line 275 of file lan8671_driver.h.
◆ LAN8671_PADCTRL3_PDRV3_MEDIUM_HIGH
#define LAN8671_PADCTRL3_PDRV3_MEDIUM_HIGH 0x2000 |
Definition at line 277 of file lan8671_driver.h.
◆ LAN8671_PADCTRL3_PDRV3_MEDIUM_LOW
#define LAN8671_PADCTRL3_PDRV3_MEDIUM_LOW 0x1000 |
Definition at line 276 of file lan8671_driver.h.
◆ LAN8671_PADCTRL3_PDRV4
#define LAN8671_PADCTRL3_PDRV4 0xC000 |
Definition at line 269 of file lan8671_driver.h.
◆ LAN8671_PADCTRL3_PDRV4_HIGH
#define LAN8671_PADCTRL3_PDRV4_HIGH 0xC000 |
Definition at line 273 of file lan8671_driver.h.
◆ LAN8671_PADCTRL3_PDRV4_LOW
#define LAN8671_PADCTRL3_PDRV4_LOW 0x0000 |
Definition at line 270 of file lan8671_driver.h.
◆ LAN8671_PADCTRL3_PDRV4_MEDIUM_HIGH
#define LAN8671_PADCTRL3_PDRV4_MEDIUM_HIGH 0x8000 |
Definition at line 272 of file lan8671_driver.h.
◆ LAN8671_PADCTRL3_PDRV4_MEDIUM_LOW
#define LAN8671_PADCTRL3_PDRV4_MEDIUM_LOW 0x4000 |
Definition at line 271 of file lan8671_driver.h.
◆ LAN8671_PHY_ADDR
#define LAN8671_PHY_ADDR 0 |
Definition at line 39 of file lan8671_driver.h.
◆ LAN8671_PHY_ID0
#define LAN8671_PHY_ID0 0x02 |
Definition at line 68 of file lan8671_driver.h.
◆ LAN8671_PHY_ID0_OUI_10_17
#define LAN8671_PHY_ID0_OUI_10_17 0x00FF |
Definition at line 135 of file lan8671_driver.h.
◆ LAN8671_PHY_ID0_OUI_10_17_DEFAULT
#define LAN8671_PHY_ID0_OUI_10_17_DEFAULT 0x0007 |
Definition at line 136 of file lan8671_driver.h.
◆ LAN8671_PHY_ID0_OUI_2_9
#define LAN8671_PHY_ID0_OUI_2_9 0xFF00 |
Definition at line 133 of file lan8671_driver.h.
◆ LAN8671_PHY_ID0_OUI_2_9_DEFAULT
#define LAN8671_PHY_ID0_OUI_2_9_DEFAULT 0x0000 |
Definition at line 134 of file lan8671_driver.h.
◆ LAN8671_PHY_ID1
#define LAN8671_PHY_ID1 0x03 |
Definition at line 69 of file lan8671_driver.h.
◆ LAN8671_PHY_ID1_MODEL
#define LAN8671_PHY_ID1_MODEL 0x03F0 |
Definition at line 141 of file lan8671_driver.h.
◆ LAN8671_PHY_ID1_MODEL_DEFAULT
#define LAN8671_PHY_ID1_MODEL_DEFAULT 0x0160 |
Definition at line 142 of file lan8671_driver.h.
◆ LAN8671_PHY_ID1_OUI_18_23
#define LAN8671_PHY_ID1_OUI_18_23 0xFC00 |
Definition at line 139 of file lan8671_driver.h.
◆ LAN8671_PHY_ID1_OUI_18_23_DEFAULT
#define LAN8671_PHY_ID1_OUI_18_23_DEFAULT 0xC000 |
Definition at line 140 of file lan8671_driver.h.
◆ LAN8671_PHY_ID1_REV
#define LAN8671_PHY_ID1_REV 0x000F |
Definition at line 143 of file lan8671_driver.h.
◆ LAN8671_PHY_ID1_REV_0
#define LAN8671_PHY_ID1_REV_0 0x0000 |
Definition at line 144 of file lan8671_driver.h.
◆ LAN8671_PHY_ID1_REV_2
#define LAN8671_PHY_ID1_REV_2 0x0002 |
Definition at line 145 of file lan8671_driver.h.
◆ LAN8671_PLCA_BURST
#define LAN8671_PLCA_BURST 0x1F, 0xCA05 |
Definition at line 101 of file lan8671_driver.h.
◆ LAN8671_PLCA_BURST_BTMR
#define LAN8671_PLCA_BURST_BTMR 0x00FF |
Definition at line 317 of file lan8671_driver.h.
◆ LAN8671_PLCA_BURST_BTMR_DEFAULT
#define LAN8671_PLCA_BURST_BTMR_DEFAULT 0x0080 |
Definition at line 318 of file lan8671_driver.h.
◆ LAN8671_PLCA_BURST_MAXBC
#define LAN8671_PLCA_BURST_MAXBC 0xFF00 |
Definition at line 315 of file lan8671_driver.h.
◆ LAN8671_PLCA_BURST_MAXBC_DISABLED
#define LAN8671_PLCA_BURST_MAXBC_DISABLED 0x0000 |
Definition at line 316 of file lan8671_driver.h.
◆ LAN8671_PLCA_CTRL0
#define LAN8671_PLCA_CTRL0 0x1F, 0xCA01 |
Definition at line 97 of file lan8671_driver.h.
◆ LAN8671_PLCA_CTRL0_EN
#define LAN8671_PLCA_CTRL0_EN 0x8000 |
Definition at line 297 of file lan8671_driver.h.
◆ LAN8671_PLCA_CTRL0_RST
#define LAN8671_PLCA_CTRL0_RST 0x4000 |
Definition at line 298 of file lan8671_driver.h.
◆ LAN8671_PLCA_CTRL1
#define LAN8671_PLCA_CTRL1 0x1F, 0xCA02 |
Definition at line 98 of file lan8671_driver.h.
◆ LAN8671_PLCA_CTRL1_ID
#define LAN8671_PLCA_CTRL1_ID 0x00FF |
Definition at line 303 of file lan8671_driver.h.
◆ LAN8671_PLCA_CTRL1_ID_PLCA_COORDINATOR
#define LAN8671_PLCA_CTRL1_ID_PLCA_COORDINATOR 0x0000 |
Definition at line 304 of file lan8671_driver.h.
◆ LAN8671_PLCA_CTRL1_ID_PLCA_DISABLED
#define LAN8671_PLCA_CTRL1_ID_PLCA_DISABLED 0x00FF |
Definition at line 305 of file lan8671_driver.h.
◆ LAN8671_PLCA_CTRL1_NCNT
#define LAN8671_PLCA_CTRL1_NCNT 0xFF00 |
Definition at line 301 of file lan8671_driver.h.
◆ LAN8671_PLCA_CTRL1_NCNT_DEFAULT
#define LAN8671_PLCA_CTRL1_NCNT_DEFAULT 0x0800 |
Definition at line 302 of file lan8671_driver.h.
◆ LAN8671_PLCA_STS
#define LAN8671_PLCA_STS 0x1F, 0xCA03 |
Definition at line 99 of file lan8671_driver.h.
◆ LAN8671_PLCA_STS_PST
#define LAN8671_PLCA_STS_PST 0x8000 |
Definition at line 308 of file lan8671_driver.h.
◆ LAN8671_PLCA_SUPPORT
#define LAN8671_PLCA_SUPPORT ENABLED |
Definition at line 46 of file lan8671_driver.h.
◆ LAN8671_PLCA_TOTMR
#define LAN8671_PLCA_TOTMR 0x1F, 0xCA04 |
Definition at line 100 of file lan8671_driver.h.
◆ LAN8671_PLCA_TOTMR_TOTMR
#define LAN8671_PLCA_TOTMR_TOTMR 0x00FF |
Definition at line 311 of file lan8671_driver.h.
◆ LAN8671_PLCA_TOTMR_TOTMR_DEFAULT
#define LAN8671_PLCA_TOTMR_TOTMR_DEFAULT 0x0020 |
Definition at line 312 of file lan8671_driver.h.
◆ LAN8671_PMA_PMD_EXT_ABILITY
#define LAN8671_PMA_PMD_EXT_ABILITY 0x01, 0x0012 |
Definition at line 75 of file lan8671_driver.h.
◆ LAN8671_PMA_PMD_EXT_ABILITY_T1LABL
#define LAN8671_PMA_PMD_EXT_ABILITY_T1LABL 0x0004 |
Definition at line 173 of file lan8671_driver.h.
◆ LAN8671_PMA_PMD_EXT_ABILITY_T1SABL
#define LAN8671_PMA_PMD_EXT_ABILITY_T1SABL 0x0008 |
Definition at line 172 of file lan8671_driver.h.
◆ LAN8671_STRAP_CTRL0
#define LAN8671_STRAP_CTRL0 0x12 |
Definition at line 72 of file lan8671_driver.h.
◆ LAN8671_STRAP_CTRL0_MITYP
#define LAN8671_STRAP_CTRL0_MITYP 0x0180 |
Definition at line 162 of file lan8671_driver.h.
◆ LAN8671_STRAP_CTRL0_MITYP_MII
#define LAN8671_STRAP_CTRL0_MITYP_MII 0x0100 |
Definition at line 164 of file lan8671_driver.h.
◆ LAN8671_STRAP_CTRL0_MITYP_RMII
#define LAN8671_STRAP_CTRL0_MITYP_RMII 0x0080 |
Definition at line 163 of file lan8671_driver.h.
◆ LAN8671_STRAP_CTRL0_PKGTYP
#define LAN8671_STRAP_CTRL0_PKGTYP 0x0060 |
Definition at line 165 of file lan8671_driver.h.
◆ LAN8671_STRAP_CTRL0_PKGTYP_24_PIN
#define LAN8671_STRAP_CTRL0_PKGTYP_24_PIN 0x0040 |
Definition at line 167 of file lan8671_driver.h.
◆ LAN8671_STRAP_CTRL0_PKGTYP_32_PIN
#define LAN8671_STRAP_CTRL0_PKGTYP_32_PIN 0x0020 |
Definition at line 166 of file lan8671_driver.h.
◆ LAN8671_STRAP_CTRL0_PKGTYP_36_PIN
#define LAN8671_STRAP_CTRL0_PKGTYP_36_PIN 0x0060 |
Definition at line 168 of file lan8671_driver.h.
◆ LAN8671_STRAP_CTRL0_SMIADR
#define LAN8671_STRAP_CTRL0_SMIADR 0x001F |
Definition at line 169 of file lan8671_driver.h.
◆ LAN8671_STS1
#define LAN8671_STS1 0x1F, 0x0018 |
Definition at line 85 of file lan8671_driver.h.
◆ LAN8671_STS1_BCNBFTO
#define LAN8671_STS1_BCNBFTO 0x0010 |
Definition at line 227 of file lan8671_driver.h.
◆ LAN8671_STS1_DEC5B
#define LAN8671_STS1_DEC5B 0x0001 |
Definition at line 230 of file lan8671_driver.h.
◆ LAN8671_STS1_EMPCYC
#define LAN8671_STS1_EMPCYC 0x0080 |
Definition at line 224 of file lan8671_driver.h.
◆ LAN8671_STS1_ESDERR
#define LAN8671_STS1_ESDERR 0x0002 |
Definition at line 229 of file lan8671_driver.h.
◆ LAN8671_STS1_PLCASYM
#define LAN8671_STS1_PLCASYM 0x0004 |
Definition at line 228 of file lan8671_driver.h.
◆ LAN8671_STS1_RXINTO
#define LAN8671_STS1_RXINTO 0x0040 |
Definition at line 225 of file lan8671_driver.h.
◆ LAN8671_STS1_TXCOL
#define LAN8671_STS1_TXCOL 0x0400 |
Definition at line 222 of file lan8671_driver.h.
◆ LAN8671_STS1_TXJAB
#define LAN8671_STS1_TXJAB 0x0200 |
Definition at line 223 of file lan8671_driver.h.
◆ LAN8671_STS1_UNEXPB
#define LAN8671_STS1_UNEXPB 0x0020 |
Definition at line 226 of file lan8671_driver.h.
◆ LAN8671_STS2
#define LAN8671_STS2 0x1F, 0x0019 |
Definition at line 86 of file lan8671_driver.h.
◆ LAN8671_STS2_RESETC
#define LAN8671_STS2_RESETC 0x0800 |
Definition at line 233 of file lan8671_driver.h.
◆ LAN8671_STS3
#define LAN8671_STS3 0x1F, 0x001A |
Definition at line 87 of file lan8671_driver.h.
◆ LAN8671_STS3_ERRTOID
#define LAN8671_STS3_ERRTOID 0x0080 |
Definition at line 236 of file lan8671_driver.h.
◆ LAN8671_T1PMAPMDCTL
#define LAN8671_T1PMAPMDCTL 0x01, 0x0834 |
Definition at line 76 of file lan8671_driver.h.
◆ LAN8671_T1PMAPMDCTL_TYPSEL
#define LAN8671_T1PMAPMDCTL_TYPSEL 0x000F |
Definition at line 176 of file lan8671_driver.h.
◆ LAN8671_T1PMAPMDCTL_TYPSEL_1000BASE_T1
#define LAN8671_T1PMAPMDCTL_TYPSEL_1000BASE_T1 0x0001 |
Definition at line 178 of file lan8671_driver.h.
◆ LAN8671_T1PMAPMDCTL_TYPSEL_100BASE_T1
#define LAN8671_T1PMAPMDCTL_TYPSEL_100BASE_T1 0x0000 |
Definition at line 177 of file lan8671_driver.h.
◆ LAN8671_T1PMAPMDCTL_TYPSEL_10BASE_T1L
#define LAN8671_T1PMAPMDCTL_TYPSEL_10BASE_T1L 0x0002 |
Definition at line 179 of file lan8671_driver.h.
◆ LAN8671_T1PMAPMDCTL_TYPSEL_10BASE_T1S
#define LAN8671_T1PMAPMDCTL_TYPSEL_10BASE_T1S 0x0003 |
Definition at line 180 of file lan8671_driver.h.
◆ LAN8671_T1SPCSCTL
#define LAN8671_T1SPCSCTL 0x02, 0x08F3 |
Definition at line 80 of file lan8671_driver.h.
◆ LAN8671_T1SPCSCTL_DUPLEX
#define LAN8671_T1SPCSCTL_DUPLEX 0x0100 |
Definition at line 207 of file lan8671_driver.h.
◆ LAN8671_T1SPCSCTL_LBE
#define LAN8671_T1SPCSCTL_LBE 0x4000 |
Definition at line 206 of file lan8671_driver.h.
◆ LAN8671_T1SPCSCTL_RST
#define LAN8671_T1SPCSCTL_RST 0x8000 |
Definition at line 205 of file lan8671_driver.h.
◆ LAN8671_T1SPCSDIAG1
#define LAN8671_T1SPCSDIAG1 0x02, 0x08F5 |
Definition at line 82 of file lan8671_driver.h.
◆ LAN8671_T1SPCSDIAG1_RMTJABCNT
#define LAN8671_T1SPCSDIAG1_RMTJABCNT 0xFFFF |
Definition at line 213 of file lan8671_driver.h.
◆ LAN8671_T1SPCSDIAG2
#define LAN8671_T1SPCSDIAG2 0x02, 0x08F6 |
Definition at line 83 of file lan8671_driver.h.
◆ LAN8671_T1SPCSDIAG2_CORTXCNT
#define LAN8671_T1SPCSDIAG2_CORTXCNT 0xFFFF |
Definition at line 216 of file lan8671_driver.h.
◆ LAN8671_T1SPCSSTS
#define LAN8671_T1SPCSSTS 0x02, 0x08F4 |
Definition at line 81 of file lan8671_driver.h.
◆ LAN8671_T1SPCSSTS_FAULT
#define LAN8671_T1SPCSSTS_FAULT 0x0080 |
Definition at line 210 of file lan8671_driver.h.
◆ LAN8671_T1SPMACTL
#define LAN8671_T1SPMACTL 0x01, 0x08F9 |
Definition at line 77 of file lan8671_driver.h.
◆ LAN8671_T1SPMACTL_LBE
#define LAN8671_T1SPMACTL_LBE 0x0001 |
Definition at line 187 of file lan8671_driver.h.
◆ LAN8671_T1SPMACTL_LPE
#define LAN8671_T1SPMACTL_LPE 0x0800 |
Definition at line 185 of file lan8671_driver.h.
◆ LAN8671_T1SPMACTL_MDE
#define LAN8671_T1SPMACTL_MDE 0x0400 |
Definition at line 186 of file lan8671_driver.h.
◆ LAN8671_T1SPMACTL_RST
#define LAN8671_T1SPMACTL_RST 0x8000 |
Definition at line 183 of file lan8671_driver.h.
◆ LAN8671_T1SPMACTL_TXD
#define LAN8671_T1SPMACTL_TXD 0x4000 |
Definition at line 184 of file lan8671_driver.h.
◆ LAN8671_T1SPMASTS
#define LAN8671_T1SPMASTS 0x01, 0x08FA |
Definition at line 78 of file lan8671_driver.h.
◆ LAN8671_T1SPMASTS_LBA
#define LAN8671_T1SPMASTS_LBA 0x2000 |
Definition at line 190 of file lan8671_driver.h.
◆ LAN8671_T1SPMASTS_LPA
#define LAN8671_T1SPMASTS_LPA 0x0800 |
Definition at line 191 of file lan8671_driver.h.
◆ LAN8671_T1SPMASTS_MDA
#define LAN8671_T1SPMASTS_MDA 0x0400 |
Definition at line 192 of file lan8671_driver.h.
◆ LAN8671_T1SPMASTS_RXFA
#define LAN8671_T1SPMASTS_RXFA 0x0200 |
Definition at line 193 of file lan8671_driver.h.
◆ LAN8671_T1SPMASTS_RXFD
#define LAN8671_T1SPMASTS_RXFD 0x0002 |
Definition at line 194 of file lan8671_driver.h.
◆ LAN8671_T1STSTCTL
#define LAN8671_T1STSTCTL 0x01, 0x08FB |
Definition at line 79 of file lan8671_driver.h.
◆ LAN8671_T1STSTCTL_TSTCTL
#define LAN8671_T1STSTCTL_TSTCTL 0xE000 |
Definition at line 197 of file lan8671_driver.h.
◆ LAN8671_T1STSTCTL_TSTCTL_NORMAL
#define LAN8671_T1STSTCTL_TSTCTL_NORMAL 0x0000 |
Definition at line 198 of file lan8671_driver.h.
◆ LAN8671_T1STSTCTL_TSTCTL_TEST_MODE_1
#define LAN8671_T1STSTCTL_TSTCTL_TEST_MODE_1 0x2000 |
Definition at line 199 of file lan8671_driver.h.
◆ LAN8671_T1STSTCTL_TSTCTL_TEST_MODE_2
#define LAN8671_T1STSTCTL_TSTCTL_TEST_MODE_2 0x4000 |
Definition at line 200 of file lan8671_driver.h.
◆ LAN8671_T1STSTCTL_TSTCTL_TEST_MODE_3
#define LAN8671_T1STSTCTL_TSTCTL_TEST_MODE_3 0x6000 |
Definition at line 201 of file lan8671_driver.h.
◆ LAN8671_T1STSTCTL_TSTCTL_TEST_MODE_4
#define LAN8671_T1STSTCTL_TSTCTL_TEST_MODE_4 0x8000 |
Definition at line 202 of file lan8671_driver.h.
◆ LAN8671_TOCNTH
#define LAN8671_TOCNTH 0x1F, 0x0024 |
Definition at line 91 of file lan8671_driver.h.
◆ LAN8671_TOCNTH_TOCNT_31_16
#define LAN8671_TOCNTH_TOCNT_31_16 0xFFFF |
Definition at line 257 of file lan8671_driver.h.
◆ LAN8671_TOCNTL
#define LAN8671_TOCNTL 0x1F, 0x0025 |
Definition at line 92 of file lan8671_driver.h.
◆ LAN8671_TOCNTL_TOCNT_15_0
#define LAN8671_TOCNTL_TOCNT_15_0 0xFFFF |
Definition at line 260 of file lan8671_driver.h.
Function Documentation
◆ lan8671DisableIrq()
void lan8671DisableIrq | ( | NetInterface * | interface | ) |
Disable interrupts.
- Parameters
-
[in] interface Underlying network interface
Definition at line 205 of file lan8671_driver.c.
◆ lan8671DumpPhyReg()
void lan8671DumpPhyReg | ( | NetInterface * | interface | ) |
Dump PHY registers for debugging purpose.
- Parameters
-
[in] interface Underlying network interface
Definition at line 318 of file lan8671_driver.c.
◆ lan8671EnableIrq()
void lan8671EnableIrq | ( | NetInterface * | interface | ) |
Enable interrupts.
- Parameters
-
[in] interface Underlying network interface
Definition at line 190 of file lan8671_driver.c.
◆ lan8671EventHandler()
void lan8671EventHandler | ( | NetInterface * | interface | ) |
LAN8671 event handler.
- Parameters
-
[in] interface Underlying network interface
Definition at line 220 of file lan8671_driver.c.
◆ lan8671Init()
error_t lan8671Init | ( | NetInterface * | interface | ) |
LAN8671 PHY transceiver initialization.
- Parameters
-
[in] interface Underlying network interface
- Returns
- Error code
Definition at line 60 of file lan8671_driver.c.
◆ lan8671InitHook()
void lan8671InitHook | ( | NetInterface * | interface | ) |
LAN8671 custom configuration.
- Parameters
-
[in] interface Underlying network interface
Definition at line 119 of file lan8671_driver.c.
◆ lan8671ModifyMmdReg()
void lan8671ModifyMmdReg | ( | NetInterface * | interface, |
uint8_t | devAddr, | ||
uint16_t | regAddr, | ||
uint16_t | mask, | ||
uint16_t | data | ||
) |
Modify MMD register.
- Parameters
-
[in] interface Underlying network interface [in] devAddr Device address [in] regAddr Register address [in] mask 16-bit mask [in] data 16-bit value
Definition at line 398 of file lan8671_driver.c.
◆ lan8671ReadMmdReg()
uint16_t lan8671ReadMmdReg | ( | 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 370 of file lan8671_driver.c.
◆ lan8671ReadPhyReg()
uint16_t lan8671ReadPhyReg | ( | 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 292 of file lan8671_driver.c.
◆ lan8671Tick()
void lan8671Tick | ( | NetInterface * | interface | ) |
LAN8671 timer handler.
- Parameters
-
[in] interface Underlying network interface
Definition at line 145 of file lan8671_driver.c.
◆ lan8671WriteMmdReg()
void lan8671WriteMmdReg | ( | 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 343 of file lan8671_driver.c.
◆ lan8671WritePhyReg()
void lan8671WritePhyReg | ( | 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 268 of file lan8671_driver.c.
Variable Documentation
◆ lan8671PhyDriver
|
extern |
LAN8671 Ethernet PHY driver.
Definition at line 44 of file lan8671_driver.c.