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_BMCR   0x00
 
#define IP101_BMSR   0x01
 
#define IP101_PHYID1   0x02
 
#define IP101_PHYID2   0x03
 
#define IP101_ANAR   0x04
 
#define IP101_ANLPAR   0x05
 
#define IP101_ANER   0x06
 
#define IP101_ANNPR   0x07
 
#define IP101_ANLPNPR   0x08
 
#define IP101_MMDACR   0x0D
 
#define IP101_MMDAADR   0x0E
 
#define IP101_PHYSCR   0x10
 
#define IP101_ICSR   0x11
 
#define IP101_PHYSMR   0x12
 
#define IP101_IOSCR   0x1D
 
#define IP101_PHYMCSSR   0x1E
 
#define IP101_BMCR_RESET   0x8000
 
#define IP101_BMCR_LOOPBACK   0x4000
 
#define IP101_BMCR_SPEED_SEL   0x2000
 
#define IP101_BMCR_AN_EN   0x1000
 
#define IP101_BMCR_POWER_DOWN   0x0800
 
#define IP101_BMCR_ISOLATE   0x0400
 
#define IP101_BMCR_RESTART_AN   0x0200
 
#define IP101_BMCR_DUPLEX_MODE   0x0100
 
#define IP101_BMCR_COL_TEST   0x0080
 
#define IP101_BMSR_100BT4   0x8000
 
#define IP101_BMSR_100BTX_FD   0x4000
 
#define IP101_BMSR_100BTX_HD   0x2000
 
#define IP101_BMSR_10BT_FD   0x1000
 
#define IP101_BMSR_10BT_HD   0x0800
 
#define IP101_BMSR_MF_PREAMBLE_SUPPR   0x0040
 
#define IP101_BMSR_AN_COMPLETE   0x0020
 
#define IP101_BMSR_REMOTE_FAULT   0x0010
 
#define IP101_BMSR_AN_CAPABLE   0x0008
 
#define IP101_BMSR_LINK_STATUS   0x0004
 
#define IP101_BMSR_JABBER_DETECT   0x0002
 
#define IP101_BMSR_EXTENDED_CAPABLE   0x0001
 
#define IP101_PHYID1_PHY_ID_MSB   0xFFFF
 
#define IP101_PHYID1_PHY_ID_MSB_DEFAULT   0x0243
 
#define IP101_PHYID2__DEFAULT   0xC54
 
#define IP101_ANAR_NEXT_PAGE   0x8000
 
#define IP101_ANAR_REMOTE_FAULT   0x2000
 
#define IP101_ANAR_ASYM_PAUSE   0x0800
 
#define IP101_ANAR_PAUSE   0x0400
 
#define IP101_ANAR_100BT4   0x0200
 
#define IP101_ANAR_100BTX_FD   0x0100
 
#define IP101_ANAR_100BTX_HD   0x0080
 
#define IP101_ANAR_10BT_FD   0x0040
 
#define IP101_ANAR_10BT_HD   0x0020
 
#define IP101_ANAR_SELECTOR   0x001F
 
#define IP101_ANAR_SELECTOR_DEFAULT   0x0001
 
#define IP101_ANLPAR_NEXT_PAGE   0x8000
 
#define IP101_ANLPAR_ACK   0x4000
 
#define IP101_ANLPAR_REMOTE_FAULT   0x2000
 
#define IP101_ANLPAR_ASYM_PAUSE   0x0800
 
#define IP101_ANLPAR_PAUSE   0x0400
 
#define IP101_ANLPAR_100BT4   0x0200
 
#define IP101_ANLPAR_100BTX_FD   0x0100
 
#define IP101_ANLPAR_100BTX_HD   0x0080
 
#define IP101_ANLPAR_10BT_FD   0x0040
 
#define IP101_ANLPAR_10BT_HD   0x0020
 
#define IP101_ANLPAR_SELECTOR   0x001F
 
#define IP101_ANLPAR_SELECTOR_DEFAULT   0x0001
 
#define IP101_ANER_MLF   0x0010
 
#define IP101_ANER_LP_NP_ABLE   0x0008
 
#define IP101_ANER_NP_ABLE   0x0004
 
#define IP101_ANER_PAGE_RX   0x0002
 
#define IP101_ANER_LP_AN_ABLE   0x0001
 
#define IP101_ANNPR_NEXT_PAGE   0x8000
 
#define IP101_ANNPR_MSG_PAGE   0x2000
 
#define IP101_ANNPR_ACK2   0x1000
 
#define IP101_ANNPR_TOGGLE   0x0800
 
#define IP101_ANNPR_MESSAGE   0x07FF
 
#define IP101_ANLPNPR_NEXT_PAGE   0x8000
 
#define IP101_ANLPNPR_ACK   0x4000
 
#define IP101_ANLPNPR_MSG_PAGE   0x2000
 
#define IP101_ANLPNPR_ACK2   0x1000
 
#define IP101_ANLPNPR_TOGGLE   0x0800
 
#define IP101_ANLPNPR_MESSAGE   0x07FF
 
#define IP101_MMDACR_FUNC   0xC000
 
#define IP101_MMDACR_FUNC_ADDR   0x0000
 
#define IP101_MMDACR_FUNC_DATA_NO_POST_INC   0x4000
 
#define IP101_MMDACR_FUNC_DATA_POST_INC_RW   0x8000
 
#define IP101_MMDACR_FUNC_DATA_POST_INC_W   0xC000
 
#define IP101_MMDACR_DEVAD   0x001F
 
#define IP101_PHYSCR_RMII_V10   0x2000
 
#define IP101_PHYSCR_RMII_V12   0x1000
 
#define IP101_PHYSCR_AUTO_MDIX_DIS   0x0800
 
#define IP101_PHYSCR_JABBER_EN   0x0200
 
#define IP101_PHYSCR_FEF_DIS   0x0100
 
#define IP101_PHYSCR_NWAY_PSAVE_DIS   0x0080
 
#define IP101_PHYSCR_BYPASS_DSP_RESET   0x0020
 
#define IP101_PHYSCR_REPEATER_MODE   0x0004
 
#define IP101_PHYSCR_LDPS_EN   0x0002
 
#define IP101_PHYSCR_ANALOG_OFF   0x0001
 
#define IP101_ICSR_INTR_EN   0x8000
 
#define IP101_ICSR_ALL_MASK   0x0800
 
#define IP101_ICSR_SPEED_MASK   0x0400
 
#define IP101_ICSR_DUPLEX_MASK   0x0200
 
#define IP101_ICSR_LINK_MASK   0x0100
 
#define IP101_ICSR_INTR_STATUS   0x0008
 
#define IP101_ICSR_SPEED_CHANGE   0x0004
 
#define IP101_ICSR_DUPLEX_CHANGE   0x0002
 
#define IP101_ICSR_LINK_CHANGE   0x0001
 
#define IP101_PHYSMR_SPEED   0x4000
 
#define IP101_PHYSMR_DUPLEX   0x2000
 
#define IP101_PHYSMR_AN_COMPLETE   0x0800
 
#define IP101_PHYSMR_LINK_UP   0x0400
 
#define IP101_PHYSMR_MDIX   0x0200
 
#define IP101_PHYSMR_POLARITY   0x0100
 
#define IP101_PHYSMR_JABBER   0x0080
 
#define IP101_PHYSMR_AN_ARBIT_STATE   0x000F
 
#define IP101_IOSCR_RMII_WITH_ER   0x0080
 
#define IP101_IOSCR_SEL_INTR32   0x0004
 
#define IP101_PHYMCSSR_LINK_UP   0x0100
 
#define IP101_PHYMCSSR_FORCE_MDIX   0x0008
 
#define IP101_PHYMCSSR_OP_MODE   0x0007
 
#define IP101_PHYMCSSR_OP_MODE_LINK_OFF   0x0000
 
#define IP101_PHYMCSSR_OP_MODE_10M_HD   0x0001
 
#define IP101_PHYMCSSR_OP_MODE_100M_HD   0x0002
 
#define IP101_PHYMCSSR_OP_MODE_10M_FD   0x0005
 
#define IP101_PHYMCSSR_OP_MODE_100M_FD   0x0006
 

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

SPDX-License-Identifier: GPL-2.0-or-later

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

Definition in file ip101_driver.h.

Macro Definition Documentation

◆ IP101_ANAR

#define IP101_ANAR   0x04

Definition at line 49 of file ip101_driver.h.

◆ IP101_ANAR_100BT4

#define IP101_ANAR_100BT4   0x0200

Definition at line 99 of file ip101_driver.h.

◆ IP101_ANAR_100BTX_FD

#define IP101_ANAR_100BTX_FD   0x0100

Definition at line 100 of file ip101_driver.h.

◆ IP101_ANAR_100BTX_HD

#define IP101_ANAR_100BTX_HD   0x0080

Definition at line 101 of file ip101_driver.h.

◆ IP101_ANAR_10BT_FD

#define IP101_ANAR_10BT_FD   0x0040

Definition at line 102 of file ip101_driver.h.

◆ IP101_ANAR_10BT_HD

#define IP101_ANAR_10BT_HD   0x0020

Definition at line 103 of file ip101_driver.h.

◆ IP101_ANAR_ASYM_PAUSE

#define IP101_ANAR_ASYM_PAUSE   0x0800

Definition at line 97 of file ip101_driver.h.

◆ IP101_ANAR_NEXT_PAGE

#define IP101_ANAR_NEXT_PAGE   0x8000

Definition at line 95 of file ip101_driver.h.

◆ IP101_ANAR_PAUSE

#define IP101_ANAR_PAUSE   0x0400

Definition at line 98 of file ip101_driver.h.

◆ IP101_ANAR_REMOTE_FAULT

#define IP101_ANAR_REMOTE_FAULT   0x2000

Definition at line 96 of file ip101_driver.h.

◆ IP101_ANAR_SELECTOR

#define IP101_ANAR_SELECTOR   0x001F

Definition at line 104 of file ip101_driver.h.

◆ IP101_ANAR_SELECTOR_DEFAULT

#define IP101_ANAR_SELECTOR_DEFAULT   0x0001

Definition at line 105 of file ip101_driver.h.

◆ IP101_ANER

#define IP101_ANER   0x06

Definition at line 51 of file ip101_driver.h.

◆ IP101_ANER_LP_AN_ABLE

#define IP101_ANER_LP_AN_ABLE   0x0001

Definition at line 126 of file ip101_driver.h.

◆ IP101_ANER_LP_NP_ABLE

#define IP101_ANER_LP_NP_ABLE   0x0008

Definition at line 123 of file ip101_driver.h.

◆ IP101_ANER_MLF

#define IP101_ANER_MLF   0x0010

Definition at line 122 of file ip101_driver.h.

◆ IP101_ANER_NP_ABLE

#define IP101_ANER_NP_ABLE   0x0004

Definition at line 124 of file ip101_driver.h.

◆ IP101_ANER_PAGE_RX

#define IP101_ANER_PAGE_RX   0x0002

Definition at line 125 of file ip101_driver.h.

◆ IP101_ANLPAR

#define IP101_ANLPAR   0x05

Definition at line 50 of file ip101_driver.h.

◆ IP101_ANLPAR_100BT4

#define IP101_ANLPAR_100BT4   0x0200

Definition at line 113 of file ip101_driver.h.

◆ IP101_ANLPAR_100BTX_FD

#define IP101_ANLPAR_100BTX_FD   0x0100

Definition at line 114 of file ip101_driver.h.

◆ IP101_ANLPAR_100BTX_HD

#define IP101_ANLPAR_100BTX_HD   0x0080

Definition at line 115 of file ip101_driver.h.

◆ IP101_ANLPAR_10BT_FD

#define IP101_ANLPAR_10BT_FD   0x0040

Definition at line 116 of file ip101_driver.h.

◆ IP101_ANLPAR_10BT_HD

#define IP101_ANLPAR_10BT_HD   0x0020

Definition at line 117 of file ip101_driver.h.

◆ IP101_ANLPAR_ACK

#define IP101_ANLPAR_ACK   0x4000

Definition at line 109 of file ip101_driver.h.

◆ IP101_ANLPAR_ASYM_PAUSE

#define IP101_ANLPAR_ASYM_PAUSE   0x0800

Definition at line 111 of file ip101_driver.h.

◆ IP101_ANLPAR_NEXT_PAGE

#define IP101_ANLPAR_NEXT_PAGE   0x8000

Definition at line 108 of file ip101_driver.h.

◆ IP101_ANLPAR_PAUSE

#define IP101_ANLPAR_PAUSE   0x0400

Definition at line 112 of file ip101_driver.h.

◆ IP101_ANLPAR_REMOTE_FAULT

#define IP101_ANLPAR_REMOTE_FAULT   0x2000

Definition at line 110 of file ip101_driver.h.

◆ IP101_ANLPAR_SELECTOR

#define IP101_ANLPAR_SELECTOR   0x001F

Definition at line 118 of file ip101_driver.h.

◆ IP101_ANLPAR_SELECTOR_DEFAULT

#define IP101_ANLPAR_SELECTOR_DEFAULT   0x0001

Definition at line 119 of file ip101_driver.h.

◆ IP101_ANLPNPR

#define IP101_ANLPNPR   0x08

Definition at line 53 of file ip101_driver.h.

◆ IP101_ANLPNPR_ACK

#define IP101_ANLPNPR_ACK   0x4000

Definition at line 137 of file ip101_driver.h.

◆ IP101_ANLPNPR_ACK2

#define IP101_ANLPNPR_ACK2   0x1000

Definition at line 139 of file ip101_driver.h.

◆ IP101_ANLPNPR_MESSAGE

#define IP101_ANLPNPR_MESSAGE   0x07FF

Definition at line 141 of file ip101_driver.h.

◆ IP101_ANLPNPR_MSG_PAGE

#define IP101_ANLPNPR_MSG_PAGE   0x2000

Definition at line 138 of file ip101_driver.h.

◆ IP101_ANLPNPR_NEXT_PAGE

#define IP101_ANLPNPR_NEXT_PAGE   0x8000

Definition at line 136 of file ip101_driver.h.

◆ IP101_ANLPNPR_TOGGLE

#define IP101_ANLPNPR_TOGGLE   0x0800

Definition at line 140 of file ip101_driver.h.

◆ IP101_ANNPR

#define IP101_ANNPR   0x07

Definition at line 52 of file ip101_driver.h.

◆ IP101_ANNPR_ACK2

#define IP101_ANNPR_ACK2   0x1000

Definition at line 131 of file ip101_driver.h.

◆ IP101_ANNPR_MESSAGE

#define IP101_ANNPR_MESSAGE   0x07FF

Definition at line 133 of file ip101_driver.h.

◆ IP101_ANNPR_MSG_PAGE

#define IP101_ANNPR_MSG_PAGE   0x2000

Definition at line 130 of file ip101_driver.h.

◆ IP101_ANNPR_NEXT_PAGE

#define IP101_ANNPR_NEXT_PAGE   0x8000

Definition at line 129 of file ip101_driver.h.

◆ IP101_ANNPR_TOGGLE

#define IP101_ANNPR_TOGGLE   0x0800

Definition at line 132 of file ip101_driver.h.

◆ IP101_BMCR

#define IP101_BMCR   0x00

Definition at line 45 of file ip101_driver.h.

◆ IP101_BMCR_AN_EN

#define IP101_BMCR_AN_EN   0x1000

Definition at line 66 of file ip101_driver.h.

◆ IP101_BMCR_COL_TEST

#define IP101_BMCR_COL_TEST   0x0080

Definition at line 71 of file ip101_driver.h.

◆ IP101_BMCR_DUPLEX_MODE

#define IP101_BMCR_DUPLEX_MODE   0x0100

Definition at line 70 of file ip101_driver.h.

◆ IP101_BMCR_ISOLATE

#define IP101_BMCR_ISOLATE   0x0400

Definition at line 68 of file ip101_driver.h.

◆ IP101_BMCR_LOOPBACK

#define IP101_BMCR_LOOPBACK   0x4000

Definition at line 64 of file ip101_driver.h.

◆ IP101_BMCR_POWER_DOWN

#define IP101_BMCR_POWER_DOWN   0x0800

Definition at line 67 of file ip101_driver.h.

◆ IP101_BMCR_RESET

#define IP101_BMCR_RESET   0x8000

Definition at line 63 of file ip101_driver.h.

◆ IP101_BMCR_RESTART_AN

#define IP101_BMCR_RESTART_AN   0x0200

Definition at line 69 of file ip101_driver.h.

◆ IP101_BMCR_SPEED_SEL

#define IP101_BMCR_SPEED_SEL   0x2000

Definition at line 65 of file ip101_driver.h.

◆ IP101_BMSR

#define IP101_BMSR   0x01

Definition at line 46 of file ip101_driver.h.

◆ IP101_BMSR_100BT4

#define IP101_BMSR_100BT4   0x8000

Definition at line 74 of file ip101_driver.h.

◆ IP101_BMSR_100BTX_FD

#define IP101_BMSR_100BTX_FD   0x4000

Definition at line 75 of file ip101_driver.h.

◆ IP101_BMSR_100BTX_HD

#define IP101_BMSR_100BTX_HD   0x2000

Definition at line 76 of file ip101_driver.h.

◆ IP101_BMSR_10BT_FD

#define IP101_BMSR_10BT_FD   0x1000

Definition at line 77 of file ip101_driver.h.

◆ IP101_BMSR_10BT_HD

#define IP101_BMSR_10BT_HD   0x0800

Definition at line 78 of file ip101_driver.h.

◆ IP101_BMSR_AN_CAPABLE

#define IP101_BMSR_AN_CAPABLE   0x0008

Definition at line 82 of file ip101_driver.h.

◆ IP101_BMSR_AN_COMPLETE

#define IP101_BMSR_AN_COMPLETE   0x0020

Definition at line 80 of file ip101_driver.h.

◆ IP101_BMSR_EXTENDED_CAPABLE

#define IP101_BMSR_EXTENDED_CAPABLE   0x0001

Definition at line 85 of file ip101_driver.h.

◆ IP101_BMSR_JABBER_DETECT

#define IP101_BMSR_JABBER_DETECT   0x0002

Definition at line 84 of file ip101_driver.h.

◆ IP101_BMSR_LINK_STATUS

#define IP101_BMSR_LINK_STATUS   0x0004

Definition at line 83 of file ip101_driver.h.

◆ IP101_BMSR_MF_PREAMBLE_SUPPR

#define IP101_BMSR_MF_PREAMBLE_SUPPR   0x0040

Definition at line 79 of file ip101_driver.h.

◆ IP101_BMSR_REMOTE_FAULT

#define IP101_BMSR_REMOTE_FAULT   0x0010

Definition at line 81 of file ip101_driver.h.

◆ IP101_ICSR

#define IP101_ICSR   0x11

Definition at line 57 of file ip101_driver.h.

◆ IP101_ICSR_ALL_MASK

#define IP101_ICSR_ALL_MASK   0x0800

Definition at line 165 of file ip101_driver.h.

◆ IP101_ICSR_DUPLEX_CHANGE

#define IP101_ICSR_DUPLEX_CHANGE   0x0002

Definition at line 171 of file ip101_driver.h.

◆ IP101_ICSR_DUPLEX_MASK

#define IP101_ICSR_DUPLEX_MASK   0x0200

Definition at line 167 of file ip101_driver.h.

◆ IP101_ICSR_INTR_EN

#define IP101_ICSR_INTR_EN   0x8000

Definition at line 164 of file ip101_driver.h.

◆ IP101_ICSR_INTR_STATUS

#define IP101_ICSR_INTR_STATUS   0x0008

Definition at line 169 of file ip101_driver.h.

◆ IP101_ICSR_LINK_CHANGE

#define IP101_ICSR_LINK_CHANGE   0x0001

Definition at line 172 of file ip101_driver.h.

◆ IP101_ICSR_LINK_MASK

#define IP101_ICSR_LINK_MASK   0x0100

Definition at line 168 of file ip101_driver.h.

◆ IP101_ICSR_SPEED_CHANGE

#define IP101_ICSR_SPEED_CHANGE   0x0004

Definition at line 170 of file ip101_driver.h.

◆ IP101_ICSR_SPEED_MASK

#define IP101_ICSR_SPEED_MASK   0x0400

Definition at line 166 of file ip101_driver.h.

◆ IP101_IOSCR

#define IP101_IOSCR   0x1D

Definition at line 59 of file ip101_driver.h.

◆ IP101_IOSCR_RMII_WITH_ER

#define IP101_IOSCR_RMII_WITH_ER   0x0080

Definition at line 185 of file ip101_driver.h.

◆ IP101_IOSCR_SEL_INTR32

#define IP101_IOSCR_SEL_INTR32   0x0004

Definition at line 186 of file ip101_driver.h.

◆ IP101_MMDAADR

#define IP101_MMDAADR   0x0E

Definition at line 55 of file ip101_driver.h.

◆ IP101_MMDACR

#define IP101_MMDACR   0x0D

Definition at line 54 of file ip101_driver.h.

◆ IP101_MMDACR_DEVAD

#define IP101_MMDACR_DEVAD   0x001F

Definition at line 149 of file ip101_driver.h.

◆ IP101_MMDACR_FUNC

#define IP101_MMDACR_FUNC   0xC000

Definition at line 144 of file ip101_driver.h.

◆ IP101_MMDACR_FUNC_ADDR

#define IP101_MMDACR_FUNC_ADDR   0x0000

Definition at line 145 of file ip101_driver.h.

◆ IP101_MMDACR_FUNC_DATA_NO_POST_INC

#define IP101_MMDACR_FUNC_DATA_NO_POST_INC   0x4000

Definition at line 146 of file ip101_driver.h.

◆ IP101_MMDACR_FUNC_DATA_POST_INC_RW

#define IP101_MMDACR_FUNC_DATA_POST_INC_RW   0x8000

Definition at line 147 of file ip101_driver.h.

◆ IP101_MMDACR_FUNC_DATA_POST_INC_W

#define IP101_MMDACR_FUNC_DATA_POST_INC_W   0xC000

Definition at line 148 of file ip101_driver.h.

◆ IP101_PHY_ADDR

#define IP101_PHY_ADDR   1

Definition at line 39 of file ip101_driver.h.

◆ IP101_PHYID1

#define IP101_PHYID1   0x02

Definition at line 47 of file ip101_driver.h.

◆ IP101_PHYID1_PHY_ID_MSB

#define IP101_PHYID1_PHY_ID_MSB   0xFFFF

Definition at line 88 of file ip101_driver.h.

◆ IP101_PHYID1_PHY_ID_MSB_DEFAULT

#define IP101_PHYID1_PHY_ID_MSB_DEFAULT   0x0243

Definition at line 89 of file ip101_driver.h.

◆ IP101_PHYID2

#define IP101_PHYID2   0x03

Definition at line 48 of file ip101_driver.h.

◆ IP101_PHYID2__DEFAULT

#define IP101_PHYID2__DEFAULT   0xC54

Definition at line 92 of file ip101_driver.h.

◆ IP101_PHYMCSSR

#define IP101_PHYMCSSR   0x1E

Definition at line 60 of file ip101_driver.h.

◆ IP101_PHYMCSSR_FORCE_MDIX

#define IP101_PHYMCSSR_FORCE_MDIX   0x0008

Definition at line 190 of file ip101_driver.h.

◆ IP101_PHYMCSSR_LINK_UP

#define IP101_PHYMCSSR_LINK_UP   0x0100

Definition at line 189 of file ip101_driver.h.

◆ IP101_PHYMCSSR_OP_MODE

#define IP101_PHYMCSSR_OP_MODE   0x0007

Definition at line 191 of file ip101_driver.h.

◆ IP101_PHYMCSSR_OP_MODE_100M_FD

#define IP101_PHYMCSSR_OP_MODE_100M_FD   0x0006

Definition at line 196 of file ip101_driver.h.

◆ IP101_PHYMCSSR_OP_MODE_100M_HD

#define IP101_PHYMCSSR_OP_MODE_100M_HD   0x0002

Definition at line 194 of file ip101_driver.h.

◆ IP101_PHYMCSSR_OP_MODE_10M_FD

#define IP101_PHYMCSSR_OP_MODE_10M_FD   0x0005

Definition at line 195 of file ip101_driver.h.

◆ IP101_PHYMCSSR_OP_MODE_10M_HD

#define IP101_PHYMCSSR_OP_MODE_10M_HD   0x0001

Definition at line 193 of file ip101_driver.h.

◆ IP101_PHYMCSSR_OP_MODE_LINK_OFF

#define IP101_PHYMCSSR_OP_MODE_LINK_OFF   0x0000

Definition at line 192 of file ip101_driver.h.

◆ IP101_PHYSCR

#define IP101_PHYSCR   0x10

Definition at line 56 of file ip101_driver.h.

◆ IP101_PHYSCR_ANALOG_OFF

#define IP101_PHYSCR_ANALOG_OFF   0x0001

Definition at line 161 of file ip101_driver.h.

◆ IP101_PHYSCR_AUTO_MDIX_DIS

#define IP101_PHYSCR_AUTO_MDIX_DIS   0x0800

Definition at line 154 of file ip101_driver.h.

◆ IP101_PHYSCR_BYPASS_DSP_RESET

#define IP101_PHYSCR_BYPASS_DSP_RESET   0x0020

Definition at line 158 of file ip101_driver.h.

◆ IP101_PHYSCR_FEF_DIS

#define IP101_PHYSCR_FEF_DIS   0x0100

Definition at line 156 of file ip101_driver.h.

◆ IP101_PHYSCR_JABBER_EN

#define IP101_PHYSCR_JABBER_EN   0x0200

Definition at line 155 of file ip101_driver.h.

◆ IP101_PHYSCR_LDPS_EN

#define IP101_PHYSCR_LDPS_EN   0x0002

Definition at line 160 of file ip101_driver.h.

◆ IP101_PHYSCR_NWAY_PSAVE_DIS

#define IP101_PHYSCR_NWAY_PSAVE_DIS   0x0080

Definition at line 157 of file ip101_driver.h.

◆ IP101_PHYSCR_REPEATER_MODE

#define IP101_PHYSCR_REPEATER_MODE   0x0004

Definition at line 159 of file ip101_driver.h.

◆ IP101_PHYSCR_RMII_V10

#define IP101_PHYSCR_RMII_V10   0x2000

Definition at line 152 of file ip101_driver.h.

◆ IP101_PHYSCR_RMII_V12

#define IP101_PHYSCR_RMII_V12   0x1000

Definition at line 153 of file ip101_driver.h.

◆ IP101_PHYSMR

#define IP101_PHYSMR   0x12

Definition at line 58 of file ip101_driver.h.

◆ IP101_PHYSMR_AN_ARBIT_STATE

#define IP101_PHYSMR_AN_ARBIT_STATE   0x000F

Definition at line 182 of file ip101_driver.h.

◆ IP101_PHYSMR_AN_COMPLETE

#define IP101_PHYSMR_AN_COMPLETE   0x0800

Definition at line 177 of file ip101_driver.h.

◆ IP101_PHYSMR_DUPLEX

#define IP101_PHYSMR_DUPLEX   0x2000

Definition at line 176 of file ip101_driver.h.

◆ IP101_PHYSMR_JABBER

#define IP101_PHYSMR_JABBER   0x0080

Definition at line 181 of file ip101_driver.h.

◆ IP101_PHYSMR_LINK_UP

#define IP101_PHYSMR_LINK_UP   0x0400

Definition at line 178 of file ip101_driver.h.

◆ IP101_PHYSMR_MDIX

#define IP101_PHYSMR_MDIX   0x0200

Definition at line 179 of file ip101_driver.h.

◆ IP101_PHYSMR_POLARITY

#define IP101_PHYSMR_POLARITY   0x0100

Definition at line 180 of file ip101_driver.h.

◆ IP101_PHYSMR_SPEED

#define IP101_PHYSMR_SPEED   0x4000

Definition at line 175 of file ip101_driver.h.

Function Documentation

◆ ip101DisableIrq()

void ip101DisableIrq ( NetInterface interface)

Disable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 144 of file ip101_driver.c.

◆ ip101DumpPhyReg()

void ip101DumpPhyReg ( NetInterface interface)

Dump PHY registers for debugging purpose.

Parameters
[in]interfaceUnderlying network interface

Definition at line 247 of file ip101_driver.c.

◆ ip101EnableIrq()

void ip101EnableIrq ( NetInterface interface)

Enable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 134 of file ip101_driver.c.

◆ ip101EventHandler()

void ip101EventHandler ( NetInterface interface)

IP101 event handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 154 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 62 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 234 of file ip101_driver.c.

◆ ip101Tick()

void ip101Tick ( NetInterface interface)

IP101 timer handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 100 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 218 of file ip101_driver.c.

Variable Documentation

◆ ip101PhyDriver

const PhyDriver ip101PhyDriver

IP101 Ethernet PHY driver.

Definition at line 44 of file ip101_driver.c.