lan8700_driver.h File Reference

LAN8700 Ethernet PHY transceiver. More...

#include "core/nic.h"

Go to the source code of this file.

Macros

#define LAN8700_PHY_ADDR   0
 
#define LAN8700_PHY_REG_BMCR   0x00
 
#define LAN8700_PHY_REG_BMSR   0x01
 
#define LAN8700_PHY_REG_PHYIDR1   0x02
 
#define LAN8700_PHY_REG_PHYIDR2   0x03
 
#define LAN8700_PHY_REG_ANAR   0x04
 
#define LAN8700_PHY_REG_ANLPAR   0x05
 
#define LAN8700_PHY_REG_ANER   0x06
 
#define LAN8700_PHY_REG_SRR   0x10
 
#define LAN8700_PHY_REG_MCSR   0x11
 
#define LAN8700_PHY_REG_SMR   0x12
 
#define LAN8700_PHY_REG_SECR   0x1A
 
#define LAN8700_PHY_REG_SCSIR   0x1B
 
#define LAN8700_PHY_REG_SITCR   0x1C
 
#define LAN8700_PHY_REG_ISR   0x1D
 
#define LAN8700_PHY_REG_IMR   0x1E
 
#define LAN8700_PHY_REG_PSCSR   0x1F
 
#define BMCR_RESET   (1 << 15)
 
#define BMCR_LOOPBACK   (1 << 14)
 
#define BMCR_SPEED_SEL   (1 << 13)
 
#define BMCR_AN_EN   (1 << 12)
 
#define BMCR_POWER_DOWN   (1 << 11)
 
#define BMCR_ISOLATE   (1 << 10)
 
#define BMCR_RESTART_AN   (1 << 9)
 
#define BMCR_DUPLEX_MODE   (1 << 8)
 
#define BMCR_COL_TEST   (1 << 7)
 
#define BMSR_100BT4   (1 << 15)
 
#define BMSR_100BTX_FD   (1 << 14)
 
#define BMSR_100BTX   (1 << 13)
 
#define BMSR_10BT_FD   (1 << 12)
 
#define BMSR_10BT   (1 << 11)
 
#define BMSR_AN_COMPLETE   (1 << 5)
 
#define BMSR_REMOTE_FAULT   (1 << 4)
 
#define BMSR_AN_ABLE   (1 << 3)
 
#define BMSR_LINK_STATUS   (1 << 2)
 
#define BMSR_JABBER_DETECT   (1 << 1)
 
#define BMSR_EXTENDED_CAP   (1 << 0)
 
#define ANAR_NP   (1 << 15)
 
#define ANAR_RF   (1 << 13)
 
#define ANAR_PAUSE1   (1 << 11)
 
#define ANAR_PAUSE0   (1 << 10)
 
#define ANAR_100BT4   (1 << 9)
 
#define ANAR_100BTX_FD   (1 << 8)
 
#define ANAR_100BTX   (1 << 7)
 
#define ANAR_10BT_FD   (1 << 6)
 
#define ANAR_10BT   (1 << 5)
 
#define ANAR_SELECTOR4   (1 << 4)
 
#define ANAR_SELECTOR3   (1 << 3)
 
#define ANAR_SELECTOR2   (1 << 2)
 
#define ANAR_SELECTOR1   (1 << 1)
 
#define ANAR_SELECTOR0   (1 << 0)
 
#define ANLPAR_NP   (1 << 15)
 
#define ANLPAR_ACK   (1 << 14)
 
#define ANLPAR_RF   (1 << 13)
 
#define ANLPAR_PAUSE   (1 << 10)
 
#define ANLPAR_100BT4   (1 << 9)
 
#define ANLPAR_100BTX_FD   (1 << 8)
 
#define ANLPAR_100BTX   (1 << 7)
 
#define ANLPAR_10BT_FD   (1 << 6)
 
#define ANLPAR_10BT   (1 << 5)
 
#define ANLPAR_SELECTOR4   (1 << 4)
 
#define ANLPAR_SELECTOR3   (1 << 3)
 
#define ANLPAR_SELECTOR2   (1 << 2)
 
#define ANLPAR_SELECTOR1   (1 << 1)
 
#define ANLPAR_SELECTOR0   (1 << 0)
 
#define ANER_PDF   (1 << 4)
 
#define ANER_LP_NP_ABLE   (1 << 3)
 
#define ANER_NP_ABLE   (1 << 2)
 
#define ANER_PAGE_RX   (1 << 1)
 
#define ANER_LP_AN_ABLE   (1 << 0)
 
#define SRR_SILICON_REVISON3   (1 << 9)
 
#define SRR_SILICON_REVISON2   (1 << 8)
 
#define SRR_SILICON_REVISON1   (1 << 7)
 
#define SRR_SILICON_REVISON0   (1 << 6)
 
#define MCSR_EDPWRDOWN   (1 << 13)
 
#define MCSR_LOWSQEN   (1 << 11)
 
#define MCSR_MDPREBP   (1 << 10)
 
#define MCSR_FARLOOPBACK   (1 << 9)
 
#define MCSR_ALTINT   (1 << 6)
 
#define MCSR_PHYADBP   (1 << 3)
 
#define MCSR_FORCE_GOOD_LINK_STATUS   (1 << 2)
 
#define MCSR_ENERGYON   (1 << 1)
 
#define SMR_MIIMODE   (1 << 14)
 
#define SMR_MODE2   (1 << 7)
 
#define SMR_MODE1   (1 << 6)
 
#define SMR_MODE0   (1 << 5)
 
#define SMR_PHYAD4   (1 << 4)
 
#define SMR_PHYAD3   (1 << 3)
 
#define SMR_PHYAD2   (1 << 2)
 
#define SMR_PHYAD1   (1 << 1)
 
#define SMR_PHYAD0   (1 << 0)
 
#define SCSIR_AMDIXCTRL   (1 << 15)
 
#define SCSIR_CH_SELECT   (1 << 13)
 
#define SCSIR_SQEOFF   (1 << 11)
 
#define SCSIR_XPOL   (1 << 4)
 
#define ISR_ENERGYON   (1 << 7)
 
#define ISR_AN_COMPLETE   (1 << 6)
 
#define ISR_REMOTE_FAULT   (1 << 5)
 
#define ISR_LINK_DOWN   (1 << 4)
 
#define ISR_AN_LP_ACK   (1 << 3)
 
#define ISR_PD_FAULT   (1 << 2)
 
#define ISR_AN_PAGE_RECEIVED   (1 << 1)
 
#define IMR_ENERGYON   (1 << 7)
 
#define IMR_AN_COMPLETE   (1 << 6)
 
#define IMR_REMOTE_FAULT   (1 << 5)
 
#define IMR_LINK_DOWN   (1 << 4)
 
#define IMR_AN_LP_ACK   (1 << 3)
 
#define IMR_PD_FAULT   (1 << 2)
 
#define IMR_AN_PAGE_RECEIVED   (1 << 1)
 
#define PSCSR_AUTODONE   (1 << 12)
 
#define PSCSR_GPO2   (1 << 9)
 
#define PSCSR_GPO1   (1 << 8)
 
#define PSCSR_GPO0   (1 << 7)
 
#define PSCSR_ENABLE_4B5B   (1 << 6)
 
#define PSCSR_HCDSPEED2   (1 << 4)
 
#define PSCSR_HCDSPEED1   (1 << 3)
 
#define PSCSR_HCDSPEED0   (1 << 2)
 
#define PSCSR_SCRAMBLE_DISABLE   (1 << 0)
 
#define PSCSR_HCDSPEED_MASK   (7 << 2)
 
#define PSCSR_HCDSPEED_10BT   (1 << 2)
 
#define PSCSR_HCDSPEED_100BTX   (2 << 2)
 
#define PSCSR_HCDSPEED_10BT_FD   (5 << 2)
 
#define PSCSR_HCDSPEED_100BTX_FD   (6 << 2)
 

Functions

error_t lan8700Init (NetInterface *interface)
 LAN8700 PHY transceiver initialization. More...
 
void lan8700Tick (NetInterface *interface)
 LAN8700 timer handler. More...
 
void lan8700EnableIrq (NetInterface *interface)
 Enable interrupts. More...
 
void lan8700DisableIrq (NetInterface *interface)
 Disable interrupts. More...
 
void lan8700EventHandler (NetInterface *interface)
 LAN8700 event handler. More...
 
void lan8700WritePhyReg (NetInterface *interface, uint8_t address, uint16_t data)
 Write PHY register. More...
 
uint16_t lan8700ReadPhyReg (NetInterface *interface, uint8_t address)
 Read PHY register. More...
 
void lan8700DumpPhyReg (NetInterface *interface)
 Dump PHY registers for debugging purpose. More...
 

Variables

const PhyDriver lan8700PhyDriver
 LAN8700 Ethernet PHY driver. More...
 

Detailed Description

LAN8700 Ethernet PHY transceiver.

License

Copyright (C) 2010-2018 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.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
1.9.0

Definition in file lan8700_driver.h.

Macro Definition Documentation

◆ ANAR_100BT4

#define ANAR_100BT4   (1 << 9)

Definition at line 89 of file lan8700_driver.h.

◆ ANAR_100BTX

#define ANAR_100BTX   (1 << 7)

Definition at line 91 of file lan8700_driver.h.

◆ ANAR_100BTX_FD

#define ANAR_100BTX_FD   (1 << 8)

Definition at line 90 of file lan8700_driver.h.

◆ ANAR_10BT

#define ANAR_10BT   (1 << 5)

Definition at line 93 of file lan8700_driver.h.

◆ ANAR_10BT_FD

#define ANAR_10BT_FD   (1 << 6)

Definition at line 92 of file lan8700_driver.h.

◆ ANAR_NP

#define ANAR_NP   (1 << 15)

Definition at line 85 of file lan8700_driver.h.

◆ ANAR_PAUSE0

#define ANAR_PAUSE0   (1 << 10)

Definition at line 88 of file lan8700_driver.h.

◆ ANAR_PAUSE1

#define ANAR_PAUSE1   (1 << 11)

Definition at line 87 of file lan8700_driver.h.

◆ ANAR_RF

#define ANAR_RF   (1 << 13)

Definition at line 86 of file lan8700_driver.h.

◆ ANAR_SELECTOR0

#define ANAR_SELECTOR0   (1 << 0)

Definition at line 98 of file lan8700_driver.h.

◆ ANAR_SELECTOR1

#define ANAR_SELECTOR1   (1 << 1)

Definition at line 97 of file lan8700_driver.h.

◆ ANAR_SELECTOR2

#define ANAR_SELECTOR2   (1 << 2)

Definition at line 96 of file lan8700_driver.h.

◆ ANAR_SELECTOR3

#define ANAR_SELECTOR3   (1 << 3)

Definition at line 95 of file lan8700_driver.h.

◆ ANAR_SELECTOR4

#define ANAR_SELECTOR4   (1 << 4)

Definition at line 94 of file lan8700_driver.h.

◆ ANER_LP_AN_ABLE

#define ANER_LP_AN_ABLE   (1 << 0)

Definition at line 121 of file lan8700_driver.h.

◆ ANER_LP_NP_ABLE

#define ANER_LP_NP_ABLE   (1 << 3)

Definition at line 118 of file lan8700_driver.h.

◆ ANER_NP_ABLE

#define ANER_NP_ABLE   (1 << 2)

Definition at line 119 of file lan8700_driver.h.

◆ ANER_PAGE_RX

#define ANER_PAGE_RX   (1 << 1)

Definition at line 120 of file lan8700_driver.h.

◆ ANER_PDF

#define ANER_PDF   (1 << 4)

Definition at line 117 of file lan8700_driver.h.

◆ ANLPAR_100BT4

#define ANLPAR_100BT4   (1 << 9)

Definition at line 105 of file lan8700_driver.h.

◆ ANLPAR_100BTX

#define ANLPAR_100BTX   (1 << 7)

Definition at line 107 of file lan8700_driver.h.

◆ ANLPAR_100BTX_FD

#define ANLPAR_100BTX_FD   (1 << 8)

Definition at line 106 of file lan8700_driver.h.

◆ ANLPAR_10BT

#define ANLPAR_10BT   (1 << 5)

Definition at line 109 of file lan8700_driver.h.

◆ ANLPAR_10BT_FD

#define ANLPAR_10BT_FD   (1 << 6)

Definition at line 108 of file lan8700_driver.h.

◆ ANLPAR_ACK

#define ANLPAR_ACK   (1 << 14)

Definition at line 102 of file lan8700_driver.h.

◆ ANLPAR_NP

#define ANLPAR_NP   (1 << 15)

Definition at line 101 of file lan8700_driver.h.

◆ ANLPAR_PAUSE

#define ANLPAR_PAUSE   (1 << 10)

Definition at line 104 of file lan8700_driver.h.

◆ ANLPAR_RF

#define ANLPAR_RF   (1 << 13)

Definition at line 103 of file lan8700_driver.h.

◆ ANLPAR_SELECTOR0

#define ANLPAR_SELECTOR0   (1 << 0)

Definition at line 114 of file lan8700_driver.h.

◆ ANLPAR_SELECTOR1

#define ANLPAR_SELECTOR1   (1 << 1)

Definition at line 113 of file lan8700_driver.h.

◆ ANLPAR_SELECTOR2

#define ANLPAR_SELECTOR2   (1 << 2)

Definition at line 112 of file lan8700_driver.h.

◆ ANLPAR_SELECTOR3

#define ANLPAR_SELECTOR3   (1 << 3)

Definition at line 111 of file lan8700_driver.h.

◆ ANLPAR_SELECTOR4

#define ANLPAR_SELECTOR4   (1 << 4)

Definition at line 110 of file lan8700_driver.h.

◆ BMCR_AN_EN

#define BMCR_AN_EN   (1 << 12)

Definition at line 64 of file lan8700_driver.h.

◆ BMCR_COL_TEST

#define BMCR_COL_TEST   (1 << 7)

Definition at line 69 of file lan8700_driver.h.

◆ BMCR_DUPLEX_MODE

#define BMCR_DUPLEX_MODE   (1 << 8)

Definition at line 68 of file lan8700_driver.h.

◆ BMCR_ISOLATE

#define BMCR_ISOLATE   (1 << 10)

Definition at line 66 of file lan8700_driver.h.

◆ BMCR_LOOPBACK

#define BMCR_LOOPBACK   (1 << 14)

Definition at line 62 of file lan8700_driver.h.

◆ BMCR_POWER_DOWN

#define BMCR_POWER_DOWN   (1 << 11)

Definition at line 65 of file lan8700_driver.h.

◆ BMCR_RESET

#define BMCR_RESET   (1 << 15)

Definition at line 61 of file lan8700_driver.h.

◆ BMCR_RESTART_AN

#define BMCR_RESTART_AN   (1 << 9)

Definition at line 67 of file lan8700_driver.h.

◆ BMCR_SPEED_SEL

#define BMCR_SPEED_SEL   (1 << 13)

Definition at line 63 of file lan8700_driver.h.

◆ BMSR_100BT4

#define BMSR_100BT4   (1 << 15)

Definition at line 72 of file lan8700_driver.h.

◆ BMSR_100BTX

#define BMSR_100BTX   (1 << 13)

Definition at line 74 of file lan8700_driver.h.

◆ BMSR_100BTX_FD

#define BMSR_100BTX_FD   (1 << 14)

Definition at line 73 of file lan8700_driver.h.

◆ BMSR_10BT

#define BMSR_10BT   (1 << 11)

Definition at line 76 of file lan8700_driver.h.

◆ BMSR_10BT_FD

#define BMSR_10BT_FD   (1 << 12)

Definition at line 75 of file lan8700_driver.h.

◆ BMSR_AN_ABLE

#define BMSR_AN_ABLE   (1 << 3)

Definition at line 79 of file lan8700_driver.h.

◆ BMSR_AN_COMPLETE

#define BMSR_AN_COMPLETE   (1 << 5)

Definition at line 77 of file lan8700_driver.h.

◆ BMSR_EXTENDED_CAP

#define BMSR_EXTENDED_CAP   (1 << 0)

Definition at line 82 of file lan8700_driver.h.

◆ BMSR_JABBER_DETECT

#define BMSR_JABBER_DETECT   (1 << 1)

Definition at line 81 of file lan8700_driver.h.

◆ BMSR_LINK_STATUS

#define BMSR_LINK_STATUS   (1 << 2)

Definition at line 80 of file lan8700_driver.h.

◆ BMSR_REMOTE_FAULT

#define BMSR_REMOTE_FAULT   (1 << 4)

Definition at line 78 of file lan8700_driver.h.

◆ IMR_AN_COMPLETE

#define IMR_AN_COMPLETE   (1 << 6)

Definition at line 167 of file lan8700_driver.h.

◆ IMR_AN_LP_ACK

#define IMR_AN_LP_ACK   (1 << 3)

Definition at line 170 of file lan8700_driver.h.

◆ IMR_AN_PAGE_RECEIVED

#define IMR_AN_PAGE_RECEIVED   (1 << 1)

Definition at line 172 of file lan8700_driver.h.

◆ IMR_ENERGYON

#define IMR_ENERGYON   (1 << 7)

Definition at line 166 of file lan8700_driver.h.

◆ IMR_LINK_DOWN

#define IMR_LINK_DOWN   (1 << 4)

Definition at line 169 of file lan8700_driver.h.

◆ IMR_PD_FAULT

#define IMR_PD_FAULT   (1 << 2)

Definition at line 171 of file lan8700_driver.h.

◆ IMR_REMOTE_FAULT

#define IMR_REMOTE_FAULT   (1 << 5)

Definition at line 168 of file lan8700_driver.h.

◆ ISR_AN_COMPLETE

#define ISR_AN_COMPLETE   (1 << 6)

Definition at line 158 of file lan8700_driver.h.

◆ ISR_AN_LP_ACK

#define ISR_AN_LP_ACK   (1 << 3)

Definition at line 161 of file lan8700_driver.h.

◆ ISR_AN_PAGE_RECEIVED

#define ISR_AN_PAGE_RECEIVED   (1 << 1)

Definition at line 163 of file lan8700_driver.h.

◆ ISR_ENERGYON

#define ISR_ENERGYON   (1 << 7)

Definition at line 157 of file lan8700_driver.h.

◆ ISR_LINK_DOWN

#define ISR_LINK_DOWN   (1 << 4)

Definition at line 160 of file lan8700_driver.h.

◆ ISR_PD_FAULT

#define ISR_PD_FAULT   (1 << 2)

Definition at line 162 of file lan8700_driver.h.

◆ ISR_REMOTE_FAULT

#define ISR_REMOTE_FAULT   (1 << 5)

Definition at line 159 of file lan8700_driver.h.

◆ LAN8700_PHY_ADDR

#define LAN8700_PHY_ADDR   0

Definition at line 37 of file lan8700_driver.h.

◆ LAN8700_PHY_REG_ANAR

#define LAN8700_PHY_REG_ANAR   0x04

Definition at line 47 of file lan8700_driver.h.

◆ LAN8700_PHY_REG_ANER

#define LAN8700_PHY_REG_ANER   0x06

Definition at line 49 of file lan8700_driver.h.

◆ LAN8700_PHY_REG_ANLPAR

#define LAN8700_PHY_REG_ANLPAR   0x05

Definition at line 48 of file lan8700_driver.h.

◆ LAN8700_PHY_REG_BMCR

#define LAN8700_PHY_REG_BMCR   0x00

Definition at line 43 of file lan8700_driver.h.

◆ LAN8700_PHY_REG_BMSR

#define LAN8700_PHY_REG_BMSR   0x01

Definition at line 44 of file lan8700_driver.h.

◆ LAN8700_PHY_REG_IMR

#define LAN8700_PHY_REG_IMR   0x1E

Definition at line 57 of file lan8700_driver.h.

◆ LAN8700_PHY_REG_ISR

#define LAN8700_PHY_REG_ISR   0x1D

Definition at line 56 of file lan8700_driver.h.

◆ LAN8700_PHY_REG_MCSR

#define LAN8700_PHY_REG_MCSR   0x11

Definition at line 51 of file lan8700_driver.h.

◆ LAN8700_PHY_REG_PHYIDR1

#define LAN8700_PHY_REG_PHYIDR1   0x02

Definition at line 45 of file lan8700_driver.h.

◆ LAN8700_PHY_REG_PHYIDR2

#define LAN8700_PHY_REG_PHYIDR2   0x03

Definition at line 46 of file lan8700_driver.h.

◆ LAN8700_PHY_REG_PSCSR

#define LAN8700_PHY_REG_PSCSR   0x1F

Definition at line 58 of file lan8700_driver.h.

◆ LAN8700_PHY_REG_SCSIR

#define LAN8700_PHY_REG_SCSIR   0x1B

Definition at line 54 of file lan8700_driver.h.

◆ LAN8700_PHY_REG_SECR

#define LAN8700_PHY_REG_SECR   0x1A

Definition at line 53 of file lan8700_driver.h.

◆ LAN8700_PHY_REG_SITCR

#define LAN8700_PHY_REG_SITCR   0x1C

Definition at line 55 of file lan8700_driver.h.

◆ LAN8700_PHY_REG_SMR

#define LAN8700_PHY_REG_SMR   0x12

Definition at line 52 of file lan8700_driver.h.

◆ LAN8700_PHY_REG_SRR

#define LAN8700_PHY_REG_SRR   0x10

Definition at line 50 of file lan8700_driver.h.

◆ MCSR_ALTINT

#define MCSR_ALTINT   (1 << 6)

Definition at line 134 of file lan8700_driver.h.

◆ MCSR_EDPWRDOWN

#define MCSR_EDPWRDOWN   (1 << 13)

Definition at line 130 of file lan8700_driver.h.

◆ MCSR_ENERGYON

#define MCSR_ENERGYON   (1 << 1)

Definition at line 137 of file lan8700_driver.h.

◆ MCSR_FARLOOPBACK

#define MCSR_FARLOOPBACK   (1 << 9)

Definition at line 133 of file lan8700_driver.h.

◆ MCSR_FORCE_GOOD_LINK_STATUS

#define MCSR_FORCE_GOOD_LINK_STATUS   (1 << 2)

Definition at line 136 of file lan8700_driver.h.

◆ MCSR_LOWSQEN

#define MCSR_LOWSQEN   (1 << 11)

Definition at line 131 of file lan8700_driver.h.

◆ MCSR_MDPREBP

#define MCSR_MDPREBP   (1 << 10)

Definition at line 132 of file lan8700_driver.h.

◆ MCSR_PHYADBP

#define MCSR_PHYADBP   (1 << 3)

Definition at line 135 of file lan8700_driver.h.

◆ PSCSR_AUTODONE

#define PSCSR_AUTODONE   (1 << 12)

Definition at line 175 of file lan8700_driver.h.

◆ PSCSR_ENABLE_4B5B

#define PSCSR_ENABLE_4B5B   (1 << 6)

Definition at line 179 of file lan8700_driver.h.

◆ PSCSR_GPO0

#define PSCSR_GPO0   (1 << 7)

Definition at line 178 of file lan8700_driver.h.

◆ PSCSR_GPO1

#define PSCSR_GPO1   (1 << 8)

Definition at line 177 of file lan8700_driver.h.

◆ PSCSR_GPO2

#define PSCSR_GPO2   (1 << 9)

Definition at line 176 of file lan8700_driver.h.

◆ PSCSR_HCDSPEED0

#define PSCSR_HCDSPEED0   (1 << 2)

Definition at line 182 of file lan8700_driver.h.

◆ PSCSR_HCDSPEED1

#define PSCSR_HCDSPEED1   (1 << 3)

Definition at line 181 of file lan8700_driver.h.

◆ PSCSR_HCDSPEED2

#define PSCSR_HCDSPEED2   (1 << 4)

Definition at line 180 of file lan8700_driver.h.

◆ PSCSR_HCDSPEED_100BTX

#define PSCSR_HCDSPEED_100BTX   (2 << 2)

Definition at line 188 of file lan8700_driver.h.

◆ PSCSR_HCDSPEED_100BTX_FD

#define PSCSR_HCDSPEED_100BTX_FD   (6 << 2)

Definition at line 190 of file lan8700_driver.h.

◆ PSCSR_HCDSPEED_10BT

#define PSCSR_HCDSPEED_10BT   (1 << 2)

Definition at line 187 of file lan8700_driver.h.

◆ PSCSR_HCDSPEED_10BT_FD

#define PSCSR_HCDSPEED_10BT_FD   (5 << 2)

Definition at line 189 of file lan8700_driver.h.

◆ PSCSR_HCDSPEED_MASK

#define PSCSR_HCDSPEED_MASK   (7 << 2)

Definition at line 186 of file lan8700_driver.h.

◆ PSCSR_SCRAMBLE_DISABLE

#define PSCSR_SCRAMBLE_DISABLE   (1 << 0)

Definition at line 183 of file lan8700_driver.h.

◆ SCSIR_AMDIXCTRL

#define SCSIR_AMDIXCTRL   (1 << 15)

Definition at line 151 of file lan8700_driver.h.

◆ SCSIR_CH_SELECT

#define SCSIR_CH_SELECT   (1 << 13)

Definition at line 152 of file lan8700_driver.h.

◆ SCSIR_SQEOFF

#define SCSIR_SQEOFF   (1 << 11)

Definition at line 153 of file lan8700_driver.h.

◆ SCSIR_XPOL

#define SCSIR_XPOL   (1 << 4)

Definition at line 154 of file lan8700_driver.h.

◆ SMR_MIIMODE

#define SMR_MIIMODE   (1 << 14)

Definition at line 140 of file lan8700_driver.h.

◆ SMR_MODE0

#define SMR_MODE0   (1 << 5)

Definition at line 143 of file lan8700_driver.h.

◆ SMR_MODE1

#define SMR_MODE1   (1 << 6)

Definition at line 142 of file lan8700_driver.h.

◆ SMR_MODE2

#define SMR_MODE2   (1 << 7)

Definition at line 141 of file lan8700_driver.h.

◆ SMR_PHYAD0

#define SMR_PHYAD0   (1 << 0)

Definition at line 148 of file lan8700_driver.h.

◆ SMR_PHYAD1

#define SMR_PHYAD1   (1 << 1)

Definition at line 147 of file lan8700_driver.h.

◆ SMR_PHYAD2

#define SMR_PHYAD2   (1 << 2)

Definition at line 146 of file lan8700_driver.h.

◆ SMR_PHYAD3

#define SMR_PHYAD3   (1 << 3)

Definition at line 145 of file lan8700_driver.h.

◆ SMR_PHYAD4

#define SMR_PHYAD4   (1 << 4)

Definition at line 144 of file lan8700_driver.h.

◆ SRR_SILICON_REVISON0

#define SRR_SILICON_REVISON0   (1 << 6)

Definition at line 127 of file lan8700_driver.h.

◆ SRR_SILICON_REVISON1

#define SRR_SILICON_REVISON1   (1 << 7)

Definition at line 126 of file lan8700_driver.h.

◆ SRR_SILICON_REVISON2

#define SRR_SILICON_REVISON2   (1 << 8)

Definition at line 125 of file lan8700_driver.h.

◆ SRR_SILICON_REVISON3

#define SRR_SILICON_REVISON3   (1 << 9)

Definition at line 124 of file lan8700_driver.h.

Function Documentation

◆ lan8700DisableIrq()

void lan8700DisableIrq ( NetInterface interface)

Disable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 144 of file lan8700_driver.c.

◆ lan8700DumpPhyReg()

void lan8700DumpPhyReg ( NetInterface interface)

Dump PHY registers for debugging purpose.

Parameters
[in]interfaceUnderlying network interface

Definition at line 275 of file lan8700_driver.c.

◆ lan8700EnableIrq()

void lan8700EnableIrq ( NetInterface interface)

Enable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 131 of file lan8700_driver.c.

◆ lan8700EventHandler()

void lan8700EventHandler ( NetInterface interface)

LAN8700 event handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 157 of file lan8700_driver.c.

◆ lan8700Init()

error_t lan8700Init ( NetInterface interface)

LAN8700 PHY transceiver initialization.

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 58 of file lan8700_driver.c.

◆ lan8700ReadPhyReg()

uint16_t lan8700ReadPhyReg ( NetInterface interface,
uint8_t  address 
)

Read PHY register.

Parameters
[in]interfaceUnderlying network interface
[in]addressPHY register address
Returns
Register value

Definition at line 255 of file lan8700_driver.c.

◆ lan8700Tick()

void lan8700Tick ( NetInterface interface)

LAN8700 timer handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 93 of file lan8700_driver.c.

◆ lan8700WritePhyReg()

void lan8700WritePhyReg ( NetInterface interface,
uint8_t  address,
uint16_t  data 
)

Write PHY register.

Parameters
[in]interfaceUnderlying network interface
[in]addressPHY register address
[in]dataRegister value

Definition at line 233 of file lan8700_driver.c.

Variable Documentation

◆ lan8700PhyDriver

const PhyDriver lan8700PhyDriver

LAN8700 Ethernet PHY driver.

Definition at line 42 of file lan8700_driver.c.