ip101_driver.h File Reference

IC+ IP101 Ethernet PHY transceiver. More...

#include "core/nic.h"

Go to the source code of this file.

Macros

#define IP101_PHY_ADDR   1
 
#define IP101_PHY_REG_BMCR   0x00
 
#define IP101_PHY_REG_BMSR   0x01
 
#define IP101_PHY_REG_PHYIDR1   0x02
 
#define IP101_PHY_REG_PHYIDR2   0x03
 
#define IP101_PHY_REG_ANAR   0x04
 
#define IP101_PHY_REG_ANLPAR   0x05
 
#define IP101_PHY_REG_ANER   0x06
 
#define IP101_PHY_REG_ANNPTR   0x07
 
#define IP101_PHY_REG_LPNPAR   0x08
 
#define IP101_PHY_REG_MMDACR   0x0D
 
#define IP101_PHY_REG_MMDAADR   0x0E
 
#define IP101_PHY_REG_PHYSCR   0x10
 
#define IP101_PHY_REG_ICSR   0x11
 
#define IP101_PHY_REG_PHYSMR   0x12
 
#define IP101_PHY_REG_IOSCR   0x1D
 
#define IP101_PHY_REG_PHYMCSSR   0x1E
 
#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_NO_PREAMBLE   (1 << 6)
 
#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_ASYMMETRIC_PAUSE   (1 << 11)
 
#define ANAR_PAUSE   (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_ASYMMETRIC_PAUSE   (1 << 11)
 
#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_MLF   (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 ANNPTR_NP   (1 << 15)
 
#define ANNPTR_MP   (1 << 13)
 
#define ANNPTR_ACK2   (1 << 12)
 
#define ANNPTR_TOGGLE   (1 << 11)
 
#define ANNPTR_CODE10   (1 << 10)
 
#define ANNPTR_CODE9   (1 << 9)
 
#define ANNPTR_CODE8   (1 << 8)
 
#define ANNPTR_CODE7   (1 << 7)
 
#define ANNPTR_CODE6   (1 << 6)
 
#define ANNPTR_CODE5   (1 << 5)
 
#define ANNPTR_CODE4   (1 << 4)
 
#define ANNPTR_CODE3   (1 << 3)
 
#define ANNPTR_CODE2   (1 << 2)
 
#define ANNPTR_CODE1   (1 << 1)
 
#define ANNPTR_CODE0   (1 << 0)
 
#define LPNPAR_NEXT_PAGE   (1 << 15)
 
#define LPNPAR_MSG_PAGE   (1 << 13)
 
#define LPNPAR_ACK2   (1 << 12)
 
#define LPNPAR_TOGGLE   (1 << 11)
 
#define LPNPAR_MESSAGE10   (1 << 10)
 
#define LPNPAR_MESSAGE9   (1 << 9)
 
#define LPNPAR_MESSAGE8   (1 << 8)
 
#define LPNPAR_MESSAGE7   (1 << 7)
 
#define LPNPAR_MESSAGE6   (1 << 6)
 
#define LPNPAR_MESSAGE5   (1 << 5)
 
#define LPNPAR_MESSAGE4   (1 << 4)
 
#define LPNPAR_MESSAGE3   (1 << 3)
 
#define LPNPAR_MESSAGE2   (1 << 2)
 
#define LPNPAR_MESSAGE1   (1 << 1)
 
#define LPNPAR_MESSAGE0   (1 << 0)
 
#define MMDACR_FUNCTION1   (1 << 15)
 
#define MMDACR_FUNCTION0   (1 << 14)
 
#define MMDACR_DEVAD4   (1 << 4)
 
#define MMDACR_DEVAD3   (1 << 3)
 
#define MMDACR_DEVAD2   (1 << 2)
 
#define MMDACR_DEVAD1   (1 << 1)
 
#define MMDACR_DEVAD0   (1 << 0)
 
#define PHYSCR_RMII_V10   (1 << 13)
 
#define PHYSCR_RMII_V12   (1 << 12)
 
#define PHYSCR_AUTO_MDIX_DIS   (1 << 11)
 
#define PHYSCR_JABBER_ENABLE   (1 << 9)
 
#define PHYSCR_FEF_DISABLE   (1 << 8)
 
#define PHYSCR_NWAY_PSAVE_DIS   (1 << 7)
 
#define PHYSCR_BYPASS_DSP_RESET   (1 << 5)
 
#define PHYSCR_REPEATER_MODE   (1 << 2)
 
#define PHYSCR_LDPS_ENABLE   (1 << 1)
 
#define PHYSCR_ANALOG_OFF   (1 << 0)
 
#define ICSR_INTR_EN   (1 << 15)
 
#define ICSR_RESERVED2   (1 << 14)
 
#define ICSR_RESERVED1   (1 << 13)
 
#define ICSR_RESERVED0   (1 << 12)
 
#define ICSR_ALL_MASK   (1 << 11)
 
#define ICSR_SPEED_MASK   (1 << 10)
 
#define ICSR_DUPLEX_MASK   (1 << 9)
 
#define ICSR_LINK_MASK   (1 << 8)
 
#define ICSR_INTR_STATUS   (1 << 3)
 
#define ICSR_SPEED_CHANGE   (1 << 2)
 
#define ICSR_DUPLEX_CHANGE   (1 << 1)
 
#define ICSR_LINK_CHANGE   (1 << 0)
 
#define PHYSMR_SPEED   (1 << 14)
 
#define PHYSMR_DUPLEX   (1 << 13)
 
#define PHYSMR_AN_COMPLETE   (1 << 11)
 
#define PHYSMR_LINK_UP   (1 << 10)
 
#define PHYSMR_MDIX   (1 << 9)
 
#define PHYSMR_POLARITY   (1 << 8)
 
#define PHYSMR_JABBER   (1 << 7)
 
#define PHYSMR_AN_ARBIT_STATE3   (1 << 3)
 
#define PHYSMR_AN_ARBIT_STATE2   (1 << 2)
 
#define PHYSMR_AN_ARBIT_STATE1   (1 << 1)
 
#define PHYSMR_AN_ARBIT_STATE0   (1 << 0)
 
#define IOSCR_RMII_WITH_ER   (1 << 7)
 
#define IOSCR_SEL_INTR32   (1 << 2)
 
#define PHYMCSSR_LINK_UP   (1 << 8)
 
#define PHYMCSSR_FORCE_MDIX   (1 << 3)
 
#define PHYMCSSR_OP_MODE2   (1 << 2)
 
#define PHYMCSSR_OP_MODE1   (1 << 1)
 
#define PHYMCSSR_OP_MODE0   (1 << 0)
 
#define PHYMCSSR_OP_MODE_MASK   (7 << 0)
 
#define PHYMCSSR_OP_MODE_LINK_OFF   (0 << 0)
 
#define PHYMCSSR_OP_MODE_10M_HD   (1 << 0)
 
#define PHYMCSSR_OP_MODE_100M_HD   (2 << 0)
 
#define PHYMCSSR_OP_MODE_10M_FD   (5 << 0)
 
#define PHYMCSSR_OP_MODE_100_FD   (6 << 0)
 

Functions

error_t ip101Init (NetInterface *interface)
 IP101 PHY transceiver initialization. More...
 
void ip101Tick (NetInterface *interface)
 IP101 timer handler. More...
 
void ip101EnableIrq (NetInterface *interface)
 Enable interrupts. More...
 
void ip101DisableIrq (NetInterface *interface)
 Disable interrupts. More...
 
void ip101EventHandler (NetInterface *interface)
 IP101 event handler. More...
 
void ip101WritePhyReg (NetInterface *interface, uint8_t address, uint16_t data)
 Write PHY register. More...
 
uint16_t ip101ReadPhyReg (NetInterface *interface, uint8_t address)
 Read PHY register. More...
 
void ip101DumpPhyReg (NetInterface *interface)
 Dump PHY registers for debugging purpose. More...
 

Variables

const PhyDriver ip101PhyDriver
 IP101 Ethernet PHY driver. More...
 

Detailed Description

IC+ IP101 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 ip101_driver.h.

Macro Definition Documentation

◆ ANAR_100BT4

#define ANAR_100BT4   (1 << 9)

Definition at line 90 of file ip101_driver.h.

◆ ANAR_100BTX

#define ANAR_100BTX   (1 << 7)

Definition at line 92 of file ip101_driver.h.

◆ ANAR_100BTX_FD

#define ANAR_100BTX_FD   (1 << 8)

Definition at line 91 of file ip101_driver.h.

◆ ANAR_10BT

#define ANAR_10BT   (1 << 5)

Definition at line 94 of file ip101_driver.h.

◆ ANAR_10BT_FD

#define ANAR_10BT_FD   (1 << 6)

Definition at line 93 of file ip101_driver.h.

◆ ANAR_ASYMMETRIC_PAUSE

#define ANAR_ASYMMETRIC_PAUSE   (1 << 11)

Definition at line 88 of file ip101_driver.h.

◆ ANAR_NP

#define ANAR_NP   (1 << 15)

Definition at line 86 of file ip101_driver.h.

◆ ANAR_PAUSE

#define ANAR_PAUSE   (1 << 10)

Definition at line 89 of file ip101_driver.h.

◆ ANAR_RF

#define ANAR_RF   (1 << 13)

Definition at line 87 of file ip101_driver.h.

◆ ANAR_SELECTOR0

#define ANAR_SELECTOR0   (1 << 0)

Definition at line 99 of file ip101_driver.h.

◆ ANAR_SELECTOR1

#define ANAR_SELECTOR1   (1 << 1)

Definition at line 98 of file ip101_driver.h.

◆ ANAR_SELECTOR2

#define ANAR_SELECTOR2   (1 << 2)

Definition at line 97 of file ip101_driver.h.

◆ ANAR_SELECTOR3

#define ANAR_SELECTOR3   (1 << 3)

Definition at line 96 of file ip101_driver.h.

◆ ANAR_SELECTOR4

#define ANAR_SELECTOR4   (1 << 4)

Definition at line 95 of file ip101_driver.h.

◆ ANER_LP_AN_ABLE

#define ANER_LP_AN_ABLE   (1 << 0)

Definition at line 123 of file ip101_driver.h.

◆ ANER_LP_NP_ABLE

#define ANER_LP_NP_ABLE   (1 << 3)

Definition at line 120 of file ip101_driver.h.

◆ ANER_MLF

#define ANER_MLF   (1 << 4)

Definition at line 119 of file ip101_driver.h.

◆ ANER_NP_ABLE

#define ANER_NP_ABLE   (1 << 2)

Definition at line 121 of file ip101_driver.h.

◆ ANER_PAGE_RX

#define ANER_PAGE_RX   (1 << 1)

Definition at line 122 of file ip101_driver.h.

◆ ANLPAR_100BT4

#define ANLPAR_100BT4   (1 << 9)

Definition at line 107 of file ip101_driver.h.

◆ ANLPAR_100BTX

#define ANLPAR_100BTX   (1 << 7)

Definition at line 109 of file ip101_driver.h.

◆ ANLPAR_100BTX_FD

#define ANLPAR_100BTX_FD   (1 << 8)

Definition at line 108 of file ip101_driver.h.

◆ ANLPAR_10BT

#define ANLPAR_10BT   (1 << 5)

Definition at line 111 of file ip101_driver.h.

◆ ANLPAR_10BT_FD

#define ANLPAR_10BT_FD   (1 << 6)

Definition at line 110 of file ip101_driver.h.

◆ ANLPAR_ACK

#define ANLPAR_ACK   (1 << 14)

Definition at line 103 of file ip101_driver.h.

◆ ANLPAR_ASYMMETRIC_PAUSE

#define ANLPAR_ASYMMETRIC_PAUSE   (1 << 11)

Definition at line 105 of file ip101_driver.h.

◆ ANLPAR_NP

#define ANLPAR_NP   (1 << 15)

Definition at line 102 of file ip101_driver.h.

◆ ANLPAR_PAUSE

#define ANLPAR_PAUSE   (1 << 10)

Definition at line 106 of file ip101_driver.h.

◆ ANLPAR_RF

#define ANLPAR_RF   (1 << 13)

Definition at line 104 of file ip101_driver.h.

◆ ANLPAR_SELECTOR0

#define ANLPAR_SELECTOR0   (1 << 0)

Definition at line 116 of file ip101_driver.h.

◆ ANLPAR_SELECTOR1

#define ANLPAR_SELECTOR1   (1 << 1)

Definition at line 115 of file ip101_driver.h.

◆ ANLPAR_SELECTOR2

#define ANLPAR_SELECTOR2   (1 << 2)

Definition at line 114 of file ip101_driver.h.

◆ ANLPAR_SELECTOR3

#define ANLPAR_SELECTOR3   (1 << 3)

Definition at line 113 of file ip101_driver.h.

◆ ANLPAR_SELECTOR4

#define ANLPAR_SELECTOR4   (1 << 4)

Definition at line 112 of file ip101_driver.h.

◆ ANNPTR_ACK2

#define ANNPTR_ACK2   (1 << 12)

Definition at line 128 of file ip101_driver.h.

◆ ANNPTR_CODE0

#define ANNPTR_CODE0   (1 << 0)

Definition at line 140 of file ip101_driver.h.

◆ ANNPTR_CODE1

#define ANNPTR_CODE1   (1 << 1)

Definition at line 139 of file ip101_driver.h.

◆ ANNPTR_CODE10

#define ANNPTR_CODE10   (1 << 10)

Definition at line 130 of file ip101_driver.h.

◆ ANNPTR_CODE2

#define ANNPTR_CODE2   (1 << 2)

Definition at line 138 of file ip101_driver.h.

◆ ANNPTR_CODE3

#define ANNPTR_CODE3   (1 << 3)

Definition at line 137 of file ip101_driver.h.

◆ ANNPTR_CODE4

#define ANNPTR_CODE4   (1 << 4)

Definition at line 136 of file ip101_driver.h.

◆ ANNPTR_CODE5

#define ANNPTR_CODE5   (1 << 5)

Definition at line 135 of file ip101_driver.h.

◆ ANNPTR_CODE6

#define ANNPTR_CODE6   (1 << 6)

Definition at line 134 of file ip101_driver.h.

◆ ANNPTR_CODE7

#define ANNPTR_CODE7   (1 << 7)

Definition at line 133 of file ip101_driver.h.

◆ ANNPTR_CODE8

#define ANNPTR_CODE8   (1 << 8)

Definition at line 132 of file ip101_driver.h.

◆ ANNPTR_CODE9

#define ANNPTR_CODE9   (1 << 9)

Definition at line 131 of file ip101_driver.h.

◆ ANNPTR_MP

#define ANNPTR_MP   (1 << 13)

Definition at line 127 of file ip101_driver.h.

◆ ANNPTR_NP

#define ANNPTR_NP   (1 << 15)

Definition at line 126 of file ip101_driver.h.

◆ ANNPTR_TOGGLE

#define ANNPTR_TOGGLE   (1 << 11)

Definition at line 129 of file ip101_driver.h.

◆ BMCR_AN_EN

#define BMCR_AN_EN   (1 << 12)

Definition at line 64 of file ip101_driver.h.

◆ BMCR_COL_TEST

#define BMCR_COL_TEST   (1 << 7)

Definition at line 69 of file ip101_driver.h.

◆ BMCR_DUPLEX_MODE

#define BMCR_DUPLEX_MODE   (1 << 8)

Definition at line 68 of file ip101_driver.h.

◆ BMCR_ISOLATE

#define BMCR_ISOLATE   (1 << 10)

Definition at line 66 of file ip101_driver.h.

◆ BMCR_LOOPBACK

#define BMCR_LOOPBACK   (1 << 14)

Definition at line 62 of file ip101_driver.h.

◆ BMCR_POWER_DOWN

#define BMCR_POWER_DOWN   (1 << 11)

Definition at line 65 of file ip101_driver.h.

◆ BMCR_RESET

#define BMCR_RESET   (1 << 15)

Definition at line 61 of file ip101_driver.h.

◆ BMCR_RESTART_AN

#define BMCR_RESTART_AN   (1 << 9)

Definition at line 67 of file ip101_driver.h.

◆ BMCR_SPEED_SEL

#define BMCR_SPEED_SEL   (1 << 13)

Definition at line 63 of file ip101_driver.h.

◆ BMSR_100BT4

#define BMSR_100BT4   (1 << 15)

Definition at line 72 of file ip101_driver.h.

◆ BMSR_100BTX

#define BMSR_100BTX   (1 << 13)

Definition at line 74 of file ip101_driver.h.

◆ BMSR_100BTX_FD

#define BMSR_100BTX_FD   (1 << 14)

Definition at line 73 of file ip101_driver.h.

◆ BMSR_10BT

#define BMSR_10BT   (1 << 11)

Definition at line 76 of file ip101_driver.h.

◆ BMSR_10BT_FD

#define BMSR_10BT_FD   (1 << 12)

Definition at line 75 of file ip101_driver.h.

◆ BMSR_AN_ABLE

#define BMSR_AN_ABLE   (1 << 3)

Definition at line 80 of file ip101_driver.h.

◆ BMSR_AN_COMPLETE

#define BMSR_AN_COMPLETE   (1 << 5)

Definition at line 78 of file ip101_driver.h.

◆ BMSR_EXTENDED_CAP

#define BMSR_EXTENDED_CAP   (1 << 0)

Definition at line 83 of file ip101_driver.h.

◆ BMSR_JABBER_DETECT

#define BMSR_JABBER_DETECT   (1 << 1)

Definition at line 82 of file ip101_driver.h.

◆ BMSR_LINK_STATUS

#define BMSR_LINK_STATUS   (1 << 2)

Definition at line 81 of file ip101_driver.h.

◆ BMSR_NO_PREAMBLE

#define BMSR_NO_PREAMBLE   (1 << 6)

Definition at line 77 of file ip101_driver.h.

◆ BMSR_REMOTE_FAULT

#define BMSR_REMOTE_FAULT   (1 << 4)

Definition at line 79 of file ip101_driver.h.

◆ ICSR_ALL_MASK

#define ICSR_ALL_MASK   (1 << 11)

Definition at line 185 of file ip101_driver.h.

◆ ICSR_DUPLEX_CHANGE

#define ICSR_DUPLEX_CHANGE   (1 << 1)

Definition at line 191 of file ip101_driver.h.

◆ ICSR_DUPLEX_MASK

#define ICSR_DUPLEX_MASK   (1 << 9)

Definition at line 187 of file ip101_driver.h.

◆ ICSR_INTR_EN

#define ICSR_INTR_EN   (1 << 15)

Definition at line 181 of file ip101_driver.h.

◆ ICSR_INTR_STATUS

#define ICSR_INTR_STATUS   (1 << 3)

Definition at line 189 of file ip101_driver.h.

◆ ICSR_LINK_CHANGE

#define ICSR_LINK_CHANGE   (1 << 0)

Definition at line 192 of file ip101_driver.h.

◆ ICSR_LINK_MASK

#define ICSR_LINK_MASK   (1 << 8)

Definition at line 188 of file ip101_driver.h.

◆ ICSR_RESERVED0

#define ICSR_RESERVED0   (1 << 12)

Definition at line 184 of file ip101_driver.h.

◆ ICSR_RESERVED1

#define ICSR_RESERVED1   (1 << 13)

Definition at line 183 of file ip101_driver.h.

◆ ICSR_RESERVED2

#define ICSR_RESERVED2   (1 << 14)

Definition at line 182 of file ip101_driver.h.

◆ ICSR_SPEED_CHANGE

#define ICSR_SPEED_CHANGE   (1 << 2)

Definition at line 190 of file ip101_driver.h.

◆ ICSR_SPEED_MASK

#define ICSR_SPEED_MASK   (1 << 10)

Definition at line 186 of file ip101_driver.h.

◆ IOSCR_RMII_WITH_ER

#define IOSCR_RMII_WITH_ER   (1 << 7)

Definition at line 208 of file ip101_driver.h.

◆ IOSCR_SEL_INTR32

#define IOSCR_SEL_INTR32   (1 << 2)

Definition at line 209 of file ip101_driver.h.

◆ IP101_PHY_ADDR

#define IP101_PHY_ADDR   1

Definition at line 37 of file ip101_driver.h.

◆ IP101_PHY_REG_ANAR

#define IP101_PHY_REG_ANAR   0x04

Definition at line 47 of file ip101_driver.h.

◆ IP101_PHY_REG_ANER

#define IP101_PHY_REG_ANER   0x06

Definition at line 49 of file ip101_driver.h.

◆ IP101_PHY_REG_ANLPAR

#define IP101_PHY_REG_ANLPAR   0x05

Definition at line 48 of file ip101_driver.h.

◆ IP101_PHY_REG_ANNPTR

#define IP101_PHY_REG_ANNPTR   0x07

Definition at line 50 of file ip101_driver.h.

◆ IP101_PHY_REG_BMCR

#define IP101_PHY_REG_BMCR   0x00

Definition at line 43 of file ip101_driver.h.

◆ IP101_PHY_REG_BMSR

#define IP101_PHY_REG_BMSR   0x01

Definition at line 44 of file ip101_driver.h.

◆ IP101_PHY_REG_ICSR

#define IP101_PHY_REG_ICSR   0x11

Definition at line 55 of file ip101_driver.h.

◆ IP101_PHY_REG_IOSCR

#define IP101_PHY_REG_IOSCR   0x1D

Definition at line 57 of file ip101_driver.h.

◆ IP101_PHY_REG_LPNPAR

#define IP101_PHY_REG_LPNPAR   0x08

Definition at line 51 of file ip101_driver.h.

◆ IP101_PHY_REG_MMDAADR

#define IP101_PHY_REG_MMDAADR   0x0E

Definition at line 53 of file ip101_driver.h.

◆ IP101_PHY_REG_MMDACR

#define IP101_PHY_REG_MMDACR   0x0D

Definition at line 52 of file ip101_driver.h.

◆ IP101_PHY_REG_PHYIDR1

#define IP101_PHY_REG_PHYIDR1   0x02

Definition at line 45 of file ip101_driver.h.

◆ IP101_PHY_REG_PHYIDR2

#define IP101_PHY_REG_PHYIDR2   0x03

Definition at line 46 of file ip101_driver.h.

◆ IP101_PHY_REG_PHYMCSSR

#define IP101_PHY_REG_PHYMCSSR   0x1E

Definition at line 58 of file ip101_driver.h.

◆ IP101_PHY_REG_PHYSCR

#define IP101_PHY_REG_PHYSCR   0x10

Definition at line 54 of file ip101_driver.h.

◆ IP101_PHY_REG_PHYSMR

#define IP101_PHY_REG_PHYSMR   0x12

Definition at line 56 of file ip101_driver.h.

◆ LPNPAR_ACK2

#define LPNPAR_ACK2   (1 << 12)

Definition at line 145 of file ip101_driver.h.

◆ LPNPAR_MESSAGE0

#define LPNPAR_MESSAGE0   (1 << 0)

Definition at line 157 of file ip101_driver.h.

◆ LPNPAR_MESSAGE1

#define LPNPAR_MESSAGE1   (1 << 1)

Definition at line 156 of file ip101_driver.h.

◆ LPNPAR_MESSAGE10

#define LPNPAR_MESSAGE10   (1 << 10)

Definition at line 147 of file ip101_driver.h.

◆ LPNPAR_MESSAGE2

#define LPNPAR_MESSAGE2   (1 << 2)

Definition at line 155 of file ip101_driver.h.

◆ LPNPAR_MESSAGE3

#define LPNPAR_MESSAGE3   (1 << 3)

Definition at line 154 of file ip101_driver.h.

◆ LPNPAR_MESSAGE4

#define LPNPAR_MESSAGE4   (1 << 4)

Definition at line 153 of file ip101_driver.h.

◆ LPNPAR_MESSAGE5

#define LPNPAR_MESSAGE5   (1 << 5)

Definition at line 152 of file ip101_driver.h.

◆ LPNPAR_MESSAGE6

#define LPNPAR_MESSAGE6   (1 << 6)

Definition at line 151 of file ip101_driver.h.

◆ LPNPAR_MESSAGE7

#define LPNPAR_MESSAGE7   (1 << 7)

Definition at line 150 of file ip101_driver.h.

◆ LPNPAR_MESSAGE8

#define LPNPAR_MESSAGE8   (1 << 8)

Definition at line 149 of file ip101_driver.h.

◆ LPNPAR_MESSAGE9

#define LPNPAR_MESSAGE9   (1 << 9)

Definition at line 148 of file ip101_driver.h.

◆ LPNPAR_MSG_PAGE

#define LPNPAR_MSG_PAGE   (1 << 13)

Definition at line 144 of file ip101_driver.h.

◆ LPNPAR_NEXT_PAGE

#define LPNPAR_NEXT_PAGE   (1 << 15)

Definition at line 143 of file ip101_driver.h.

◆ LPNPAR_TOGGLE

#define LPNPAR_TOGGLE   (1 << 11)

Definition at line 146 of file ip101_driver.h.

◆ MMDACR_DEVAD0

#define MMDACR_DEVAD0   (1 << 0)

Definition at line 166 of file ip101_driver.h.

◆ MMDACR_DEVAD1

#define MMDACR_DEVAD1   (1 << 1)

Definition at line 165 of file ip101_driver.h.

◆ MMDACR_DEVAD2

#define MMDACR_DEVAD2   (1 << 2)

Definition at line 164 of file ip101_driver.h.

◆ MMDACR_DEVAD3

#define MMDACR_DEVAD3   (1 << 3)

Definition at line 163 of file ip101_driver.h.

◆ MMDACR_DEVAD4

#define MMDACR_DEVAD4   (1 << 4)

Definition at line 162 of file ip101_driver.h.

◆ MMDACR_FUNCTION0

#define MMDACR_FUNCTION0   (1 << 14)

Definition at line 161 of file ip101_driver.h.

◆ MMDACR_FUNCTION1

#define MMDACR_FUNCTION1   (1 << 15)

Definition at line 160 of file ip101_driver.h.

◆ PHYMCSSR_FORCE_MDIX

#define PHYMCSSR_FORCE_MDIX   (1 << 3)

Definition at line 213 of file ip101_driver.h.

◆ PHYMCSSR_LINK_UP

#define PHYMCSSR_LINK_UP   (1 << 8)

Definition at line 212 of file ip101_driver.h.

◆ PHYMCSSR_OP_MODE0

#define PHYMCSSR_OP_MODE0   (1 << 0)

Definition at line 216 of file ip101_driver.h.

◆ PHYMCSSR_OP_MODE1

#define PHYMCSSR_OP_MODE1   (1 << 1)

Definition at line 215 of file ip101_driver.h.

◆ PHYMCSSR_OP_MODE2

#define PHYMCSSR_OP_MODE2   (1 << 2)

Definition at line 214 of file ip101_driver.h.

◆ PHYMCSSR_OP_MODE_100_FD

#define PHYMCSSR_OP_MODE_100_FD   (6 << 0)

Definition at line 224 of file ip101_driver.h.

◆ PHYMCSSR_OP_MODE_100M_HD

#define PHYMCSSR_OP_MODE_100M_HD   (2 << 0)

Definition at line 222 of file ip101_driver.h.

◆ PHYMCSSR_OP_MODE_10M_FD

#define PHYMCSSR_OP_MODE_10M_FD   (5 << 0)

Definition at line 223 of file ip101_driver.h.

◆ PHYMCSSR_OP_MODE_10M_HD

#define PHYMCSSR_OP_MODE_10M_HD   (1 << 0)

Definition at line 221 of file ip101_driver.h.

◆ PHYMCSSR_OP_MODE_LINK_OFF

#define PHYMCSSR_OP_MODE_LINK_OFF   (0 << 0)

Definition at line 220 of file ip101_driver.h.

◆ PHYMCSSR_OP_MODE_MASK

#define PHYMCSSR_OP_MODE_MASK   (7 << 0)

Definition at line 219 of file ip101_driver.h.

◆ PHYSCR_ANALOG_OFF

#define PHYSCR_ANALOG_OFF   (1 << 0)

Definition at line 178 of file ip101_driver.h.

◆ PHYSCR_AUTO_MDIX_DIS

#define PHYSCR_AUTO_MDIX_DIS   (1 << 11)

Definition at line 171 of file ip101_driver.h.

◆ PHYSCR_BYPASS_DSP_RESET

#define PHYSCR_BYPASS_DSP_RESET   (1 << 5)

Definition at line 175 of file ip101_driver.h.

◆ PHYSCR_FEF_DISABLE

#define PHYSCR_FEF_DISABLE   (1 << 8)

Definition at line 173 of file ip101_driver.h.

◆ PHYSCR_JABBER_ENABLE

#define PHYSCR_JABBER_ENABLE   (1 << 9)

Definition at line 172 of file ip101_driver.h.

◆ PHYSCR_LDPS_ENABLE

#define PHYSCR_LDPS_ENABLE   (1 << 1)

Definition at line 177 of file ip101_driver.h.

◆ PHYSCR_NWAY_PSAVE_DIS

#define PHYSCR_NWAY_PSAVE_DIS   (1 << 7)

Definition at line 174 of file ip101_driver.h.

◆ PHYSCR_REPEATER_MODE

#define PHYSCR_REPEATER_MODE   (1 << 2)

Definition at line 176 of file ip101_driver.h.

◆ PHYSCR_RMII_V10

#define PHYSCR_RMII_V10   (1 << 13)

Definition at line 169 of file ip101_driver.h.

◆ PHYSCR_RMII_V12

#define PHYSCR_RMII_V12   (1 << 12)

Definition at line 170 of file ip101_driver.h.

◆ PHYSMR_AN_ARBIT_STATE0

#define PHYSMR_AN_ARBIT_STATE0   (1 << 0)

Definition at line 205 of file ip101_driver.h.

◆ PHYSMR_AN_ARBIT_STATE1

#define PHYSMR_AN_ARBIT_STATE1   (1 << 1)

Definition at line 204 of file ip101_driver.h.

◆ PHYSMR_AN_ARBIT_STATE2

#define PHYSMR_AN_ARBIT_STATE2   (1 << 2)

Definition at line 203 of file ip101_driver.h.

◆ PHYSMR_AN_ARBIT_STATE3

#define PHYSMR_AN_ARBIT_STATE3   (1 << 3)

Definition at line 202 of file ip101_driver.h.

◆ PHYSMR_AN_COMPLETE

#define PHYSMR_AN_COMPLETE   (1 << 11)

Definition at line 197 of file ip101_driver.h.

◆ PHYSMR_DUPLEX

#define PHYSMR_DUPLEX   (1 << 13)

Definition at line 196 of file ip101_driver.h.

◆ PHYSMR_JABBER

#define PHYSMR_JABBER   (1 << 7)

Definition at line 201 of file ip101_driver.h.

◆ PHYSMR_LINK_UP

#define PHYSMR_LINK_UP   (1 << 10)

Definition at line 198 of file ip101_driver.h.

◆ PHYSMR_MDIX

#define PHYSMR_MDIX   (1 << 9)

Definition at line 199 of file ip101_driver.h.

◆ PHYSMR_POLARITY

#define PHYSMR_POLARITY   (1 << 8)

Definition at line 200 of file ip101_driver.h.

◆ PHYSMR_SPEED

#define PHYSMR_SPEED   (1 << 14)

Definition at line 195 of file ip101_driver.h.

Function Documentation

◆ ip101DisableIrq()

void ip101DisableIrq ( NetInterface interface)

Disable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 130 of file ip101_driver.c.

◆ ip101DumpPhyReg()

void ip101DumpPhyReg ( NetInterface interface)

Dump PHY registers for debugging purpose.

Parameters
[in]interfaceUnderlying network interface

Definition at line 246 of file ip101_driver.c.

◆ ip101EnableIrq()

void ip101EnableIrq ( NetInterface interface)

Enable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 120 of file ip101_driver.c.

◆ ip101EventHandler()

void ip101EventHandler ( NetInterface interface)

IP101 event handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 140 of file ip101_driver.c.

◆ ip101Init()

error_t ip101Init ( NetInterface interface)

IP101 PHY transceiver initialization.

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 58 of file ip101_driver.c.

◆ ip101ReadPhyReg()

uint16_t ip101ReadPhyReg ( NetInterface interface,
uint8_t  address 
)

Read PHY register.

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

Definition at line 226 of file ip101_driver.c.

◆ ip101Tick()

void ip101Tick ( NetInterface interface)

IP101 timer handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 86 of file ip101_driver.c.

◆ ip101WritePhyReg()

void ip101WritePhyReg ( 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 204 of file ip101_driver.c.

Variable Documentation

◆ ip101PhyDriver

const PhyDriver ip101PhyDriver

IP101 Ethernet PHY driver.

Definition at line 42 of file ip101_driver.c.