st802rt1a_driver.h File Reference

ST802RT1A Ethernet PHY transceiver. More...

#include "core/nic.h"

Go to the source code of this file.

Macros

#define ST802RT1A_PHY_ADDR   1
 
#define ST802RT1A_PHY_REG_RN00   0x00
 
#define ST802RT1A_PHY_REG_RN01   0x01
 
#define ST802RT1A_PHY_REG_RN02   0x02
 
#define ST802RT1A_PHY_REG_RN03   0x03
 
#define ST802RT1A_PHY_REG_RN04   0x04
 
#define ST802RT1A_PHY_REG_RN05   0x05
 
#define ST802RT1A_PHY_REG_RN06   0x06
 
#define ST802RT1A_PHY_REG_RN07   0x07
 
#define ST802RT1A_PHY_REG_RN08   0x08
 
#define ST802RT1A_PHY_REG_RN10   0x10
 
#define ST802RT1A_PHY_REG_RN11   0x11
 
#define ST802RT1A_PHY_REG_RN12   0x12
 
#define ST802RT1A_PHY_REG_RN13   0x13
 
#define ST802RT1A_PHY_REG_RN14   0x14
 
#define ST802RT1A_PHY_REG_RN18   0x18
 
#define ST802RT1A_PHY_REG_RN19   0x19
 
#define ST802RT1A_PHY_REG_RN1B   0x1B
 
#define ST802RT1A_PHY_REG_RN1C   0x1C
 
#define ST802RT1A_PHY_REG_RN1E   0x1E
 
#define ST802RT1A_PHY_REG_RN1F   0x1F
 
#define ST802RT1A_PHY_REG_RS1B   0x1B
 
#define RN00_SOFT_RESET   (1 << 15)
 
#define RN00_LOCAL_LOOPBACK   (1 << 14)
 
#define RN00_SPEED_SEL   (1 << 13)
 
#define RN00_AN_EN   (1 << 12)
 
#define RN00_POWER_DOWN   (1 << 11)
 
#define RN00_ISOLATE   (1 << 10)
 
#define RN00_RESTART_AN   (1 << 9)
 
#define RN00_DUPLEX_MODE   (1 << 8)
 
#define RN00_COL_TEST   (1 << 7)
 
#define RN01_100BT4   (1 << 15)
 
#define RN01_100BTX_FD   (1 << 14)
 
#define RN01_100BTX   (1 << 13)
 
#define RN01_10BT_FD   (1 << 12)
 
#define RN01_10BT   (1 << 11)
 
#define RN01_NO_PREAMBLE   (1 << 6)
 
#define RN01_AN_COMPLETE   (1 << 5)
 
#define RN01_REMOTE_FAULT   (1 << 4)
 
#define RN01_AN_ABLE   (1 << 3)
 
#define RN01_LINK_STATUS   (1 << 2)
 
#define RN01_JABBER_DETECT   (1 << 1)
 
#define RN01_EXTENDED_CAP   (1 << 0)
 
#define RN04_NP   (1 << 15)
 
#define RN04_RF   (1 << 13)
 
#define RN04_ASYM_PAUSE   (1 << 11)
 
#define RN04_PAUSE   (1 << 10)
 
#define RN04_100BT4   (1 << 9)
 
#define RN04_100BTX_FD   (1 << 8)
 
#define RN04100BTX   (1 << 7)
 
#define RN04_10BT_FD   (1 << 6)
 
#define RN04_10BT   (1 << 5)
 
#define RN04_SELECTOR4   (1 << 4)
 
#define RN04_SELECTOR3   (1 << 3)
 
#define RN04_SELECTOR2   (1 << 2)
 
#define RN04_SELECTOR1   (1 << 1)
 
#define RN04_SELECTOR0   (1 << 0)
 
#define RN05_NP   (1 << 15)
 
#define RN05_ACK   (1 << 14)
 
#define RN05_RF   (1 << 13)
 
#define RN05_ASYM_PAUSE   (1 << 11)
 
#define RN05_PAUSE   (1 << 10)
 
#define RN05_100BT4   (1 << 9)
 
#define RN05_100BTX_FD   (1 << 8)
 
#define RN05_100BTX   (1 << 7)
 
#define RN05_10BT_FD   (1 << 6)
 
#define RN05_10BT   (1 << 5)
 
#define RN05_SELECTOR4   (1 << 4)
 
#define RN05_SELECTOR3   (1 << 3)
 
#define RN05_SELECTOR2   (1 << 2)
 
#define RN05_SELECTOR1   (1 << 1)
 
#define RN05_SELECTOR0   (1 << 0)
 
#define RN06_PD_FAULT   (1 << 4)
 
#define RN06_LP_NP_ABLE   (1 << 3)
 
#define RN06_NP_ABLE   (1 << 2)
 
#define RN06_PAGE_RCVD   (1 << 1)
 
#define RN06_LP_AN_ABLE   (1 << 0)
 
#define RN07_NP   (1 << 15)
 
#define RN07_MP   (1 << 13)
 
#define RN07_ACK2   (1 << 12)
 
#define RN07_TOGGLE   (1 << 11)
 
#define RN07_CODE10   (1 << 10)
 
#define RN07_CODE9   (1 << 9)
 
#define RN07_CODE8   (1 << 8)
 
#define RN07_CODE7   (1 << 7)
 
#define RN07_CODE6   (1 << 6)
 
#define RN07_CODE5   (1 << 5)
 
#define RN07_CODE4   (1 << 4)
 
#define RN07_CODE3   (1 << 3)
 
#define RN07_CODE2   (1 << 2)
 
#define RN07_CODE1   (1 << 1)
 
#define RN07_CODE0   (1 << 0)
 
#define RN08_NP   (1 << 15)
 
#define RN08_ACK   (1 << 14)
 
#define RN08_MP   (1 << 13)
 
#define RN08_ACK2   (1 << 12)
 
#define RN08_TOGGLE   (1 << 11)
 
#define RN08_CODE10   (1 << 10)
 
#define RN08_CODE9   (1 << 9)
 
#define RN08_CODE8   (1 << 8)
 
#define RN08_CODE7   (1 << 7)
 
#define RN08_CODE6   (1 << 6)
 
#define RN08_CODE5   (1 << 5)
 
#define RN08_CODE4   (1 << 4)
 
#define RN08_CODE3   (1 << 3)
 
#define RN08_CODE2   (1 << 2)
 
#define RN08_CODE1   (1 << 1)
 
#define RN08_CODE0   (1 << 0)
 
#define RN10_MII_EN   (1 << 9)
 
#define RN10_FEF_EN   (1 << 5)
 
#define RN10_FIFO_EXT   (1 << 2)
 
#define RN10_RMII_OOBS   (1 << 1)
 
#define RN11_FX_MODE   (1 << 10)
 
#define RN11_SPEED   (1 << 9)
 
#define RN11_DUPLEX   (1 << 8)
 
#define RN11_PAUSE   (1 << 7)
 
#define RN11_AN_COMPLETE_INT   (1 << 6)
 
#define RN11_REMOTE_FAULT_INT   (1 << 5)
 
#define RN11_LINK_DOWN_INT   (1 << 4)
 
#define RN11_AN_LCW_RCVD_INT   (1 << 3)
 
#define RN11_PD_FAULT_INT   (1 << 2)
 
#define RN11_PG_RCVD_INT   (1 << 1)
 
#define RN11_RX_FUL_INT   (1 << 0)
 
#define RN12_INT_OE_N   (1 << 8)
 
#define RN12_INT_EN   (1 << 7)
 
#define RN12_AN_COMPLETE_EN   (1 << 6)
 
#define RN12_REMOTE_FAULT_EN   (1 << 5)
 
#define RN12_LINK_DOWN_EN   (1 << 4)
 
#define RN12_AN_LCW_RCVD_EN   (1 << 3)
 
#define RN12_PD_FAULT_EN   (1 << 2)
 
#define RN12_PG_RCVD_EN   (1 << 1)
 
#define RN12_RX_FULL_EN   (1 << 0)
 
#define RN13_RX_ERR_COUNTER_DIS   (1 << 13)
 
#define RN13_AN_COMPLETE   (1 << 12)
 
#define RN13_DC_REST_EN   (1 << 8)
 
#define RN13_NRZ_CONV_EN   (1 << 7)
 
#define RN13_TX_ISOLATE   (1 << 5)
 
#define RN13_CMODE2   (1 << 4)
 
#define RN13_CMODE1   (1 << 3)
 
#define RN13_CMODE0   (1 << 2)
 
#define RN13_MLT3_DIS   (1 << 1)
 
#define RN13_SCRAMBLER_DIS   (1 << 0)
 
#define RN13_CMODE_MASK   (7 << 2)
 
#define RN13_CMODE_AN   (0 << 2)
 
#define RN13_CMODE_10BT   (1 << 2)
 
#define RN13_CMODE_100BTX   (2 << 2)
 
#define RN13_CMODE_10BT_FD   (5 << 2)
 
#define RN13_CMODE_100BTX_FD   (6 << 2)
 
#define RN13_CMODE_TX_ISOLATE   (7 << 2)
 
#define RN14_PHY_ADDR4   (1 << 7)
 
#define RN14_PHY_ADDR3   (1 << 6)
 
#define RN14_PHY_ADDR2   (1 << 5)
 
#define RN14_PHY_ADDR1   (1 << 4)
 
#define RN14_PHY_ADDR0   (1 << 3)
 
#define RN14_NO_PREAMBLE   (1 << 1)
 
#define RN18_JABBER_DIS   (1 << 15)
 
#define RN18_MDIO_PS   (1 << 4)
 
#define RN19_AN_COMPLETE   (1 << 15)
 
#define RN19_AN_ACK   (1 << 14)
 
#define RN19_AN_DETECT   (1 << 13)
 
#define RN19_LP_AN_ABLE_DETECT   (1 << 12)
 
#define RN19_AN_PAUSE   (1 << 11)
 
#define RN19_AN_HCD2   (1 << 10)
 
#define RN19_AN_HCD1   (1 << 9)
 
#define RN19_AN_HCD0   (1 << 8)
 
#define RN19_PD_FAULT   (1 << 7)
 
#define RN19_REMOTE_FAULT   (1 << 6)
 
#define RN19_PAGE_RCVD   (1 << 5)
 
#define RN19_LP_AN_ABLE   (1 << 4)
 
#define RN19_SP100   (1 << 3)
 
#define RN19_LINK_STATUS   (1 << 2)
 
#define RN19_AN_EN   (1 << 1)
 
#define RN19_JABBER_DETECT   (1 << 0)
 
#define RN1B_LED_MODE   (1 << 9)
 
#define RN1B_10BT_ECHO_DIS   (1 << 7)
 
#define RN1B_MI_SQE_DIS   (1 << 3)
 
#define RN1C_MDIX_STATUS   (1 << 13)
 
#define RN1C_MDIX_SWAP   (1 << 12)
 
#define RN1C_MDIX_DIS   (1 << 11)
 
#define RN1C_JABBER_DETECT   (1 << 9)
 
#define RN1C_POLARITY_CHANGED   (1 << 8)
 
#define RN1E_HCD_100BTX_FD   (1 << 15)
 
#define RN1E_HCD_100BT4   (1 << 14)
 
#define RN1E_HCD_100BTX   (1 << 13)
 
#define RN1E_HCD_10BT_FD   (1 << 12)
 
#define RN1E_HCD_10BT   (1 << 11)
 
#define RN1E_AN_RESTART   (1 << 8)
 
#define RN1E_AN_COMPLETE   (1 << 7)
 
#define RN1E_AN_ACK_COMPLETE   (1 << 6)
 
#define RN1E_AN_ACK   (1 << 5)
 
#define RN1E_AN_ABLE   (1 << 4)
 
#define RN1E_SUPER_ISOLATE   (1 << 3)
 
#define RN1F_SHADOW_REG_EN   (1 << 7)
 
#define RS1B_MLT3_DETECT   (1 << 15)
 
#define RS1B_TX_CABLE_LEN2   (1 << 14)
 
#define RS1B_TX_CABLE_LEN1   (1 << 13)
 
#define RS1B_TX_CABLE_LEN0   (1 << 12)
 
#define RS1B_LED_TEST_CTRL   (1 << 10)
 
#define RS1B_DESCRAMBLER_LOCKED   (1 << 9)
 
#define RS1B_FALSE_CARRIER_DETECT   (1 << 8)
 
#define RS1B_BAD_ESD_DETECT   (1 << 7)
 
#define RS1B_RX_ERROR_DETECT   (1 << 6)
 
#define RS1B_LOCK_ERROR_DETECT   (1 << 4)
 
#define RS1B_MLT3_ERROR_DETECT   (1 << 3)
 

Functions

error_t st802rt1aInit (NetInterface *interface)
 ST802RT1A PHY transceiver initialization. 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 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 st802rt1a_driver.h.

Macro Definition Documentation

◆ RN00_AN_EN

#define RN00_AN_EN   (1 << 12)

Definition at line 65 of file st802rt1a_driver.h.

◆ RN00_COL_TEST

#define RN00_COL_TEST   (1 << 7)

Definition at line 70 of file st802rt1a_driver.h.

◆ RN00_DUPLEX_MODE

#define RN00_DUPLEX_MODE   (1 << 8)

Definition at line 69 of file st802rt1a_driver.h.

◆ RN00_ISOLATE

#define RN00_ISOLATE   (1 << 10)

Definition at line 67 of file st802rt1a_driver.h.

◆ RN00_LOCAL_LOOPBACK

#define RN00_LOCAL_LOOPBACK   (1 << 14)

Definition at line 63 of file st802rt1a_driver.h.

◆ RN00_POWER_DOWN

#define RN00_POWER_DOWN   (1 << 11)

Definition at line 66 of file st802rt1a_driver.h.

◆ RN00_RESTART_AN

#define RN00_RESTART_AN   (1 << 9)

Definition at line 68 of file st802rt1a_driver.h.

◆ RN00_SOFT_RESET

#define RN00_SOFT_RESET   (1 << 15)

Definition at line 62 of file st802rt1a_driver.h.

◆ RN00_SPEED_SEL

#define RN00_SPEED_SEL   (1 << 13)

Definition at line 64 of file st802rt1a_driver.h.

◆ RN01_100BT4

#define RN01_100BT4   (1 << 15)

Definition at line 73 of file st802rt1a_driver.h.

◆ RN01_100BTX

#define RN01_100BTX   (1 << 13)

Definition at line 75 of file st802rt1a_driver.h.

◆ RN01_100BTX_FD

#define RN01_100BTX_FD   (1 << 14)

Definition at line 74 of file st802rt1a_driver.h.

◆ RN01_10BT

#define RN01_10BT   (1 << 11)

Definition at line 77 of file st802rt1a_driver.h.

◆ RN01_10BT_FD

#define RN01_10BT_FD   (1 << 12)

Definition at line 76 of file st802rt1a_driver.h.

◆ RN01_AN_ABLE

#define RN01_AN_ABLE   (1 << 3)

Definition at line 81 of file st802rt1a_driver.h.

◆ RN01_AN_COMPLETE

#define RN01_AN_COMPLETE   (1 << 5)

Definition at line 79 of file st802rt1a_driver.h.

◆ RN01_EXTENDED_CAP

#define RN01_EXTENDED_CAP   (1 << 0)

Definition at line 84 of file st802rt1a_driver.h.

◆ RN01_JABBER_DETECT

#define RN01_JABBER_DETECT   (1 << 1)

Definition at line 83 of file st802rt1a_driver.h.

◆ RN01_LINK_STATUS

#define RN01_LINK_STATUS   (1 << 2)

Definition at line 82 of file st802rt1a_driver.h.

◆ RN01_NO_PREAMBLE

#define RN01_NO_PREAMBLE   (1 << 6)

Definition at line 78 of file st802rt1a_driver.h.

◆ RN01_REMOTE_FAULT

#define RN01_REMOTE_FAULT   (1 << 4)

Definition at line 80 of file st802rt1a_driver.h.

◆ RN04100BTX

#define RN04100BTX   (1 << 7)

Definition at line 93 of file st802rt1a_driver.h.

◆ RN04_100BT4

#define RN04_100BT4   (1 << 9)

Definition at line 91 of file st802rt1a_driver.h.

◆ RN04_100BTX_FD

#define RN04_100BTX_FD   (1 << 8)

Definition at line 92 of file st802rt1a_driver.h.

◆ RN04_10BT

#define RN04_10BT   (1 << 5)

Definition at line 95 of file st802rt1a_driver.h.

◆ RN04_10BT_FD

#define RN04_10BT_FD   (1 << 6)

Definition at line 94 of file st802rt1a_driver.h.

◆ RN04_ASYM_PAUSE

#define RN04_ASYM_PAUSE   (1 << 11)

Definition at line 89 of file st802rt1a_driver.h.

◆ RN04_NP

#define RN04_NP   (1 << 15)

Definition at line 87 of file st802rt1a_driver.h.

◆ RN04_PAUSE

#define RN04_PAUSE   (1 << 10)

Definition at line 90 of file st802rt1a_driver.h.

◆ RN04_RF

#define RN04_RF   (1 << 13)

Definition at line 88 of file st802rt1a_driver.h.

◆ RN04_SELECTOR0

#define RN04_SELECTOR0   (1 << 0)

Definition at line 100 of file st802rt1a_driver.h.

◆ RN04_SELECTOR1

#define RN04_SELECTOR1   (1 << 1)

Definition at line 99 of file st802rt1a_driver.h.

◆ RN04_SELECTOR2

#define RN04_SELECTOR2   (1 << 2)

Definition at line 98 of file st802rt1a_driver.h.

◆ RN04_SELECTOR3

#define RN04_SELECTOR3   (1 << 3)

Definition at line 97 of file st802rt1a_driver.h.

◆ RN04_SELECTOR4

#define RN04_SELECTOR4   (1 << 4)

Definition at line 96 of file st802rt1a_driver.h.

◆ RN05_100BT4

#define RN05_100BT4   (1 << 9)

Definition at line 108 of file st802rt1a_driver.h.

◆ RN05_100BTX

#define RN05_100BTX   (1 << 7)

Definition at line 110 of file st802rt1a_driver.h.

◆ RN05_100BTX_FD

#define RN05_100BTX_FD   (1 << 8)

Definition at line 109 of file st802rt1a_driver.h.

◆ RN05_10BT

#define RN05_10BT   (1 << 5)

Definition at line 112 of file st802rt1a_driver.h.

◆ RN05_10BT_FD

#define RN05_10BT_FD   (1 << 6)

Definition at line 111 of file st802rt1a_driver.h.

◆ RN05_ACK

#define RN05_ACK   (1 << 14)

Definition at line 104 of file st802rt1a_driver.h.

◆ RN05_ASYM_PAUSE

#define RN05_ASYM_PAUSE   (1 << 11)

Definition at line 106 of file st802rt1a_driver.h.

◆ RN05_NP

#define RN05_NP   (1 << 15)

Definition at line 103 of file st802rt1a_driver.h.

◆ RN05_PAUSE

#define RN05_PAUSE   (1 << 10)

Definition at line 107 of file st802rt1a_driver.h.

◆ RN05_RF

#define RN05_RF   (1 << 13)

Definition at line 105 of file st802rt1a_driver.h.

◆ RN05_SELECTOR0

#define RN05_SELECTOR0   (1 << 0)

Definition at line 117 of file st802rt1a_driver.h.

◆ RN05_SELECTOR1

#define RN05_SELECTOR1   (1 << 1)

Definition at line 116 of file st802rt1a_driver.h.

◆ RN05_SELECTOR2

#define RN05_SELECTOR2   (1 << 2)

Definition at line 115 of file st802rt1a_driver.h.

◆ RN05_SELECTOR3

#define RN05_SELECTOR3   (1 << 3)

Definition at line 114 of file st802rt1a_driver.h.

◆ RN05_SELECTOR4

#define RN05_SELECTOR4   (1 << 4)

Definition at line 113 of file st802rt1a_driver.h.

◆ RN06_LP_AN_ABLE

#define RN06_LP_AN_ABLE   (1 << 0)

Definition at line 124 of file st802rt1a_driver.h.

◆ RN06_LP_NP_ABLE

#define RN06_LP_NP_ABLE   (1 << 3)

Definition at line 121 of file st802rt1a_driver.h.

◆ RN06_NP_ABLE

#define RN06_NP_ABLE   (1 << 2)

Definition at line 122 of file st802rt1a_driver.h.

◆ RN06_PAGE_RCVD

#define RN06_PAGE_RCVD   (1 << 1)

Definition at line 123 of file st802rt1a_driver.h.

◆ RN06_PD_FAULT

#define RN06_PD_FAULT   (1 << 4)

Definition at line 120 of file st802rt1a_driver.h.

◆ RN07_ACK2

#define RN07_ACK2   (1 << 12)

Definition at line 129 of file st802rt1a_driver.h.

◆ RN07_CODE0

#define RN07_CODE0   (1 << 0)

Definition at line 141 of file st802rt1a_driver.h.

◆ RN07_CODE1

#define RN07_CODE1   (1 << 1)

Definition at line 140 of file st802rt1a_driver.h.

◆ RN07_CODE10

#define RN07_CODE10   (1 << 10)

Definition at line 131 of file st802rt1a_driver.h.

◆ RN07_CODE2

#define RN07_CODE2   (1 << 2)

Definition at line 139 of file st802rt1a_driver.h.

◆ RN07_CODE3

#define RN07_CODE3   (1 << 3)

Definition at line 138 of file st802rt1a_driver.h.

◆ RN07_CODE4

#define RN07_CODE4   (1 << 4)

Definition at line 137 of file st802rt1a_driver.h.

◆ RN07_CODE5

#define RN07_CODE5   (1 << 5)

Definition at line 136 of file st802rt1a_driver.h.

◆ RN07_CODE6

#define RN07_CODE6   (1 << 6)

Definition at line 135 of file st802rt1a_driver.h.

◆ RN07_CODE7

#define RN07_CODE7   (1 << 7)

Definition at line 134 of file st802rt1a_driver.h.

◆ RN07_CODE8

#define RN07_CODE8   (1 << 8)

Definition at line 133 of file st802rt1a_driver.h.

◆ RN07_CODE9

#define RN07_CODE9   (1 << 9)

Definition at line 132 of file st802rt1a_driver.h.

◆ RN07_MP

#define RN07_MP   (1 << 13)

Definition at line 128 of file st802rt1a_driver.h.

◆ RN07_NP

#define RN07_NP   (1 << 15)

Definition at line 127 of file st802rt1a_driver.h.

◆ RN07_TOGGLE

#define RN07_TOGGLE   (1 << 11)

Definition at line 130 of file st802rt1a_driver.h.

◆ RN08_ACK

#define RN08_ACK   (1 << 14)

Definition at line 145 of file st802rt1a_driver.h.

◆ RN08_ACK2

#define RN08_ACK2   (1 << 12)

Definition at line 147 of file st802rt1a_driver.h.

◆ RN08_CODE0

#define RN08_CODE0   (1 << 0)

Definition at line 159 of file st802rt1a_driver.h.

◆ RN08_CODE1

#define RN08_CODE1   (1 << 1)

Definition at line 158 of file st802rt1a_driver.h.

◆ RN08_CODE10

#define RN08_CODE10   (1 << 10)

Definition at line 149 of file st802rt1a_driver.h.

◆ RN08_CODE2

#define RN08_CODE2   (1 << 2)

Definition at line 157 of file st802rt1a_driver.h.

◆ RN08_CODE3

#define RN08_CODE3   (1 << 3)

Definition at line 156 of file st802rt1a_driver.h.

◆ RN08_CODE4

#define RN08_CODE4   (1 << 4)

Definition at line 155 of file st802rt1a_driver.h.

◆ RN08_CODE5

#define RN08_CODE5   (1 << 5)

Definition at line 154 of file st802rt1a_driver.h.

◆ RN08_CODE6

#define RN08_CODE6   (1 << 6)

Definition at line 153 of file st802rt1a_driver.h.

◆ RN08_CODE7

#define RN08_CODE7   (1 << 7)

Definition at line 152 of file st802rt1a_driver.h.

◆ RN08_CODE8

#define RN08_CODE8   (1 << 8)

Definition at line 151 of file st802rt1a_driver.h.

◆ RN08_CODE9

#define RN08_CODE9   (1 << 9)

Definition at line 150 of file st802rt1a_driver.h.

◆ RN08_MP

#define RN08_MP   (1 << 13)

Definition at line 146 of file st802rt1a_driver.h.

◆ RN08_NP

#define RN08_NP   (1 << 15)

Definition at line 144 of file st802rt1a_driver.h.

◆ RN08_TOGGLE

#define RN08_TOGGLE   (1 << 11)

Definition at line 148 of file st802rt1a_driver.h.

◆ RN10_FEF_EN

#define RN10_FEF_EN   (1 << 5)

Definition at line 163 of file st802rt1a_driver.h.

◆ RN10_FIFO_EXT

#define RN10_FIFO_EXT   (1 << 2)

Definition at line 164 of file st802rt1a_driver.h.

◆ RN10_MII_EN

#define RN10_MII_EN   (1 << 9)

Definition at line 162 of file st802rt1a_driver.h.

◆ RN10_RMII_OOBS

#define RN10_RMII_OOBS   (1 << 1)

Definition at line 165 of file st802rt1a_driver.h.

◆ RN11_AN_COMPLETE_INT

#define RN11_AN_COMPLETE_INT   (1 << 6)

Definition at line 172 of file st802rt1a_driver.h.

◆ RN11_AN_LCW_RCVD_INT

#define RN11_AN_LCW_RCVD_INT   (1 << 3)

Definition at line 175 of file st802rt1a_driver.h.

◆ RN11_DUPLEX

#define RN11_DUPLEX   (1 << 8)

Definition at line 170 of file st802rt1a_driver.h.

◆ RN11_FX_MODE

#define RN11_FX_MODE   (1 << 10)

Definition at line 168 of file st802rt1a_driver.h.

◆ RN11_LINK_DOWN_INT

#define RN11_LINK_DOWN_INT   (1 << 4)

Definition at line 174 of file st802rt1a_driver.h.

◆ RN11_PAUSE

#define RN11_PAUSE   (1 << 7)

Definition at line 171 of file st802rt1a_driver.h.

◆ RN11_PD_FAULT_INT

#define RN11_PD_FAULT_INT   (1 << 2)

Definition at line 176 of file st802rt1a_driver.h.

◆ RN11_PG_RCVD_INT

#define RN11_PG_RCVD_INT   (1 << 1)

Definition at line 177 of file st802rt1a_driver.h.

◆ RN11_REMOTE_FAULT_INT

#define RN11_REMOTE_FAULT_INT   (1 << 5)

Definition at line 173 of file st802rt1a_driver.h.

◆ RN11_RX_FUL_INT

#define RN11_RX_FUL_INT   (1 << 0)

Definition at line 178 of file st802rt1a_driver.h.

◆ RN11_SPEED

#define RN11_SPEED   (1 << 9)

Definition at line 169 of file st802rt1a_driver.h.

◆ RN12_AN_COMPLETE_EN

#define RN12_AN_COMPLETE_EN   (1 << 6)

Definition at line 183 of file st802rt1a_driver.h.

◆ RN12_AN_LCW_RCVD_EN

#define RN12_AN_LCW_RCVD_EN   (1 << 3)

Definition at line 186 of file st802rt1a_driver.h.

◆ RN12_INT_EN

#define RN12_INT_EN   (1 << 7)

Definition at line 182 of file st802rt1a_driver.h.

◆ RN12_INT_OE_N

#define RN12_INT_OE_N   (1 << 8)

Definition at line 181 of file st802rt1a_driver.h.

◆ RN12_LINK_DOWN_EN

#define RN12_LINK_DOWN_EN   (1 << 4)

Definition at line 185 of file st802rt1a_driver.h.

◆ RN12_PD_FAULT_EN

#define RN12_PD_FAULT_EN   (1 << 2)

Definition at line 187 of file st802rt1a_driver.h.

◆ RN12_PG_RCVD_EN

#define RN12_PG_RCVD_EN   (1 << 1)

Definition at line 188 of file st802rt1a_driver.h.

◆ RN12_REMOTE_FAULT_EN

#define RN12_REMOTE_FAULT_EN   (1 << 5)

Definition at line 184 of file st802rt1a_driver.h.

◆ RN12_RX_FULL_EN

#define RN12_RX_FULL_EN   (1 << 0)

Definition at line 189 of file st802rt1a_driver.h.

◆ RN13_AN_COMPLETE

#define RN13_AN_COMPLETE   (1 << 12)

Definition at line 193 of file st802rt1a_driver.h.

◆ RN13_CMODE0

#define RN13_CMODE0   (1 << 2)

Definition at line 199 of file st802rt1a_driver.h.

◆ RN13_CMODE1

#define RN13_CMODE1   (1 << 3)

Definition at line 198 of file st802rt1a_driver.h.

◆ RN13_CMODE2

#define RN13_CMODE2   (1 << 4)

Definition at line 197 of file st802rt1a_driver.h.

◆ RN13_CMODE_100BTX

#define RN13_CMODE_100BTX   (2 << 2)

Definition at line 206 of file st802rt1a_driver.h.

◆ RN13_CMODE_100BTX_FD

#define RN13_CMODE_100BTX_FD   (6 << 2)

Definition at line 208 of file st802rt1a_driver.h.

◆ RN13_CMODE_10BT

#define RN13_CMODE_10BT   (1 << 2)

Definition at line 205 of file st802rt1a_driver.h.

◆ RN13_CMODE_10BT_FD

#define RN13_CMODE_10BT_FD   (5 << 2)

Definition at line 207 of file st802rt1a_driver.h.

◆ RN13_CMODE_AN

#define RN13_CMODE_AN   (0 << 2)

Definition at line 204 of file st802rt1a_driver.h.

◆ RN13_CMODE_MASK

#define RN13_CMODE_MASK   (7 << 2)

Definition at line 203 of file st802rt1a_driver.h.

◆ RN13_CMODE_TX_ISOLATE

#define RN13_CMODE_TX_ISOLATE   (7 << 2)

Definition at line 209 of file st802rt1a_driver.h.

◆ RN13_DC_REST_EN

#define RN13_DC_REST_EN   (1 << 8)

Definition at line 194 of file st802rt1a_driver.h.

◆ RN13_MLT3_DIS

#define RN13_MLT3_DIS   (1 << 1)

Definition at line 200 of file st802rt1a_driver.h.

◆ RN13_NRZ_CONV_EN

#define RN13_NRZ_CONV_EN   (1 << 7)

Definition at line 195 of file st802rt1a_driver.h.

◆ RN13_RX_ERR_COUNTER_DIS

#define RN13_RX_ERR_COUNTER_DIS   (1 << 13)

Definition at line 192 of file st802rt1a_driver.h.

◆ RN13_SCRAMBLER_DIS

#define RN13_SCRAMBLER_DIS   (1 << 0)

Definition at line 201 of file st802rt1a_driver.h.

◆ RN13_TX_ISOLATE

#define RN13_TX_ISOLATE   (1 << 5)

Definition at line 196 of file st802rt1a_driver.h.

◆ RN14_NO_PREAMBLE

#define RN14_NO_PREAMBLE   (1 << 1)

Definition at line 217 of file st802rt1a_driver.h.

◆ RN14_PHY_ADDR0

#define RN14_PHY_ADDR0   (1 << 3)

Definition at line 216 of file st802rt1a_driver.h.

◆ RN14_PHY_ADDR1

#define RN14_PHY_ADDR1   (1 << 4)

Definition at line 215 of file st802rt1a_driver.h.

◆ RN14_PHY_ADDR2

#define RN14_PHY_ADDR2   (1 << 5)

Definition at line 214 of file st802rt1a_driver.h.

◆ RN14_PHY_ADDR3

#define RN14_PHY_ADDR3   (1 << 6)

Definition at line 213 of file st802rt1a_driver.h.

◆ RN14_PHY_ADDR4

#define RN14_PHY_ADDR4   (1 << 7)

Definition at line 212 of file st802rt1a_driver.h.

◆ RN18_JABBER_DIS

#define RN18_JABBER_DIS   (1 << 15)

Definition at line 220 of file st802rt1a_driver.h.

◆ RN18_MDIO_PS

#define RN18_MDIO_PS   (1 << 4)

Definition at line 221 of file st802rt1a_driver.h.

◆ RN19_AN_ACK

#define RN19_AN_ACK   (1 << 14)

Definition at line 225 of file st802rt1a_driver.h.

◆ RN19_AN_COMPLETE

#define RN19_AN_COMPLETE   (1 << 15)

Definition at line 224 of file st802rt1a_driver.h.

◆ RN19_AN_DETECT

#define RN19_AN_DETECT   (1 << 13)

Definition at line 226 of file st802rt1a_driver.h.

◆ RN19_AN_EN

#define RN19_AN_EN   (1 << 1)

Definition at line 238 of file st802rt1a_driver.h.

◆ RN19_AN_HCD0

#define RN19_AN_HCD0   (1 << 8)

Definition at line 231 of file st802rt1a_driver.h.

◆ RN19_AN_HCD1

#define RN19_AN_HCD1   (1 << 9)

Definition at line 230 of file st802rt1a_driver.h.

◆ RN19_AN_HCD2

#define RN19_AN_HCD2   (1 << 10)

Definition at line 229 of file st802rt1a_driver.h.

◆ RN19_AN_PAUSE

#define RN19_AN_PAUSE   (1 << 11)

Definition at line 228 of file st802rt1a_driver.h.

◆ RN19_JABBER_DETECT

#define RN19_JABBER_DETECT   (1 << 0)

Definition at line 239 of file st802rt1a_driver.h.

◆ RN19_LINK_STATUS

#define RN19_LINK_STATUS   (1 << 2)

Definition at line 237 of file st802rt1a_driver.h.

◆ RN19_LP_AN_ABLE

#define RN19_LP_AN_ABLE   (1 << 4)

Definition at line 235 of file st802rt1a_driver.h.

◆ RN19_LP_AN_ABLE_DETECT

#define RN19_LP_AN_ABLE_DETECT   (1 << 12)

Definition at line 227 of file st802rt1a_driver.h.

◆ RN19_PAGE_RCVD

#define RN19_PAGE_RCVD   (1 << 5)

Definition at line 234 of file st802rt1a_driver.h.

◆ RN19_PD_FAULT

#define RN19_PD_FAULT   (1 << 7)

Definition at line 232 of file st802rt1a_driver.h.

◆ RN19_REMOTE_FAULT

#define RN19_REMOTE_FAULT   (1 << 6)

Definition at line 233 of file st802rt1a_driver.h.

◆ RN19_SP100

#define RN19_SP100   (1 << 3)

Definition at line 236 of file st802rt1a_driver.h.

◆ RN1B_10BT_ECHO_DIS

#define RN1B_10BT_ECHO_DIS   (1 << 7)

Definition at line 243 of file st802rt1a_driver.h.

◆ RN1B_LED_MODE

#define RN1B_LED_MODE   (1 << 9)

Definition at line 242 of file st802rt1a_driver.h.

◆ RN1B_MI_SQE_DIS

#define RN1B_MI_SQE_DIS   (1 << 3)

Definition at line 244 of file st802rt1a_driver.h.

◆ RN1C_JABBER_DETECT

#define RN1C_JABBER_DETECT   (1 << 9)

Definition at line 250 of file st802rt1a_driver.h.

◆ RN1C_MDIX_DIS

#define RN1C_MDIX_DIS   (1 << 11)

Definition at line 249 of file st802rt1a_driver.h.

◆ RN1C_MDIX_STATUS

#define RN1C_MDIX_STATUS   (1 << 13)

Definition at line 247 of file st802rt1a_driver.h.

◆ RN1C_MDIX_SWAP

#define RN1C_MDIX_SWAP   (1 << 12)

Definition at line 248 of file st802rt1a_driver.h.

◆ RN1C_POLARITY_CHANGED

#define RN1C_POLARITY_CHANGED   (1 << 8)

Definition at line 251 of file st802rt1a_driver.h.

◆ RN1E_AN_ABLE

#define RN1E_AN_ABLE   (1 << 4)

Definition at line 263 of file st802rt1a_driver.h.

◆ RN1E_AN_ACK

#define RN1E_AN_ACK   (1 << 5)

Definition at line 262 of file st802rt1a_driver.h.

◆ RN1E_AN_ACK_COMPLETE

#define RN1E_AN_ACK_COMPLETE   (1 << 6)

Definition at line 261 of file st802rt1a_driver.h.

◆ RN1E_AN_COMPLETE

#define RN1E_AN_COMPLETE   (1 << 7)

Definition at line 260 of file st802rt1a_driver.h.

◆ RN1E_AN_RESTART

#define RN1E_AN_RESTART   (1 << 8)

Definition at line 259 of file st802rt1a_driver.h.

◆ RN1E_HCD_100BT4

#define RN1E_HCD_100BT4   (1 << 14)

Definition at line 255 of file st802rt1a_driver.h.

◆ RN1E_HCD_100BTX

#define RN1E_HCD_100BTX   (1 << 13)

Definition at line 256 of file st802rt1a_driver.h.

◆ RN1E_HCD_100BTX_FD

#define RN1E_HCD_100BTX_FD   (1 << 15)

Definition at line 254 of file st802rt1a_driver.h.

◆ RN1E_HCD_10BT

#define RN1E_HCD_10BT   (1 << 11)

Definition at line 258 of file st802rt1a_driver.h.

◆ RN1E_HCD_10BT_FD

#define RN1E_HCD_10BT_FD   (1 << 12)

Definition at line 257 of file st802rt1a_driver.h.

◆ RN1E_SUPER_ISOLATE

#define RN1E_SUPER_ISOLATE   (1 << 3)

Definition at line 264 of file st802rt1a_driver.h.

◆ RN1F_SHADOW_REG_EN

#define RN1F_SHADOW_REG_EN   (1 << 7)

Definition at line 267 of file st802rt1a_driver.h.

◆ RS1B_BAD_ESD_DETECT

#define RS1B_BAD_ESD_DETECT   (1 << 7)

Definition at line 277 of file st802rt1a_driver.h.

◆ RS1B_DESCRAMBLER_LOCKED

#define RS1B_DESCRAMBLER_LOCKED   (1 << 9)

Definition at line 275 of file st802rt1a_driver.h.

◆ RS1B_FALSE_CARRIER_DETECT

#define RS1B_FALSE_CARRIER_DETECT   (1 << 8)

Definition at line 276 of file st802rt1a_driver.h.

◆ RS1B_LED_TEST_CTRL

#define RS1B_LED_TEST_CTRL   (1 << 10)

Definition at line 274 of file st802rt1a_driver.h.

◆ RS1B_LOCK_ERROR_DETECT

#define RS1B_LOCK_ERROR_DETECT   (1 << 4)

Definition at line 279 of file st802rt1a_driver.h.

◆ RS1B_MLT3_DETECT

#define RS1B_MLT3_DETECT   (1 << 15)

Definition at line 270 of file st802rt1a_driver.h.

◆ RS1B_MLT3_ERROR_DETECT

#define RS1B_MLT3_ERROR_DETECT   (1 << 3)

Definition at line 280 of file st802rt1a_driver.h.

◆ RS1B_RX_ERROR_DETECT

#define RS1B_RX_ERROR_DETECT   (1 << 6)

Definition at line 278 of file st802rt1a_driver.h.

◆ RS1B_TX_CABLE_LEN0

#define RS1B_TX_CABLE_LEN0   (1 << 12)

Definition at line 273 of file st802rt1a_driver.h.

◆ RS1B_TX_CABLE_LEN1

#define RS1B_TX_CABLE_LEN1   (1 << 13)

Definition at line 272 of file st802rt1a_driver.h.

◆ RS1B_TX_CABLE_LEN2

#define RS1B_TX_CABLE_LEN2   (1 << 14)

Definition at line 271 of file st802rt1a_driver.h.

◆ ST802RT1A_PHY_ADDR

#define ST802RT1A_PHY_ADDR   1

Definition at line 36 of file st802rt1a_driver.h.

◆ ST802RT1A_PHY_REG_RN00

#define ST802RT1A_PHY_REG_RN00   0x00

Definition at line 39 of file st802rt1a_driver.h.

◆ ST802RT1A_PHY_REG_RN01

#define ST802RT1A_PHY_REG_RN01   0x01

Definition at line 40 of file st802rt1a_driver.h.

◆ ST802RT1A_PHY_REG_RN02

#define ST802RT1A_PHY_REG_RN02   0x02

Definition at line 41 of file st802rt1a_driver.h.

◆ ST802RT1A_PHY_REG_RN03

#define ST802RT1A_PHY_REG_RN03   0x03

Definition at line 42 of file st802rt1a_driver.h.

◆ ST802RT1A_PHY_REG_RN04

#define ST802RT1A_PHY_REG_RN04   0x04

Definition at line 43 of file st802rt1a_driver.h.

◆ ST802RT1A_PHY_REG_RN05

#define ST802RT1A_PHY_REG_RN05   0x05

Definition at line 44 of file st802rt1a_driver.h.

◆ ST802RT1A_PHY_REG_RN06

#define ST802RT1A_PHY_REG_RN06   0x06

Definition at line 45 of file st802rt1a_driver.h.

◆ ST802RT1A_PHY_REG_RN07

#define ST802RT1A_PHY_REG_RN07   0x07

Definition at line 46 of file st802rt1a_driver.h.

◆ ST802RT1A_PHY_REG_RN08

#define ST802RT1A_PHY_REG_RN08   0x08

Definition at line 47 of file st802rt1a_driver.h.

◆ ST802RT1A_PHY_REG_RN10

#define ST802RT1A_PHY_REG_RN10   0x10

Definition at line 48 of file st802rt1a_driver.h.

◆ ST802RT1A_PHY_REG_RN11

#define ST802RT1A_PHY_REG_RN11   0x11

Definition at line 49 of file st802rt1a_driver.h.

◆ ST802RT1A_PHY_REG_RN12

#define ST802RT1A_PHY_REG_RN12   0x12

Definition at line 50 of file st802rt1a_driver.h.

◆ ST802RT1A_PHY_REG_RN13

#define ST802RT1A_PHY_REG_RN13   0x13

Definition at line 51 of file st802rt1a_driver.h.

◆ ST802RT1A_PHY_REG_RN14

#define ST802RT1A_PHY_REG_RN14   0x14

Definition at line 52 of file st802rt1a_driver.h.

◆ ST802RT1A_PHY_REG_RN18

#define ST802RT1A_PHY_REG_RN18   0x18

Definition at line 53 of file st802rt1a_driver.h.

◆ ST802RT1A_PHY_REG_RN19

#define ST802RT1A_PHY_REG_RN19   0x19

Definition at line 54 of file st802rt1a_driver.h.

◆ ST802RT1A_PHY_REG_RN1B

#define ST802RT1A_PHY_REG_RN1B   0x1B

Definition at line 55 of file st802rt1a_driver.h.

◆ ST802RT1A_PHY_REG_RN1C

#define ST802RT1A_PHY_REG_RN1C   0x1C

Definition at line 56 of file st802rt1a_driver.h.

◆ ST802RT1A_PHY_REG_RN1E

#define ST802RT1A_PHY_REG_RN1E   0x1E

Definition at line 57 of file st802rt1a_driver.h.

◆ ST802RT1A_PHY_REG_RN1F

#define ST802RT1A_PHY_REG_RN1F   0x1F

Definition at line 58 of file st802rt1a_driver.h.

◆ ST802RT1A_PHY_REG_RS1B

#define ST802RT1A_PHY_REG_RS1B   0x1B

Definition at line 59 of file st802rt1a_driver.h.

Function Documentation

◆ st802rt1aDisableIrq()

void st802rt1aDisableIrq ( NetInterface interface)

Disable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 130 of file st802rt1a_driver.c.

◆ st802rt1aDumpPhyReg()

void st802rt1aDumpPhyReg ( NetInterface interface)

Dump PHY registers for debugging purpose.

Parameters
[in]interfaceUnderlying network interface

Definition at line 256 of file st802rt1a_driver.c.

◆ st802rt1aEnableIrq()

void st802rt1aEnableIrq ( NetInterface interface)

Enable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 120 of file st802rt1a_driver.c.

◆ st802rt1aEventHandler()

void st802rt1aEventHandler ( NetInterface interface)

ST802RT1A event handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 140 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 58 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 236 of file st802rt1a_driver.c.

◆ st802rt1aTick()

void st802rt1aTick ( NetInterface interface)

ST802RT1A timer handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 86 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 214 of file st802rt1a_driver.c.

Variable Documentation

◆ st802rt1aPhyDriver

const PhyDriver st802rt1aPhyDriver

ST802RT1A Ethernet PHY driver.

Definition at line 42 of file st802rt1a_driver.c.