st802rt1a_driver.h File Reference

ST802RT1A Ethernet PHY driver. More...

#include "core/nic.h"

Go to the source code of this file.

Macros

#define ST802RT1A_PHY_ADDR   1
 
#define ST802RT1A_CNTRL   0x00
 
#define ST802RT1A_STATS   0x01
 
#define ST802RT1A_PHYID1   0x02
 
#define ST802RT1A_PHYID2   0x03
 
#define ST802RT1A_LDADV   0x04
 
#define ST802RT1A_LPADV   0x05
 
#define ST802RT1A_ANEGX   0x06
 
#define ST802RT1A_LDNPG   0x07
 
#define ST802RT1A_LPNPG   0x08
 
#define ST802RT1A_XCNTL   0x10
 
#define ST802RT1A_XSTAT   0x11
 
#define ST802RT1A_XRCNT   0x12
 
#define ST802RT1A_XCCNT   0x13
 
#define ST802RT1A_XDCNT   0x14
 
#define ST802RT1A_AUXCS   0x18
 
#define ST802RT1A_AUXSS   0x19
 
#define ST802RT1A_AUXM2   0x1B
 
#define ST802RT1A_TSTAT   0x1C
 
#define ST802RT1A_AMPHY   0x1E
 
#define ST802RT1A_BTEST   0x1F
 
#define ST802RT1A_CNTRL_RESET   0x8000
 
#define ST802RT1A_CNTRL_LOOPBACK   0x4000
 
#define ST802RT1A_CNTRL_SPEED_SEL   0x2000
 
#define ST802RT1A_CNTRL_AN_EN   0x1000
 
#define ST802RT1A_CNTRL_POWER_DOWN   0x0800
 
#define ST802RT1A_CNTRL_ISOLATE   0x0400
 
#define ST802RT1A_CNTRL_RESTART_AN   0x0200
 
#define ST802RT1A_CNTRL_DUPLEX_MODE   0x0100
 
#define ST802RT1A_CNTRL_COL_TEST   0x0080
 
#define ST802RT1A_STATS_100BT4   0x8000
 
#define ST802RT1A_STATS_100BTX_FD   0x4000
 
#define ST802RT1A_STATS_100BTX_HD   0x2000
 
#define ST802RT1A_STATS_10BT_FD   0x1000
 
#define ST802RT1A_STATS_10BT_HD   0x0800
 
#define ST802RT1A_STATS_MF_PREAMBLE_SUPPR   0x0040
 
#define ST802RT1A_STATS_AN_COMPLETE   0x0020
 
#define ST802RT1A_STATS_REMOTE_FAULT   0x0010
 
#define ST802RT1A_STATS_AN_CAPABLE   0x0008
 
#define ST802RT1A_STATS_LINK_STATUS   0x0004
 
#define ST802RT1A_STATS_JABBER_DETECT   0x0002
 
#define ST802RT1A_STATS_EXTENDED_CAPABLE   0x0001
 
#define ST802RT1A_PHYID1_OUI_MSB   0xFFFF
 
#define ST802RT1A_PHYID1_OUI_MSB_DEFAULT   0x0203
 
#define ST802RT1A_PHYID2_OUI_LSB   0xFC00
 
#define ST802RT1A_PHYID2_OUI_LSB_DEFAULT   0x8400
 
#define ST802RT1A_PHYID2_MODEL_NUM   0x03F0
 
#define ST802RT1A_PHYID2_MODEL_NUM_DEFAULT   0x0060
 
#define ST802RT1A_PHYID2_REVISION_NUM   0x000F
 
#define ST802RT1A_LDADV_NEXT_PAGE   0x8000
 
#define ST802RT1A_LDADV_REMOTE_FAULT   0x2000
 
#define ST802RT1A_LDADV_ASYM_PAUSE   0x0800
 
#define ST802RT1A_LDADV_PAUSE   0x0400
 
#define ST802RT1A_LDADV_100BT4   0x0200
 
#define ST802RT1A_LDADV_100BTX_FD   0x0100
 
#define ST802RT1A_LDADV_100BTX_HD   0x0080
 
#define ST802RT1A_LDADV_10BT_FD   0x0040
 
#define ST802RT1A_LDADV_10BT_HD   0x0020
 
#define ST802RT1A_LDADV_SELECTOR   0x001F
 
#define ST802RT1A_LDADV_SELECTOR_DEFAULT   0x0001
 
#define ST802RT1A_LPADV_NEXT_PAGE   0x8000
 
#define ST802RT1A_LPADV_ACK   0x4000
 
#define ST802RT1A_LPADV_REMOTE_FAULT   0x2000
 
#define ST802RT1A_LPADV_ASYM_PAUSE   0x0800
 
#define ST802RT1A_LPADV_PAUSE   0x0400
 
#define ST802RT1A_LPADV_100BT4   0x0200
 
#define ST802RT1A_LPADV_100BTX_FD   0x0100
 
#define ST802RT1A_LPADV_100BTX_HD   0x0080
 
#define ST802RT1A_LPADV_10BT_FD   0x0040
 
#define ST802RT1A_LPADV_10BT_HD   0x0020
 
#define ST802RT1A_LPADV_SELECTOR   0x001F
 
#define ST802RT1A_LPADV_SELECTOR_DEFAULT   0x0001
 
#define ST802RT1A_ANEGX_PAR_DETECT_FAULT   0x0010
 
#define ST802RT1A_ANEGX_LP_NEXT_PAGE_ABLE   0x0008
 
#define ST802RT1A_ANEGX_NEXT_PAGE_ABLE   0x0004
 
#define ST802RT1A_ANEGX_PAGE_RECEIVED   0x0002
 
#define ST802RT1A_ANEGX_LP_AN_ABLE   0x0001
 
#define ST802RT1A_LDNPG_NEXT_PAGE   0x8000
 
#define ST802RT1A_LDNPG_MSG_PAGE   0x2000
 
#define ST802RT1A_LDNPG_ACK2   0x1000
 
#define ST802RT1A_LDNPG_TOGGLE   0x0800
 
#define ST802RT1A_LDNPG_MESSAGE   0x07FF
 
#define ST802RT1A_LPNPG_NEXT_PAGE   0x8000
 
#define ST802RT1A_LPNPG_ACK   0x4000
 
#define ST802RT1A_LPNPG_MSG_PAGE   0x2000
 
#define ST802RT1A_LPNPG_ACK2   0x1000
 
#define ST802RT1A_LPNPG_TOGGLE   0x0800
 
#define ST802RT1A_LPNPG_MESSAGE   0x07FF
 
#define ST802RT1A_XCNTL_MII_EN   0x0200
 
#define ST802RT1A_XCNTL_FEF_EN   0x0020
 
#define ST802RT1A_XCNTL_FIFO_EXTENDED   0x0004
 
#define ST802RT1A_XCNTL_RMII_OOBS   0x0002
 
#define ST802RT1A_XSTAT_FX_MODE   0x0400
 
#define ST802RT1A_XSTAT_SPEED   0x0200
 
#define ST802RT1A_XSTAT_DUPLEX   0x0100
 
#define ST802RT1A_XSTAT_PAUSE   0x0080
 
#define ST802RT1A_XSTAT_AN_CMPL_INT   0x0040
 
#define ST802RT1A_XSTAT_REM_FLT_DET_INT   0x0020
 
#define ST802RT1A_XSTAT_LK_DWN_INT   0x0010
 
#define ST802RT1A_XSTAT_AN_ACK_DET_INT   0x0008
 
#define ST802RT1A_XSTAT_PD_FLT_INT   0x0004
 
#define ST802RT1A_XSTAT_PG_RCVD_INT   0x0002
 
#define ST802RT1A_XSTAT_RX_FULL_INT   0x0001
 
#define ST802RT1A_XRCNT_INT_OE_N   0x0100
 
#define ST802RT1A_XRCNT_INT_EN   0x0080
 
#define ST802RT1A_XRCNT_AN_CMPL_EN   0x0040
 
#define ST802RT1A_XRCNT_REM_FLT_DET_EN   0x0020
 
#define ST802RT1A_XRCNT_LK_DWN_EN   0x0010
 
#define ST802RT1A_XRCNT_AN_ACK_DET_EN   0x0008
 
#define ST802RT1A_XRCNT_PD_FLT_EN   0x0004
 
#define ST802RT1A_XRCNT_PG_RCVD_EN   0x0002
 
#define ST802RT1A_XRCNT_RX_FULL_EN   0x0001
 
#define ST802RT1A_XCCNT_RX_ERR_COUNTER_DIS   0x2000
 
#define ST802RT1A_XCCNT_AN_COMPLETE   0x1000
 
#define ST802RT1A_XCCNT_DC_REST_EN   0x0100
 
#define ST802RT1A_XCCNT_NRZ_CONV_EN   0x0080
 
#define ST802RT1A_XCCNT_TX_ISOLATE   0x0020
 
#define ST802RT1A_XCCNT_CMODE   0x001C
 
#define ST802RT1A_XCCNT_CMODE_AN   0x0000
 
#define ST802RT1A_XCCNT_CMODE_10BT_HD   0x0004
 
#define ST802RT1A_XCCNT_CMODE_100BTX_HD   0x0008
 
#define ST802RT1A_XCCNT_CMODE_10BT_FD   0x0014
 
#define ST802RT1A_XCCNT_CMODE_100BTX_FD   0x0018
 
#define ST802RT1A_XCCNT_CMODE_ISOLATE   0x001C
 
#define ST802RT1A_XCCNT_MLT3_DIS   0x0002
 
#define ST802RT1A_XCCNT_SCRAMBLER_DIS   0x0001
 
#define ST802RT1A_XDCNT_PHY_ADDR   0x00F8
 
#define ST802RT1A_XDCNT_PREAMBLE_SUPPR   0x0002
 
#define ST802RT1A_AUXCS_JABBER_DIS   0x8000
 
#define ST802RT1A_AUXCS_MDIO_POWER_SAVING   0x0010
 
#define ST802RT1A_AUXSS_AN_COMPLETE   0x8000
 
#define ST802RT1A_AUXSS_AN_ACK   0x4000
 
#define ST802RT1A_AUXSS_AN_DETECT   0x2000
 
#define ST802RT1A_AUXSS_LP_AN_ABLE_DETECT   0x1000
 
#define ST802RT1A_AUXSS_AN_PAUSE   0x0800
 
#define ST802RT1A_AUXSS_AN_HCD   0x0700
 
#define ST802RT1A_AUXSS_PAR_DET_FAULT   0x0080
 
#define ST802RT1A_AUXSS_REMOTE_FAULT   0x0040
 
#define ST802RT1A_AUXSS_PAGE_RECEIVED   0x0020
 
#define ST802RT1A_AUXSS_LP_AN_ABLE   0x0010
 
#define ST802RT1A_AUXSS_SP100   0x0008
 
#define ST802RT1A_AUXSS_LINK_STATUS   0x0004
 
#define ST802RT1A_AUXSS_AN_EN   0x0002
 
#define ST802RT1A_AUXSS_JABBER_DETECT   0x0001
 
#define ST802RT1A_AUXM2_LED_MODE   0x0200
 
#define ST802RT1A_AUXM2_10BT_ECHO_DIS   0x0080
 
#define ST802RT1A_AUXM2_MI_SQE_DIS   0x0008
 
#define ST802RT1A_TSTAT_MDIX_STATUS   0x2000
 
#define ST802RT1A_TSTAT_MDIX_SWAP   0x1000
 
#define ST802RT1A_TSTAT_MDIX_DIS   0x0800
 
#define ST802RT1A_TSTAT_JABBER_DETECT   0x0200
 
#define ST802RT1A_TSTAT_POLARITY_CHANGED   0x0100
 
#define ST802RT1A_AMPHY_HCD_100BTX_FD   0x8000
 
#define ST802RT1A_AMPHY_HCD_100BT4   0x4000
 
#define ST802RT1A_AMPHY_HCD_100BTX_HD   0x2000
 
#define ST802RT1A_AMPHY_HCD_10BT_FD   0x1000
 
#define ST802RT1A_AMPHY_HCD_10BT_HD   0x0800
 
#define ST802RT1A_AMPHY_AN_RESTART   0x0100
 
#define ST802RT1A_AMPHY_AN_COMPLETE   0x0080
 
#define ST802RT1A_AMPHY_AN_ACK_COMPLETE   0x0040
 
#define ST802RT1A_AMPHY_AN_ACK   0x0020
 
#define ST802RT1A_AMPHY_AN_ABLE   0x0010
 
#define ST802RT1A_AMPHY_SUPER_ISOLATE   0x0008
 
#define ST802RT1A_BTEST_SHADOW_REG_EN   0x0080
 

Functions

error_t st802rt1aInit (NetInterface *interface)
 ST802RT1A PHY transceiver initialization. More...
 
void st802rt1aInitHook (NetInterface *interface)
 ST802RT1A custom configuration. More...
 
void st802rt1aTick (NetInterface *interface)
 ST802RT1A timer handler. More...
 
void st802rt1aEnableIrq (NetInterface *interface)
 Enable interrupts. More...
 
void st802rt1aDisableIrq (NetInterface *interface)
 Disable interrupts. More...
 
void st802rt1aEventHandler (NetInterface *interface)
 ST802RT1A event handler. More...
 
void st802rt1aWritePhyReg (NetInterface *interface, uint8_t address, uint16_t data)
 Write PHY register. More...
 
uint16_t st802rt1aReadPhyReg (NetInterface *interface, uint8_t address)
 Read PHY register. More...
 
void st802rt1aDumpPhyReg (NetInterface *interface)
 Dump PHY registers for debugging purpose. More...
 

Variables

const PhyDriver st802rt1aPhyDriver
 ST802RT1A Ethernet PHY driver. More...
 

Detailed Description

ST802RT1A 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.

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

Definition in file st802rt1a_driver.h.

Macro Definition Documentation

◆ ST802RT1A_AMPHY

#define ST802RT1A_AMPHY   0x1E

Definition at line 59 of file st802rt1a_driver.h.

◆ ST802RT1A_AMPHY_AN_ABLE

#define ST802RT1A_AMPHY_AN_ABLE   0x0010

Definition at line 239 of file st802rt1a_driver.h.

◆ ST802RT1A_AMPHY_AN_ACK

#define ST802RT1A_AMPHY_AN_ACK   0x0020

Definition at line 238 of file st802rt1a_driver.h.

◆ ST802RT1A_AMPHY_AN_ACK_COMPLETE

#define ST802RT1A_AMPHY_AN_ACK_COMPLETE   0x0040

Definition at line 237 of file st802rt1a_driver.h.

◆ ST802RT1A_AMPHY_AN_COMPLETE

#define ST802RT1A_AMPHY_AN_COMPLETE   0x0080

Definition at line 236 of file st802rt1a_driver.h.

◆ ST802RT1A_AMPHY_AN_RESTART

#define ST802RT1A_AMPHY_AN_RESTART   0x0100

Definition at line 235 of file st802rt1a_driver.h.

◆ ST802RT1A_AMPHY_HCD_100BT4

#define ST802RT1A_AMPHY_HCD_100BT4   0x4000

Definition at line 231 of file st802rt1a_driver.h.

◆ ST802RT1A_AMPHY_HCD_100BTX_FD

#define ST802RT1A_AMPHY_HCD_100BTX_FD   0x8000

Definition at line 230 of file st802rt1a_driver.h.

◆ ST802RT1A_AMPHY_HCD_100BTX_HD

#define ST802RT1A_AMPHY_HCD_100BTX_HD   0x2000

Definition at line 232 of file st802rt1a_driver.h.

◆ ST802RT1A_AMPHY_HCD_10BT_FD

#define ST802RT1A_AMPHY_HCD_10BT_FD   0x1000

Definition at line 233 of file st802rt1a_driver.h.

◆ ST802RT1A_AMPHY_HCD_10BT_HD

#define ST802RT1A_AMPHY_HCD_10BT_HD   0x0800

Definition at line 234 of file st802rt1a_driver.h.

◆ ST802RT1A_AMPHY_SUPER_ISOLATE

#define ST802RT1A_AMPHY_SUPER_ISOLATE   0x0008

Definition at line 240 of file st802rt1a_driver.h.

◆ ST802RT1A_ANEGX

#define ST802RT1A_ANEGX   0x06

Definition at line 47 of file st802rt1a_driver.h.

◆ ST802RT1A_ANEGX_LP_AN_ABLE

#define ST802RT1A_ANEGX_LP_AN_ABLE   0x0001

Definition at line 130 of file st802rt1a_driver.h.

◆ ST802RT1A_ANEGX_LP_NEXT_PAGE_ABLE

#define ST802RT1A_ANEGX_LP_NEXT_PAGE_ABLE   0x0008

Definition at line 127 of file st802rt1a_driver.h.

◆ ST802RT1A_ANEGX_NEXT_PAGE_ABLE

#define ST802RT1A_ANEGX_NEXT_PAGE_ABLE   0x0004

Definition at line 128 of file st802rt1a_driver.h.

◆ ST802RT1A_ANEGX_PAGE_RECEIVED

#define ST802RT1A_ANEGX_PAGE_RECEIVED   0x0002

Definition at line 129 of file st802rt1a_driver.h.

◆ ST802RT1A_ANEGX_PAR_DETECT_FAULT

#define ST802RT1A_ANEGX_PAR_DETECT_FAULT   0x0010

Definition at line 126 of file st802rt1a_driver.h.

◆ ST802RT1A_AUXCS

#define ST802RT1A_AUXCS   0x18

Definition at line 55 of file st802rt1a_driver.h.

◆ ST802RT1A_AUXCS_JABBER_DIS

#define ST802RT1A_AUXCS_JABBER_DIS   0x8000

Definition at line 198 of file st802rt1a_driver.h.

◆ ST802RT1A_AUXCS_MDIO_POWER_SAVING

#define ST802RT1A_AUXCS_MDIO_POWER_SAVING   0x0010

Definition at line 199 of file st802rt1a_driver.h.

◆ ST802RT1A_AUXM2

#define ST802RT1A_AUXM2   0x1B

Definition at line 57 of file st802rt1a_driver.h.

◆ ST802RT1A_AUXM2_10BT_ECHO_DIS

#define ST802RT1A_AUXM2_10BT_ECHO_DIS   0x0080

Definition at line 219 of file st802rt1a_driver.h.

◆ ST802RT1A_AUXM2_LED_MODE

#define ST802RT1A_AUXM2_LED_MODE   0x0200

Definition at line 218 of file st802rt1a_driver.h.

◆ ST802RT1A_AUXM2_MI_SQE_DIS

#define ST802RT1A_AUXM2_MI_SQE_DIS   0x0008

Definition at line 220 of file st802rt1a_driver.h.

◆ ST802RT1A_AUXSS

#define ST802RT1A_AUXSS   0x19

Definition at line 56 of file st802rt1a_driver.h.

◆ ST802RT1A_AUXSS_AN_ACK

#define ST802RT1A_AUXSS_AN_ACK   0x4000

Definition at line 203 of file st802rt1a_driver.h.

◆ ST802RT1A_AUXSS_AN_COMPLETE

#define ST802RT1A_AUXSS_AN_COMPLETE   0x8000

Definition at line 202 of file st802rt1a_driver.h.

◆ ST802RT1A_AUXSS_AN_DETECT

#define ST802RT1A_AUXSS_AN_DETECT   0x2000

Definition at line 204 of file st802rt1a_driver.h.

◆ ST802RT1A_AUXSS_AN_EN

#define ST802RT1A_AUXSS_AN_EN   0x0002

Definition at line 214 of file st802rt1a_driver.h.

◆ ST802RT1A_AUXSS_AN_HCD

#define ST802RT1A_AUXSS_AN_HCD   0x0700

Definition at line 207 of file st802rt1a_driver.h.

◆ ST802RT1A_AUXSS_AN_PAUSE

#define ST802RT1A_AUXSS_AN_PAUSE   0x0800

Definition at line 206 of file st802rt1a_driver.h.

◆ ST802RT1A_AUXSS_JABBER_DETECT

#define ST802RT1A_AUXSS_JABBER_DETECT   0x0001

Definition at line 215 of file st802rt1a_driver.h.

◆ ST802RT1A_AUXSS_LINK_STATUS

#define ST802RT1A_AUXSS_LINK_STATUS   0x0004

Definition at line 213 of file st802rt1a_driver.h.

◆ ST802RT1A_AUXSS_LP_AN_ABLE

#define ST802RT1A_AUXSS_LP_AN_ABLE   0x0010

Definition at line 211 of file st802rt1a_driver.h.

◆ ST802RT1A_AUXSS_LP_AN_ABLE_DETECT

#define ST802RT1A_AUXSS_LP_AN_ABLE_DETECT   0x1000

Definition at line 205 of file st802rt1a_driver.h.

◆ ST802RT1A_AUXSS_PAGE_RECEIVED

#define ST802RT1A_AUXSS_PAGE_RECEIVED   0x0020

Definition at line 210 of file st802rt1a_driver.h.

◆ ST802RT1A_AUXSS_PAR_DET_FAULT

#define ST802RT1A_AUXSS_PAR_DET_FAULT   0x0080

Definition at line 208 of file st802rt1a_driver.h.

◆ ST802RT1A_AUXSS_REMOTE_FAULT

#define ST802RT1A_AUXSS_REMOTE_FAULT   0x0040

Definition at line 209 of file st802rt1a_driver.h.

◆ ST802RT1A_AUXSS_SP100

#define ST802RT1A_AUXSS_SP100   0x0008

Definition at line 212 of file st802rt1a_driver.h.

◆ ST802RT1A_BTEST

#define ST802RT1A_BTEST   0x1F

Definition at line 60 of file st802rt1a_driver.h.

◆ ST802RT1A_BTEST_SHADOW_REG_EN

#define ST802RT1A_BTEST_SHADOW_REG_EN   0x0080

Definition at line 243 of file st802rt1a_driver.h.

◆ ST802RT1A_CNTRL

#define ST802RT1A_CNTRL   0x00

Definition at line 41 of file st802rt1a_driver.h.

◆ ST802RT1A_CNTRL_AN_EN

#define ST802RT1A_CNTRL_AN_EN   0x1000

Definition at line 66 of file st802rt1a_driver.h.

◆ ST802RT1A_CNTRL_COL_TEST

#define ST802RT1A_CNTRL_COL_TEST   0x0080

Definition at line 71 of file st802rt1a_driver.h.

◆ ST802RT1A_CNTRL_DUPLEX_MODE

#define ST802RT1A_CNTRL_DUPLEX_MODE   0x0100

Definition at line 70 of file st802rt1a_driver.h.

◆ ST802RT1A_CNTRL_ISOLATE

#define ST802RT1A_CNTRL_ISOLATE   0x0400

Definition at line 68 of file st802rt1a_driver.h.

◆ ST802RT1A_CNTRL_LOOPBACK

#define ST802RT1A_CNTRL_LOOPBACK   0x4000

Definition at line 64 of file st802rt1a_driver.h.

◆ ST802RT1A_CNTRL_POWER_DOWN

#define ST802RT1A_CNTRL_POWER_DOWN   0x0800

Definition at line 67 of file st802rt1a_driver.h.

◆ ST802RT1A_CNTRL_RESET

#define ST802RT1A_CNTRL_RESET   0x8000

Definition at line 63 of file st802rt1a_driver.h.

◆ ST802RT1A_CNTRL_RESTART_AN

#define ST802RT1A_CNTRL_RESTART_AN   0x0200

Definition at line 69 of file st802rt1a_driver.h.

◆ ST802RT1A_CNTRL_SPEED_SEL

#define ST802RT1A_CNTRL_SPEED_SEL   0x2000

Definition at line 65 of file st802rt1a_driver.h.

◆ ST802RT1A_LDADV

#define ST802RT1A_LDADV   0x04

Definition at line 45 of file st802rt1a_driver.h.

◆ ST802RT1A_LDADV_100BT4

#define ST802RT1A_LDADV_100BT4   0x0200

Definition at line 103 of file st802rt1a_driver.h.

◆ ST802RT1A_LDADV_100BTX_FD

#define ST802RT1A_LDADV_100BTX_FD   0x0100

Definition at line 104 of file st802rt1a_driver.h.

◆ ST802RT1A_LDADV_100BTX_HD

#define ST802RT1A_LDADV_100BTX_HD   0x0080

Definition at line 105 of file st802rt1a_driver.h.

◆ ST802RT1A_LDADV_10BT_FD

#define ST802RT1A_LDADV_10BT_FD   0x0040

Definition at line 106 of file st802rt1a_driver.h.

◆ ST802RT1A_LDADV_10BT_HD

#define ST802RT1A_LDADV_10BT_HD   0x0020

Definition at line 107 of file st802rt1a_driver.h.

◆ ST802RT1A_LDADV_ASYM_PAUSE

#define ST802RT1A_LDADV_ASYM_PAUSE   0x0800

Definition at line 101 of file st802rt1a_driver.h.

◆ ST802RT1A_LDADV_NEXT_PAGE

#define ST802RT1A_LDADV_NEXT_PAGE   0x8000

Definition at line 99 of file st802rt1a_driver.h.

◆ ST802RT1A_LDADV_PAUSE

#define ST802RT1A_LDADV_PAUSE   0x0400

Definition at line 102 of file st802rt1a_driver.h.

◆ ST802RT1A_LDADV_REMOTE_FAULT

#define ST802RT1A_LDADV_REMOTE_FAULT   0x2000

Definition at line 100 of file st802rt1a_driver.h.

◆ ST802RT1A_LDADV_SELECTOR

#define ST802RT1A_LDADV_SELECTOR   0x001F

Definition at line 108 of file st802rt1a_driver.h.

◆ ST802RT1A_LDADV_SELECTOR_DEFAULT

#define ST802RT1A_LDADV_SELECTOR_DEFAULT   0x0001

Definition at line 109 of file st802rt1a_driver.h.

◆ ST802RT1A_LDNPG

#define ST802RT1A_LDNPG   0x07

Definition at line 48 of file st802rt1a_driver.h.

◆ ST802RT1A_LDNPG_ACK2

#define ST802RT1A_LDNPG_ACK2   0x1000

Definition at line 135 of file st802rt1a_driver.h.

◆ ST802RT1A_LDNPG_MESSAGE

#define ST802RT1A_LDNPG_MESSAGE   0x07FF

Definition at line 137 of file st802rt1a_driver.h.

◆ ST802RT1A_LDNPG_MSG_PAGE

#define ST802RT1A_LDNPG_MSG_PAGE   0x2000

Definition at line 134 of file st802rt1a_driver.h.

◆ ST802RT1A_LDNPG_NEXT_PAGE

#define ST802RT1A_LDNPG_NEXT_PAGE   0x8000

Definition at line 133 of file st802rt1a_driver.h.

◆ ST802RT1A_LDNPG_TOGGLE

#define ST802RT1A_LDNPG_TOGGLE   0x0800

Definition at line 136 of file st802rt1a_driver.h.

◆ ST802RT1A_LPADV

#define ST802RT1A_LPADV   0x05

Definition at line 46 of file st802rt1a_driver.h.

◆ ST802RT1A_LPADV_100BT4

#define ST802RT1A_LPADV_100BT4   0x0200

Definition at line 117 of file st802rt1a_driver.h.

◆ ST802RT1A_LPADV_100BTX_FD

#define ST802RT1A_LPADV_100BTX_FD   0x0100

Definition at line 118 of file st802rt1a_driver.h.

◆ ST802RT1A_LPADV_100BTX_HD

#define ST802RT1A_LPADV_100BTX_HD   0x0080

Definition at line 119 of file st802rt1a_driver.h.

◆ ST802RT1A_LPADV_10BT_FD

#define ST802RT1A_LPADV_10BT_FD   0x0040

Definition at line 120 of file st802rt1a_driver.h.

◆ ST802RT1A_LPADV_10BT_HD

#define ST802RT1A_LPADV_10BT_HD   0x0020

Definition at line 121 of file st802rt1a_driver.h.

◆ ST802RT1A_LPADV_ACK

#define ST802RT1A_LPADV_ACK   0x4000

Definition at line 113 of file st802rt1a_driver.h.

◆ ST802RT1A_LPADV_ASYM_PAUSE

#define ST802RT1A_LPADV_ASYM_PAUSE   0x0800

Definition at line 115 of file st802rt1a_driver.h.

◆ ST802RT1A_LPADV_NEXT_PAGE

#define ST802RT1A_LPADV_NEXT_PAGE   0x8000

Definition at line 112 of file st802rt1a_driver.h.

◆ ST802RT1A_LPADV_PAUSE

#define ST802RT1A_LPADV_PAUSE   0x0400

Definition at line 116 of file st802rt1a_driver.h.

◆ ST802RT1A_LPADV_REMOTE_FAULT

#define ST802RT1A_LPADV_REMOTE_FAULT   0x2000

Definition at line 114 of file st802rt1a_driver.h.

◆ ST802RT1A_LPADV_SELECTOR

#define ST802RT1A_LPADV_SELECTOR   0x001F

Definition at line 122 of file st802rt1a_driver.h.

◆ ST802RT1A_LPADV_SELECTOR_DEFAULT

#define ST802RT1A_LPADV_SELECTOR_DEFAULT   0x0001

Definition at line 123 of file st802rt1a_driver.h.

◆ ST802RT1A_LPNPG

#define ST802RT1A_LPNPG   0x08

Definition at line 49 of file st802rt1a_driver.h.

◆ ST802RT1A_LPNPG_ACK

#define ST802RT1A_LPNPG_ACK   0x4000

Definition at line 141 of file st802rt1a_driver.h.

◆ ST802RT1A_LPNPG_ACK2

#define ST802RT1A_LPNPG_ACK2   0x1000

Definition at line 143 of file st802rt1a_driver.h.

◆ ST802RT1A_LPNPG_MESSAGE

#define ST802RT1A_LPNPG_MESSAGE   0x07FF

Definition at line 145 of file st802rt1a_driver.h.

◆ ST802RT1A_LPNPG_MSG_PAGE

#define ST802RT1A_LPNPG_MSG_PAGE   0x2000

Definition at line 142 of file st802rt1a_driver.h.

◆ ST802RT1A_LPNPG_NEXT_PAGE

#define ST802RT1A_LPNPG_NEXT_PAGE   0x8000

Definition at line 140 of file st802rt1a_driver.h.

◆ ST802RT1A_LPNPG_TOGGLE

#define ST802RT1A_LPNPG_TOGGLE   0x0800

Definition at line 144 of file st802rt1a_driver.h.

◆ ST802RT1A_PHY_ADDR

#define ST802RT1A_PHY_ADDR   1

Definition at line 38 of file st802rt1a_driver.h.

◆ ST802RT1A_PHYID1

#define ST802RT1A_PHYID1   0x02

Definition at line 43 of file st802rt1a_driver.h.

◆ ST802RT1A_PHYID1_OUI_MSB

#define ST802RT1A_PHYID1_OUI_MSB   0xFFFF

Definition at line 88 of file st802rt1a_driver.h.

◆ ST802RT1A_PHYID1_OUI_MSB_DEFAULT

#define ST802RT1A_PHYID1_OUI_MSB_DEFAULT   0x0203

Definition at line 89 of file st802rt1a_driver.h.

◆ ST802RT1A_PHYID2

#define ST802RT1A_PHYID2   0x03

Definition at line 44 of file st802rt1a_driver.h.

◆ ST802RT1A_PHYID2_MODEL_NUM

#define ST802RT1A_PHYID2_MODEL_NUM   0x03F0

Definition at line 94 of file st802rt1a_driver.h.

◆ ST802RT1A_PHYID2_MODEL_NUM_DEFAULT

#define ST802RT1A_PHYID2_MODEL_NUM_DEFAULT   0x0060

Definition at line 95 of file st802rt1a_driver.h.

◆ ST802RT1A_PHYID2_OUI_LSB

#define ST802RT1A_PHYID2_OUI_LSB   0xFC00

Definition at line 92 of file st802rt1a_driver.h.

◆ ST802RT1A_PHYID2_OUI_LSB_DEFAULT

#define ST802RT1A_PHYID2_OUI_LSB_DEFAULT   0x8400

Definition at line 93 of file st802rt1a_driver.h.

◆ ST802RT1A_PHYID2_REVISION_NUM

#define ST802RT1A_PHYID2_REVISION_NUM   0x000F

Definition at line 96 of file st802rt1a_driver.h.

◆ ST802RT1A_STATS

#define ST802RT1A_STATS   0x01

Definition at line 42 of file st802rt1a_driver.h.

◆ ST802RT1A_STATS_100BT4

#define ST802RT1A_STATS_100BT4   0x8000

Definition at line 74 of file st802rt1a_driver.h.

◆ ST802RT1A_STATS_100BTX_FD

#define ST802RT1A_STATS_100BTX_FD   0x4000

Definition at line 75 of file st802rt1a_driver.h.

◆ ST802RT1A_STATS_100BTX_HD

#define ST802RT1A_STATS_100BTX_HD   0x2000

Definition at line 76 of file st802rt1a_driver.h.

◆ ST802RT1A_STATS_10BT_FD

#define ST802RT1A_STATS_10BT_FD   0x1000

Definition at line 77 of file st802rt1a_driver.h.

◆ ST802RT1A_STATS_10BT_HD

#define ST802RT1A_STATS_10BT_HD   0x0800

Definition at line 78 of file st802rt1a_driver.h.

◆ ST802RT1A_STATS_AN_CAPABLE

#define ST802RT1A_STATS_AN_CAPABLE   0x0008

Definition at line 82 of file st802rt1a_driver.h.

◆ ST802RT1A_STATS_AN_COMPLETE

#define ST802RT1A_STATS_AN_COMPLETE   0x0020

Definition at line 80 of file st802rt1a_driver.h.

◆ ST802RT1A_STATS_EXTENDED_CAPABLE

#define ST802RT1A_STATS_EXTENDED_CAPABLE   0x0001

Definition at line 85 of file st802rt1a_driver.h.

◆ ST802RT1A_STATS_JABBER_DETECT

#define ST802RT1A_STATS_JABBER_DETECT   0x0002

Definition at line 84 of file st802rt1a_driver.h.

◆ ST802RT1A_STATS_LINK_STATUS

#define ST802RT1A_STATS_LINK_STATUS   0x0004

Definition at line 83 of file st802rt1a_driver.h.

◆ ST802RT1A_STATS_MF_PREAMBLE_SUPPR

#define ST802RT1A_STATS_MF_PREAMBLE_SUPPR   0x0040

Definition at line 79 of file st802rt1a_driver.h.

◆ ST802RT1A_STATS_REMOTE_FAULT

#define ST802RT1A_STATS_REMOTE_FAULT   0x0010

Definition at line 81 of file st802rt1a_driver.h.

◆ ST802RT1A_TSTAT

#define ST802RT1A_TSTAT   0x1C

Definition at line 58 of file st802rt1a_driver.h.

◆ ST802RT1A_TSTAT_JABBER_DETECT

#define ST802RT1A_TSTAT_JABBER_DETECT   0x0200

Definition at line 226 of file st802rt1a_driver.h.

◆ ST802RT1A_TSTAT_MDIX_DIS

#define ST802RT1A_TSTAT_MDIX_DIS   0x0800

Definition at line 225 of file st802rt1a_driver.h.

◆ ST802RT1A_TSTAT_MDIX_STATUS

#define ST802RT1A_TSTAT_MDIX_STATUS   0x2000

Definition at line 223 of file st802rt1a_driver.h.

◆ ST802RT1A_TSTAT_MDIX_SWAP

#define ST802RT1A_TSTAT_MDIX_SWAP   0x1000

Definition at line 224 of file st802rt1a_driver.h.

◆ ST802RT1A_TSTAT_POLARITY_CHANGED

#define ST802RT1A_TSTAT_POLARITY_CHANGED   0x0100

Definition at line 227 of file st802rt1a_driver.h.

◆ ST802RT1A_XCCNT

#define ST802RT1A_XCCNT   0x13

Definition at line 53 of file st802rt1a_driver.h.

◆ ST802RT1A_XCCNT_AN_COMPLETE

#define ST802RT1A_XCCNT_AN_COMPLETE   0x1000

Definition at line 179 of file st802rt1a_driver.h.

◆ ST802RT1A_XCCNT_CMODE

#define ST802RT1A_XCCNT_CMODE   0x001C

Definition at line 183 of file st802rt1a_driver.h.

◆ ST802RT1A_XCCNT_CMODE_100BTX_FD

#define ST802RT1A_XCCNT_CMODE_100BTX_FD   0x0018

Definition at line 188 of file st802rt1a_driver.h.

◆ ST802RT1A_XCCNT_CMODE_100BTX_HD

#define ST802RT1A_XCCNT_CMODE_100BTX_HD   0x0008

Definition at line 186 of file st802rt1a_driver.h.

◆ ST802RT1A_XCCNT_CMODE_10BT_FD

#define ST802RT1A_XCCNT_CMODE_10BT_FD   0x0014

Definition at line 187 of file st802rt1a_driver.h.

◆ ST802RT1A_XCCNT_CMODE_10BT_HD

#define ST802RT1A_XCCNT_CMODE_10BT_HD   0x0004

Definition at line 185 of file st802rt1a_driver.h.

◆ ST802RT1A_XCCNT_CMODE_AN

#define ST802RT1A_XCCNT_CMODE_AN   0x0000

Definition at line 184 of file st802rt1a_driver.h.

◆ ST802RT1A_XCCNT_CMODE_ISOLATE

#define ST802RT1A_XCCNT_CMODE_ISOLATE   0x001C

Definition at line 189 of file st802rt1a_driver.h.

◆ ST802RT1A_XCCNT_DC_REST_EN

#define ST802RT1A_XCCNT_DC_REST_EN   0x0100

Definition at line 180 of file st802rt1a_driver.h.

◆ ST802RT1A_XCCNT_MLT3_DIS

#define ST802RT1A_XCCNT_MLT3_DIS   0x0002

Definition at line 190 of file st802rt1a_driver.h.

◆ ST802RT1A_XCCNT_NRZ_CONV_EN

#define ST802RT1A_XCCNT_NRZ_CONV_EN   0x0080

Definition at line 181 of file st802rt1a_driver.h.

◆ ST802RT1A_XCCNT_RX_ERR_COUNTER_DIS

#define ST802RT1A_XCCNT_RX_ERR_COUNTER_DIS   0x2000

Definition at line 178 of file st802rt1a_driver.h.

◆ ST802RT1A_XCCNT_SCRAMBLER_DIS

#define ST802RT1A_XCCNT_SCRAMBLER_DIS   0x0001

Definition at line 191 of file st802rt1a_driver.h.

◆ ST802RT1A_XCCNT_TX_ISOLATE

#define ST802RT1A_XCCNT_TX_ISOLATE   0x0020

Definition at line 182 of file st802rt1a_driver.h.

◆ ST802RT1A_XCNTL

#define ST802RT1A_XCNTL   0x10

Definition at line 50 of file st802rt1a_driver.h.

◆ ST802RT1A_XCNTL_FEF_EN

#define ST802RT1A_XCNTL_FEF_EN   0x0020

Definition at line 149 of file st802rt1a_driver.h.

◆ ST802RT1A_XCNTL_FIFO_EXTENDED

#define ST802RT1A_XCNTL_FIFO_EXTENDED   0x0004

Definition at line 150 of file st802rt1a_driver.h.

◆ ST802RT1A_XCNTL_MII_EN

#define ST802RT1A_XCNTL_MII_EN   0x0200

Definition at line 148 of file st802rt1a_driver.h.

◆ ST802RT1A_XCNTL_RMII_OOBS

#define ST802RT1A_XCNTL_RMII_OOBS   0x0002

Definition at line 151 of file st802rt1a_driver.h.

◆ ST802RT1A_XDCNT

#define ST802RT1A_XDCNT   0x14

Definition at line 54 of file st802rt1a_driver.h.

◆ ST802RT1A_XDCNT_PHY_ADDR

#define ST802RT1A_XDCNT_PHY_ADDR   0x00F8

Definition at line 194 of file st802rt1a_driver.h.

◆ ST802RT1A_XDCNT_PREAMBLE_SUPPR

#define ST802RT1A_XDCNT_PREAMBLE_SUPPR   0x0002

Definition at line 195 of file st802rt1a_driver.h.

◆ ST802RT1A_XRCNT

#define ST802RT1A_XRCNT   0x12

Definition at line 52 of file st802rt1a_driver.h.

◆ ST802RT1A_XRCNT_AN_ACK_DET_EN

#define ST802RT1A_XRCNT_AN_ACK_DET_EN   0x0008

Definition at line 172 of file st802rt1a_driver.h.

◆ ST802RT1A_XRCNT_AN_CMPL_EN

#define ST802RT1A_XRCNT_AN_CMPL_EN   0x0040

Definition at line 169 of file st802rt1a_driver.h.

◆ ST802RT1A_XRCNT_INT_EN

#define ST802RT1A_XRCNT_INT_EN   0x0080

Definition at line 168 of file st802rt1a_driver.h.

◆ ST802RT1A_XRCNT_INT_OE_N

#define ST802RT1A_XRCNT_INT_OE_N   0x0100

Definition at line 167 of file st802rt1a_driver.h.

◆ ST802RT1A_XRCNT_LK_DWN_EN

#define ST802RT1A_XRCNT_LK_DWN_EN   0x0010

Definition at line 171 of file st802rt1a_driver.h.

◆ ST802RT1A_XRCNT_PD_FLT_EN

#define ST802RT1A_XRCNT_PD_FLT_EN   0x0004

Definition at line 173 of file st802rt1a_driver.h.

◆ ST802RT1A_XRCNT_PG_RCVD_EN

#define ST802RT1A_XRCNT_PG_RCVD_EN   0x0002

Definition at line 174 of file st802rt1a_driver.h.

◆ ST802RT1A_XRCNT_REM_FLT_DET_EN

#define ST802RT1A_XRCNT_REM_FLT_DET_EN   0x0020

Definition at line 170 of file st802rt1a_driver.h.

◆ ST802RT1A_XRCNT_RX_FULL_EN

#define ST802RT1A_XRCNT_RX_FULL_EN   0x0001

Definition at line 175 of file st802rt1a_driver.h.

◆ ST802RT1A_XSTAT

#define ST802RT1A_XSTAT   0x11

Definition at line 51 of file st802rt1a_driver.h.

◆ ST802RT1A_XSTAT_AN_ACK_DET_INT

#define ST802RT1A_XSTAT_AN_ACK_DET_INT   0x0008

Definition at line 161 of file st802rt1a_driver.h.

◆ ST802RT1A_XSTAT_AN_CMPL_INT

#define ST802RT1A_XSTAT_AN_CMPL_INT   0x0040

Definition at line 158 of file st802rt1a_driver.h.

◆ ST802RT1A_XSTAT_DUPLEX

#define ST802RT1A_XSTAT_DUPLEX   0x0100

Definition at line 156 of file st802rt1a_driver.h.

◆ ST802RT1A_XSTAT_FX_MODE

#define ST802RT1A_XSTAT_FX_MODE   0x0400

Definition at line 154 of file st802rt1a_driver.h.

◆ ST802RT1A_XSTAT_LK_DWN_INT

#define ST802RT1A_XSTAT_LK_DWN_INT   0x0010

Definition at line 160 of file st802rt1a_driver.h.

◆ ST802RT1A_XSTAT_PAUSE

#define ST802RT1A_XSTAT_PAUSE   0x0080

Definition at line 157 of file st802rt1a_driver.h.

◆ ST802RT1A_XSTAT_PD_FLT_INT

#define ST802RT1A_XSTAT_PD_FLT_INT   0x0004

Definition at line 162 of file st802rt1a_driver.h.

◆ ST802RT1A_XSTAT_PG_RCVD_INT

#define ST802RT1A_XSTAT_PG_RCVD_INT   0x0002

Definition at line 163 of file st802rt1a_driver.h.

◆ ST802RT1A_XSTAT_REM_FLT_DET_INT

#define ST802RT1A_XSTAT_REM_FLT_DET_INT   0x0020

Definition at line 159 of file st802rt1a_driver.h.

◆ ST802RT1A_XSTAT_RX_FULL_INT

#define ST802RT1A_XSTAT_RX_FULL_INT   0x0001

Definition at line 164 of file st802rt1a_driver.h.

◆ ST802RT1A_XSTAT_SPEED

#define ST802RT1A_XSTAT_SPEED   0x0200

Definition at line 155 of file st802rt1a_driver.h.

Function Documentation

◆ st802rt1aDisableIrq()

void st802rt1aDisableIrq ( NetInterface interface)

Disable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 161 of file st802rt1a_driver.c.

◆ st802rt1aDumpPhyReg()

void st802rt1aDumpPhyReg ( NetInterface interface)

Dump PHY registers for debugging purpose.

Parameters
[in]interfaceUnderlying network interface

Definition at line 299 of file st802rt1a_driver.c.

◆ st802rt1aEnableIrq()

void st802rt1aEnableIrq ( NetInterface interface)

Enable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 151 of file st802rt1a_driver.c.

◆ st802rt1aEventHandler()

void st802rt1aEventHandler ( NetInterface interface)

ST802RT1A event handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 171 of file st802rt1a_driver.c.

◆ st802rt1aInit()

error_t st802rt1aInit ( NetInterface interface)

ST802RT1A PHY transceiver initialization.

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 60 of file st802rt1a_driver.c.

◆ st802rt1aInitHook()

void st802rt1aInitHook ( NetInterface interface)

ST802RT1A custom configuration.

Parameters
[in]interfaceUnderlying network interface

Definition at line 107 of file st802rt1a_driver.c.

◆ st802rt1aReadPhyReg()

uint16_t st802rt1aReadPhyReg ( NetInterface interface,
uint8_t  address 
)

Read PHY register.

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

Definition at line 273 of file st802rt1a_driver.c.

◆ st802rt1aTick()

void st802rt1aTick ( NetInterface interface)

ST802RT1A timer handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 117 of file st802rt1a_driver.c.

◆ st802rt1aWritePhyReg()

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

Write PHY register.

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

Definition at line 249 of file st802rt1a_driver.c.

Variable Documentation

◆ st802rt1aPhyDriver

const PhyDriver st802rt1aPhyDriver
extern

ST802RT1A Ethernet PHY driver.

Definition at line 44 of file st802rt1a_driver.c.