Choco OS
V.0.16.9.0
Join to the chocolate world
|
Stores functions for handling PHY. More...
Go to the source code of this file.
Functions | |
static oC_ErrorCode_t | WriteRegister (oC_ETH_PhyAddress_t PhyAddress, oC_ETH_PhyRegister_t Register, uint32_t Value) |
writes PHY register | |
static oC_ErrorCode_t | ReadRegister (oC_ETH_PhyAddress_t PhyAddress, oC_ETH_PhyRegister_t Register, uint32_t *outValue) |
reads PHY register | |
oC_ErrorCode_t | oC_ETH_WritePhyRegister (oC_ETH_PhyAddress_t PhyAddress, oC_ETH_PhyRegister_t Register, uint32_t Value) |
writes PHY register More... | |
oC_ErrorCode_t | oC_ETH_ReadPhyRegister (oC_ETH_PhyAddress_t PhyAddress, oC_ETH_PhyRegister_t Register, uint32_t *outValue) |
writes PHY register More... | |
oC_ErrorCode_t | oC_ETH_PhyReset (oC_ETH_PhyAddress_t PhyAddress) |
resets PHY More... | |
oC_ErrorCode_t | oC_ETH_ReadLinkStatus (oC_ETH_PhyAddress_t PhyAddress, oC_Net_LinkStatus_t *outLinkStatus) |
reads link status from the PHY More... | |
oC_ErrorCode_t | oC_ETH_SetAutoNegotiation (oC_ETH_PhyAddress_t PhyAddress, bool Enabled, oC_Time_t Timeout) |
enables/disables AutoNegotiation More... | |
oC_ErrorCode_t | oC_ETH_SetPhyLoopback (oC_ETH_PhyAddress_t PhyAddress, bool Enabled) |
enables/disables PHY loopback mode More... | |
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 St, Fifth Floor, Boston, MA 02110-1301 USA
Definition in file oc_eth_phy.c.
oC_ErrorCode_t oC_ETH_PhyReset | ( | oC_ETH_PhyAddress_t | PhyAddress | ) |
The function is for reseting the PHY. It also waits to ensure, that the PHY was successfully reseted.
PhyAddress | Address of the external PHY |
oC_ErrorCode_None
if success Definition at line 121 of file oc_eth_phy.c.
oC_ErrorCode_t oC_ETH_ReadLinkStatus | ( | oC_ETH_PhyAddress_t | PhyAddress, |
oC_Net_LinkStatus_t * | outLinkStatus | ||
) |
The function is for reading link status from the PHY.
PhyAddress | Address of the external PHY |
outLinkStatus | Destination for the link status |
oC_ErrorCode_None
if success Definition at line 155 of file oc_eth_phy.c.
oC_ErrorCode_t oC_ETH_ReadPhyRegister | ( | oC_ETH_PhyAddress_t | PhyAddress, |
oC_ETH_PhyRegister_t | Register, | ||
uint32_t * | outValue | ||
) |
The function is for writing registers of the PHY.
PhyAddress | Address of the external PHY |
Register | Register to access |
Value | Value to write |
oC_ErrorCode_None
if success Definition at line 97 of file oc_eth_phy.c.
oC_ErrorCode_t oC_ETH_SetAutoNegotiation | ( | oC_ETH_PhyAddress_t | PhyAddress, |
bool | Enabled, | ||
oC_Time_t | Timeout | ||
) |
The function is for enabling/disabling auto negotiation mode
PhyAddress | Address of the external PHY |
Enabled | True if it should be enabled |
Timeout | Maximum time for operation. If 0, the module will not wait for AutoNegotiation complete |
oC_ErrorCode_None
if success Definition at line 189 of file oc_eth_phy.c.
oC_ErrorCode_t oC_ETH_SetPhyLoopback | ( | oC_ETH_PhyAddress_t | PhyAddress, |
bool | Enabled | ||
) |
The function is for enabling/disabling auto negotiation mode
PhyAddress | Address of the external PHY |
Enabled | True if it should be enabled |
oC_ErrorCode_None
if success Definition at line 237 of file oc_eth_phy.c.
oC_ErrorCode_t oC_ETH_WritePhyRegister | ( | oC_ETH_PhyAddress_t | PhyAddress, |
oC_ETH_PhyRegister_t | Register, | ||
uint32_t | Value | ||
) |
The function is for writing registers of the PHY.
PhyAddress | Address of the external PHY |
Register | Register to access |
Value | Value to write |
oC_ErrorCode_None
if success Definition at line 70 of file oc_eth_phy.c.