Webserver+3d print

Dependents:   Nucleo

Committer:
Sergunb
Date:
Sat Feb 04 18:15:49 2017 +0000
Revision:
0:8918a71cdbe9
nothing else

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Sergunb 0:8918a71cdbe9 1 /**
Sergunb 0:8918a71cdbe9 2 * @file st802rt1a.h
Sergunb 0:8918a71cdbe9 3 * @brief ST802RT1A Ethernet PHY transceiver
Sergunb 0:8918a71cdbe9 4 *
Sergunb 0:8918a71cdbe9 5 * @section License
Sergunb 0:8918a71cdbe9 6 *
Sergunb 0:8918a71cdbe9 7 * Copyright (C) 2010-2017 Oryx Embedded SARL. All rights reserved.
Sergunb 0:8918a71cdbe9 8 *
Sergunb 0:8918a71cdbe9 9 * This file is part of CycloneTCP Open.
Sergunb 0:8918a71cdbe9 10 *
Sergunb 0:8918a71cdbe9 11 * This program is free software; you can redistribute it and/or
Sergunb 0:8918a71cdbe9 12 * modify it under the terms of the GNU General Public License
Sergunb 0:8918a71cdbe9 13 * as published by the Free Software Foundation; either version 2
Sergunb 0:8918a71cdbe9 14 * of the License, or (at your option) any later version.
Sergunb 0:8918a71cdbe9 15 *
Sergunb 0:8918a71cdbe9 16 * This program is distributed in the hope that it will be useful,
Sergunb 0:8918a71cdbe9 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Sergunb 0:8918a71cdbe9 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Sergunb 0:8918a71cdbe9 19 * GNU General Public License for more details.
Sergunb 0:8918a71cdbe9 20 *
Sergunb 0:8918a71cdbe9 21 * You should have received a copy of the GNU General Public License
Sergunb 0:8918a71cdbe9 22 * along with this program; if not, write to the Free Software Foundation,
Sergunb 0:8918a71cdbe9 23 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Sergunb 0:8918a71cdbe9 24 *
Sergunb 0:8918a71cdbe9 25 * @author Oryx Embedded SARL (www.oryx-embedded.com)
Sergunb 0:8918a71cdbe9 26 * @version 1.7.6
Sergunb 0:8918a71cdbe9 27 **/
Sergunb 0:8918a71cdbe9 28
Sergunb 0:8918a71cdbe9 29 #ifndef _ST802RT1A_H
Sergunb 0:8918a71cdbe9 30 #define _ST802RT1A_H
Sergunb 0:8918a71cdbe9 31
Sergunb 0:8918a71cdbe9 32 //Dependencies
Sergunb 0:8918a71cdbe9 33 #include "core/nic.h"
Sergunb 0:8918a71cdbe9 34
Sergunb 0:8918a71cdbe9 35 //PHY address
Sergunb 0:8918a71cdbe9 36 #define ST802RT1A_PHY_ADDR 1
Sergunb 0:8918a71cdbe9 37
Sergunb 0:8918a71cdbe9 38 //ST802RT1A registers
Sergunb 0:8918a71cdbe9 39 #define ST802RT1A_PHY_REG_RN00 0x00
Sergunb 0:8918a71cdbe9 40 #define ST802RT1A_PHY_REG_RN01 0x01
Sergunb 0:8918a71cdbe9 41 #define ST802RT1A_PHY_REG_RN02 0x02
Sergunb 0:8918a71cdbe9 42 #define ST802RT1A_PHY_REG_RN03 0x03
Sergunb 0:8918a71cdbe9 43 #define ST802RT1A_PHY_REG_RN04 0x04
Sergunb 0:8918a71cdbe9 44 #define ST802RT1A_PHY_REG_RN05 0x05
Sergunb 0:8918a71cdbe9 45 #define ST802RT1A_PHY_REG_RN06 0x06
Sergunb 0:8918a71cdbe9 46 #define ST802RT1A_PHY_REG_RN07 0x07
Sergunb 0:8918a71cdbe9 47 #define ST802RT1A_PHY_REG_RN08 0x08
Sergunb 0:8918a71cdbe9 48 #define ST802RT1A_PHY_REG_RN10 0x10
Sergunb 0:8918a71cdbe9 49 #define ST802RT1A_PHY_REG_RN11 0x11
Sergunb 0:8918a71cdbe9 50 #define ST802RT1A_PHY_REG_RN12 0x12
Sergunb 0:8918a71cdbe9 51 #define ST802RT1A_PHY_REG_RN13 0x13
Sergunb 0:8918a71cdbe9 52 #define ST802RT1A_PHY_REG_RN14 0x14
Sergunb 0:8918a71cdbe9 53 #define ST802RT1A_PHY_REG_RN18 0x18
Sergunb 0:8918a71cdbe9 54 #define ST802RT1A_PHY_REG_RN19 0x19
Sergunb 0:8918a71cdbe9 55 #define ST802RT1A_PHY_REG_RN1B 0x1B
Sergunb 0:8918a71cdbe9 56 #define ST802RT1A_PHY_REG_RN1C 0x1C
Sergunb 0:8918a71cdbe9 57 #define ST802RT1A_PHY_REG_RN1E 0x1E
Sergunb 0:8918a71cdbe9 58 #define ST802RT1A_PHY_REG_RN1F 0x1F
Sergunb 0:8918a71cdbe9 59 #define ST802RT1A_PHY_REG_RS1B 0x1B
Sergunb 0:8918a71cdbe9 60
Sergunb 0:8918a71cdbe9 61 //RN00 register
Sergunb 0:8918a71cdbe9 62 #define RN00_SOFT_RESET (1 << 15)
Sergunb 0:8918a71cdbe9 63 #define RN00_LOCAL_LOOPBACK (1 << 14)
Sergunb 0:8918a71cdbe9 64 #define RN00_SPEED_SEL (1 << 13)
Sergunb 0:8918a71cdbe9 65 #define RN00_AN_EN (1 << 12)
Sergunb 0:8918a71cdbe9 66 #define RN00_POWER_DOWN (1 << 11)
Sergunb 0:8918a71cdbe9 67 #define RN00_ISOLATE (1 << 10)
Sergunb 0:8918a71cdbe9 68 #define RN00_RESTART_AN (1 << 9)
Sergunb 0:8918a71cdbe9 69 #define RN00_DUPLEX_MODE (1 << 8)
Sergunb 0:8918a71cdbe9 70 #define RN00_COL_TEST (1 << 7)
Sergunb 0:8918a71cdbe9 71
Sergunb 0:8918a71cdbe9 72 //RN01 register
Sergunb 0:8918a71cdbe9 73 #define RN01_100BT4 (1 << 15)
Sergunb 0:8918a71cdbe9 74 #define RN01_100BTX_FD (1 << 14)
Sergunb 0:8918a71cdbe9 75 #define RN01_100BTX (1 << 13)
Sergunb 0:8918a71cdbe9 76 #define RN01_10BT_FD (1 << 12)
Sergunb 0:8918a71cdbe9 77 #define RN01_10BT (1 << 11)
Sergunb 0:8918a71cdbe9 78 #define RN01_NO_PREAMBLE (1 << 6)
Sergunb 0:8918a71cdbe9 79 #define RN01_AN_COMPLETE (1 << 5)
Sergunb 0:8918a71cdbe9 80 #define RN01_REMOTE_FAULT (1 << 4)
Sergunb 0:8918a71cdbe9 81 #define RN01_AN_ABLE (1 << 3)
Sergunb 0:8918a71cdbe9 82 #define RN01_LINK_STATUS (1 << 2)
Sergunb 0:8918a71cdbe9 83 #define RN01_JABBER_DETECT (1 << 1)
Sergunb 0:8918a71cdbe9 84 #define RN01_EXTENDED_CAP (1 << 0)
Sergunb 0:8918a71cdbe9 85
Sergunb 0:8918a71cdbe9 86 //RN04 register
Sergunb 0:8918a71cdbe9 87 #define RN04_NP (1 << 15)
Sergunb 0:8918a71cdbe9 88 #define RN04_RF (1 << 13)
Sergunb 0:8918a71cdbe9 89 #define RN04_ASYM_PAUSE (1 << 11)
Sergunb 0:8918a71cdbe9 90 #define RN04_PAUSE (1 << 10)
Sergunb 0:8918a71cdbe9 91 #define RN04_100BT4 (1 << 9)
Sergunb 0:8918a71cdbe9 92 #define RN04_100BTX_FD (1 << 8)
Sergunb 0:8918a71cdbe9 93 #define RN04100BTX (1 << 7)
Sergunb 0:8918a71cdbe9 94 #define RN04_10BT_FD (1 << 6)
Sergunb 0:8918a71cdbe9 95 #define RN04_10BT (1 << 5)
Sergunb 0:8918a71cdbe9 96 #define RN04_SELECTOR4 (1 << 4)
Sergunb 0:8918a71cdbe9 97 #define RN04_SELECTOR3 (1 << 3)
Sergunb 0:8918a71cdbe9 98 #define RN04_SELECTOR2 (1 << 2)
Sergunb 0:8918a71cdbe9 99 #define RN04_SELECTOR1 (1 << 1)
Sergunb 0:8918a71cdbe9 100 #define RN04_SELECTOR0 (1 << 0)
Sergunb 0:8918a71cdbe9 101
Sergunb 0:8918a71cdbe9 102 //RN05 register
Sergunb 0:8918a71cdbe9 103 #define RN05_NP (1 << 15)
Sergunb 0:8918a71cdbe9 104 #define RN05_ACK (1 << 14)
Sergunb 0:8918a71cdbe9 105 #define RN05_RF (1 << 13)
Sergunb 0:8918a71cdbe9 106 #define RN05_ASYM_PAUSE (1 << 11)
Sergunb 0:8918a71cdbe9 107 #define RN05_PAUSE (1 << 10)
Sergunb 0:8918a71cdbe9 108 #define RN05_100BT4 (1 << 9)
Sergunb 0:8918a71cdbe9 109 #define RN05_100BTX_FD (1 << 8)
Sergunb 0:8918a71cdbe9 110 #define RN05_100BTX (1 << 7)
Sergunb 0:8918a71cdbe9 111 #define RN05_10BT_FD (1 << 6)
Sergunb 0:8918a71cdbe9 112 #define RN05_10BT (1 << 5)
Sergunb 0:8918a71cdbe9 113 #define RN05_SELECTOR4 (1 << 4)
Sergunb 0:8918a71cdbe9 114 #define RN05_SELECTOR3 (1 << 3)
Sergunb 0:8918a71cdbe9 115 #define RN05_SELECTOR2 (1 << 2)
Sergunb 0:8918a71cdbe9 116 #define RN05_SELECTOR1 (1 << 1)
Sergunb 0:8918a71cdbe9 117 #define RN05_SELECTOR0 (1 << 0)
Sergunb 0:8918a71cdbe9 118
Sergunb 0:8918a71cdbe9 119 //RN06 register
Sergunb 0:8918a71cdbe9 120 #define RN06_PD_FAULT (1 << 4)
Sergunb 0:8918a71cdbe9 121 #define RN06_LP_NP_ABLE (1 << 3)
Sergunb 0:8918a71cdbe9 122 #define RN06_NP_ABLE (1 << 2)
Sergunb 0:8918a71cdbe9 123 #define RN06_PAGE_RCVD (1 << 1)
Sergunb 0:8918a71cdbe9 124 #define RN06_LP_AN_ABLE (1 << 0)
Sergunb 0:8918a71cdbe9 125
Sergunb 0:8918a71cdbe9 126 //RN07 register
Sergunb 0:8918a71cdbe9 127 #define RN07_NP (1 << 15)
Sergunb 0:8918a71cdbe9 128 #define RN07_MP (1 << 13)
Sergunb 0:8918a71cdbe9 129 #define RN07_ACK2 (1 << 12)
Sergunb 0:8918a71cdbe9 130 #define RN07_TOGGLE (1 << 11)
Sergunb 0:8918a71cdbe9 131 #define RN07_CODE10 (1 << 10)
Sergunb 0:8918a71cdbe9 132 #define RN07_CODE9 (1 << 9)
Sergunb 0:8918a71cdbe9 133 #define RN07_CODE8 (1 << 8)
Sergunb 0:8918a71cdbe9 134 #define RN07_CODE7 (1 << 7)
Sergunb 0:8918a71cdbe9 135 #define RN07_CODE6 (1 << 6)
Sergunb 0:8918a71cdbe9 136 #define RN07_CODE5 (1 << 5)
Sergunb 0:8918a71cdbe9 137 #define RN07_CODE4 (1 << 4)
Sergunb 0:8918a71cdbe9 138 #define RN07_CODE3 (1 << 3)
Sergunb 0:8918a71cdbe9 139 #define RN07_CODE2 (1 << 2)
Sergunb 0:8918a71cdbe9 140 #define RN07_CODE1 (1 << 1)
Sergunb 0:8918a71cdbe9 141 #define RN07_CODE0 (1 << 0)
Sergunb 0:8918a71cdbe9 142
Sergunb 0:8918a71cdbe9 143 //RN08 register
Sergunb 0:8918a71cdbe9 144 #define RN08_NP (1 << 15)
Sergunb 0:8918a71cdbe9 145 #define RN08_ACK (1 << 14)
Sergunb 0:8918a71cdbe9 146 #define RN08_MP (1 << 13)
Sergunb 0:8918a71cdbe9 147 #define RN08_ACK2 (1 << 12)
Sergunb 0:8918a71cdbe9 148 #define RN08_TOGGLE (1 << 11)
Sergunb 0:8918a71cdbe9 149 #define RN08_CODE10 (1 << 10)
Sergunb 0:8918a71cdbe9 150 #define RN08_CODE9 (1 << 9)
Sergunb 0:8918a71cdbe9 151 #define RN08_CODE8 (1 << 8)
Sergunb 0:8918a71cdbe9 152 #define RN08_CODE7 (1 << 7)
Sergunb 0:8918a71cdbe9 153 #define RN08_CODE6 (1 << 6)
Sergunb 0:8918a71cdbe9 154 #define RN08_CODE5 (1 << 5)
Sergunb 0:8918a71cdbe9 155 #define RN08_CODE4 (1 << 4)
Sergunb 0:8918a71cdbe9 156 #define RN08_CODE3 (1 << 3)
Sergunb 0:8918a71cdbe9 157 #define RN08_CODE2 (1 << 2)
Sergunb 0:8918a71cdbe9 158 #define RN08_CODE1 (1 << 1)
Sergunb 0:8918a71cdbe9 159 #define RN08_CODE0 (1 << 0)
Sergunb 0:8918a71cdbe9 160
Sergunb 0:8918a71cdbe9 161 //RN10 register
Sergunb 0:8918a71cdbe9 162 #define RN10_MII_EN (1 << 9)
Sergunb 0:8918a71cdbe9 163 #define RN10_FEF_EN (1 << 5)
Sergunb 0:8918a71cdbe9 164 #define RN10_FIFO_EXT (1 << 2)
Sergunb 0:8918a71cdbe9 165 #define RN10_RMII_OOBS (1 << 1)
Sergunb 0:8918a71cdbe9 166
Sergunb 0:8918a71cdbe9 167 //RN11 register
Sergunb 0:8918a71cdbe9 168 #define RN11_FX_MODE (1 << 10)
Sergunb 0:8918a71cdbe9 169 #define RN11_SPEED (1 << 9)
Sergunb 0:8918a71cdbe9 170 #define RN11_DUPLEX (1 << 8)
Sergunb 0:8918a71cdbe9 171 #define RN11_PAUSE (1 << 7)
Sergunb 0:8918a71cdbe9 172 #define RN11_AN_COMPLETE_INT (1 << 6)
Sergunb 0:8918a71cdbe9 173 #define RN11_REMOTE_FAULT_INT (1 << 5)
Sergunb 0:8918a71cdbe9 174 #define RN11_LINK_DOWN_INT (1 << 4)
Sergunb 0:8918a71cdbe9 175 #define RN11_AN_LCW_RCVD_INT (1 << 3)
Sergunb 0:8918a71cdbe9 176 #define RN11_PD_FAULT_INT (1 << 2)
Sergunb 0:8918a71cdbe9 177 #define RN11_PG_RCVD_INT (1 << 1)
Sergunb 0:8918a71cdbe9 178 #define RN11_RX_FUL_INT (1 << 0)
Sergunb 0:8918a71cdbe9 179
Sergunb 0:8918a71cdbe9 180 //RN12 register
Sergunb 0:8918a71cdbe9 181 #define RN12_INT_OE_N (1 << 8)
Sergunb 0:8918a71cdbe9 182 #define RN12_INT_EN (1 << 7)
Sergunb 0:8918a71cdbe9 183 #define RN12_AN_COMPLETE_EN (1 << 6)
Sergunb 0:8918a71cdbe9 184 #define RN12_REMOTE_FAULT_EN (1 << 5)
Sergunb 0:8918a71cdbe9 185 #define RN12_LINK_DOWN_EN (1 << 4)
Sergunb 0:8918a71cdbe9 186 #define RN12_AN_LCW_RCVD_EN (1 << 3)
Sergunb 0:8918a71cdbe9 187 #define RN12_PD_FAULT_EN (1 << 2)
Sergunb 0:8918a71cdbe9 188 #define RN12_PG_RCVD_EN (1 << 1)
Sergunb 0:8918a71cdbe9 189 #define RN12_RX_FULL_EN (1 << 0)
Sergunb 0:8918a71cdbe9 190
Sergunb 0:8918a71cdbe9 191 //RN13 register
Sergunb 0:8918a71cdbe9 192 #define RN13_RX_ERR_COUNTER_DIS (1 << 13)
Sergunb 0:8918a71cdbe9 193 #define RN13_AN_COMPLETE (1 << 12)
Sergunb 0:8918a71cdbe9 194 #define RN13_DC_REST_EN (1 << 8)
Sergunb 0:8918a71cdbe9 195 #define RN13_NRZ_CONV_EN (1 << 7)
Sergunb 0:8918a71cdbe9 196 #define RN13_TX_ISOLATE (1 << 5)
Sergunb 0:8918a71cdbe9 197 #define RN13_CMODE2 (1 << 4)
Sergunb 0:8918a71cdbe9 198 #define RN13_CMODE1 (1 << 3)
Sergunb 0:8918a71cdbe9 199 #define RN13_CMODE0 (1 << 2)
Sergunb 0:8918a71cdbe9 200 #define RN13_MLT3_DIS (1 << 1)
Sergunb 0:8918a71cdbe9 201 #define RN13_SCRAMBLER_DIS (1 << 0)
Sergunb 0:8918a71cdbe9 202
Sergunb 0:8918a71cdbe9 203 #define RN13_CMODE_MASK (7 << 2)
Sergunb 0:8918a71cdbe9 204 #define RN13_CMODE_AN (0 << 2)
Sergunb 0:8918a71cdbe9 205 #define RN13_CMODE_10BT (1 << 2)
Sergunb 0:8918a71cdbe9 206 #define RN13_CMODE_100BTX (2 << 2)
Sergunb 0:8918a71cdbe9 207 #define RN13_CMODE_10BT_FD (5 << 2)
Sergunb 0:8918a71cdbe9 208 #define RN13_CMODE_100BTX_FD (6 << 2)
Sergunb 0:8918a71cdbe9 209 #define RN13_CMODE_TX_ISOLATE (7 << 2)
Sergunb 0:8918a71cdbe9 210
Sergunb 0:8918a71cdbe9 211 //RN14 register
Sergunb 0:8918a71cdbe9 212 #define RN14_PHY_ADDR4 (1 << 7)
Sergunb 0:8918a71cdbe9 213 #define RN14_PHY_ADDR3 (1 << 6)
Sergunb 0:8918a71cdbe9 214 #define RN14_PHY_ADDR2 (1 << 5)
Sergunb 0:8918a71cdbe9 215 #define RN14_PHY_ADDR1 (1 << 4)
Sergunb 0:8918a71cdbe9 216 #define RN14_PHY_ADDR0 (1 << 3)
Sergunb 0:8918a71cdbe9 217 #define RN14_NO_PREAMBLE (1 << 1)
Sergunb 0:8918a71cdbe9 218
Sergunb 0:8918a71cdbe9 219 //RN18 register
Sergunb 0:8918a71cdbe9 220 #define RN18_JABBER_DIS (1 << 15)
Sergunb 0:8918a71cdbe9 221 #define RN18_MDIO_PS (1 << 4)
Sergunb 0:8918a71cdbe9 222
Sergunb 0:8918a71cdbe9 223 //RN19 register
Sergunb 0:8918a71cdbe9 224 #define RN19_AN_COMPLETE (1 << 15)
Sergunb 0:8918a71cdbe9 225 #define RN19_AN_ACK (1 << 14)
Sergunb 0:8918a71cdbe9 226 #define RN19_AN_DETECT (1 << 13)
Sergunb 0:8918a71cdbe9 227 #define RN19_LP_AN_ABLE_DETECT (1 << 12)
Sergunb 0:8918a71cdbe9 228 #define RN19_AN_PAUSE (1 << 11)
Sergunb 0:8918a71cdbe9 229 #define RN19_AN_HCD2 (1 << 10)
Sergunb 0:8918a71cdbe9 230 #define RN19_AN_HCD1 (1 << 9)
Sergunb 0:8918a71cdbe9 231 #define RN19_AN_HCD0 (1 << 8)
Sergunb 0:8918a71cdbe9 232 #define RN19_PD_FAULT (1 << 7)
Sergunb 0:8918a71cdbe9 233 #define RN19_REMOTE_FAULT (1 << 6)
Sergunb 0:8918a71cdbe9 234 #define RN19_PAGE_RCVD (1 << 5)
Sergunb 0:8918a71cdbe9 235 #define RN19_LP_AN_ABLE (1 << 4)
Sergunb 0:8918a71cdbe9 236 #define RN19_SP100 (1 << 3)
Sergunb 0:8918a71cdbe9 237 #define RN19_LINK_STATUS (1 << 2)
Sergunb 0:8918a71cdbe9 238 #define RN19_AN_EN (1 << 1)
Sergunb 0:8918a71cdbe9 239 #define RN19_JABBER_DETECT (1 << 0)
Sergunb 0:8918a71cdbe9 240
Sergunb 0:8918a71cdbe9 241 //RN1B register
Sergunb 0:8918a71cdbe9 242 #define RN1B_LED_MODE (1 << 9)
Sergunb 0:8918a71cdbe9 243 #define RN1B_10BT_ECHO_DIS (1 << 7)
Sergunb 0:8918a71cdbe9 244 #define RN1B_MI_SQE_DIS (1 << 3)
Sergunb 0:8918a71cdbe9 245
Sergunb 0:8918a71cdbe9 246 //RN1C register
Sergunb 0:8918a71cdbe9 247 #define RN1C_MDIX_STATUS (1 << 13)
Sergunb 0:8918a71cdbe9 248 #define RN1C_MDIX_SWAP (1 << 12)
Sergunb 0:8918a71cdbe9 249 #define RN1C_MDIX_DIS (1 << 11)
Sergunb 0:8918a71cdbe9 250 #define RN1C_JABBER_DETECT (1 << 9)
Sergunb 0:8918a71cdbe9 251 #define RN1C_POLARITY_CHANGED (1 << 8)
Sergunb 0:8918a71cdbe9 252
Sergunb 0:8918a71cdbe9 253 //RN1E
Sergunb 0:8918a71cdbe9 254 #define RN1E_HCD_100BTX_FD (1 << 15)
Sergunb 0:8918a71cdbe9 255 #define RN1E_HCD_100BT4 (1 << 14)
Sergunb 0:8918a71cdbe9 256 #define RN1E_HCD_100BTX (1 << 13)
Sergunb 0:8918a71cdbe9 257 #define RN1E_HCD_10BT_FD (1 << 12)
Sergunb 0:8918a71cdbe9 258 #define RN1E_HCD_10BT (1 << 11)
Sergunb 0:8918a71cdbe9 259 #define RN1E_AN_RESTART (1 << 8)
Sergunb 0:8918a71cdbe9 260 #define RN1E_AN_COMPLETE (1 << 7)
Sergunb 0:8918a71cdbe9 261 #define RN1E_AN_ACK_COMPLETE (1 << 6)
Sergunb 0:8918a71cdbe9 262 #define RN1E_AN_ACK (1 << 5)
Sergunb 0:8918a71cdbe9 263 #define RN1E_AN_ABLE (1 << 4)
Sergunb 0:8918a71cdbe9 264 #define RN1E_SUPER_ISOLATE (1 << 3)
Sergunb 0:8918a71cdbe9 265
Sergunb 0:8918a71cdbe9 266 //RN1F register
Sergunb 0:8918a71cdbe9 267 #define RN1F_SHADOW_REG_EN (1 << 7)
Sergunb 0:8918a71cdbe9 268
Sergunb 0:8918a71cdbe9 269 //RS1B
Sergunb 0:8918a71cdbe9 270 #define RS1B_MLT3_DETECT (1 << 15)
Sergunb 0:8918a71cdbe9 271 #define RS1B_TX_CABLE_LEN2 (1 << 14)
Sergunb 0:8918a71cdbe9 272 #define RS1B_TX_CABLE_LEN1 (1 << 13)
Sergunb 0:8918a71cdbe9 273 #define RS1B_TX_CABLE_LEN0 (1 << 12)
Sergunb 0:8918a71cdbe9 274 #define RS1B_LED_TEST_CTRL (1 << 10)
Sergunb 0:8918a71cdbe9 275 #define RS1B_DESCRAMBLER_LOCKED (1 << 9)
Sergunb 0:8918a71cdbe9 276 #define RS1B_FALSE_CARRIER_DETECT (1 << 8)
Sergunb 0:8918a71cdbe9 277 #define RS1B_BAD_ESD_DETECT (1 << 7)
Sergunb 0:8918a71cdbe9 278 #define RS1B_RX_ERROR_DETECT (1 << 6)
Sergunb 0:8918a71cdbe9 279 #define RS1B_LOCK_ERROR_DETECT (1 << 4)
Sergunb 0:8918a71cdbe9 280 #define RS1B_MLT3_ERROR_DETECT (1 << 3)
Sergunb 0:8918a71cdbe9 281
Sergunb 0:8918a71cdbe9 282 //ST802RT1A Ethernet PHY driver
Sergunb 0:8918a71cdbe9 283 extern const PhyDriver st802rt1aPhyDriver;
Sergunb 0:8918a71cdbe9 284
Sergunb 0:8918a71cdbe9 285 //ST802RT1A related functions
Sergunb 0:8918a71cdbe9 286 error_t st802rt1aInit(NetInterface *interface);
Sergunb 0:8918a71cdbe9 287
Sergunb 0:8918a71cdbe9 288 void st802rt1aTick(NetInterface *interface);
Sergunb 0:8918a71cdbe9 289
Sergunb 0:8918a71cdbe9 290 void st802rt1aEnableIrq(NetInterface *interface);
Sergunb 0:8918a71cdbe9 291 void st802rt1aDisableIrq(NetInterface *interface);
Sergunb 0:8918a71cdbe9 292
Sergunb 0:8918a71cdbe9 293 void st802rt1aEventHandler(NetInterface *interface);
Sergunb 0:8918a71cdbe9 294
Sergunb 0:8918a71cdbe9 295 void st802rt1aWritePhyReg(NetInterface *interface, uint8_t address, uint16_t data);
Sergunb 0:8918a71cdbe9 296 uint16_t st802rt1aReadPhyReg(NetInterface *interface, uint8_t address);
Sergunb 0:8918a71cdbe9 297
Sergunb 0:8918a71cdbe9 298 void st802rt1aDumpPhyReg(NetInterface *interface);
Sergunb 0:8918a71cdbe9 299
Sergunb 0:8918a71cdbe9 300 #endif
Sergunb 0:8918a71cdbe9 301