dp83tc811_driver.c File Reference

DP83TC811 Ethernet PHY transceiver. More...

#include "core/net.h"
#include "drivers/phy/dp83tc811_driver.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   NIC_TRACE_LEVEL
 

Functions

error_t dp83tc811Init (NetInterface *interface)
 DP83TC811 PHY transceiver initialization. More...
 
void dp83tc811Tick (NetInterface *interface)
 DP83TC811 timer handler. More...
 
void dp83tc811EnableIrq (NetInterface *interface)
 Enable interrupts. More...
 
void dp83tc811DisableIrq (NetInterface *interface)
 Disable interrupts. More...
 
void dp83tc811EventHandler (NetInterface *interface)
 DP83TC811 event handler. More...
 
void dp83tc811WritePhyReg (NetInterface *interface, uint8_t address, uint16_t data)
 Write PHY register. More...
 
uint16_t dp83tc811ReadPhyReg (NetInterface *interface, uint8_t address)
 Read PHY register. More...
 
void dp83tc811DumpPhyReg (NetInterface *interface)
 Dump PHY registers for debugging purpose. More...
 
void dp83tc811WriteMmdReg (NetInterface *interface, uint16_t address, uint16_t data)
 Write MMD extended register. More...
 
uint16_t dp83tc811ReadMmdReg (NetInterface *interface, uint16_t address)
 Read MMD extended register. More...
 
void dp83tc811WriteMmd1Reg (NetInterface *interface, uint16_t address, uint16_t data)
 Write MMD1 extended register. More...
 
uint16_t dp83tc811ReadMmd1Reg (NetInterface *interface, uint16_t address)
 Read MMD1 extended register. More...
 

Variables

const PhyDriver dp83tc811PhyDriver
 DP83TC811 Ethernet PHY driver. More...
 

Detailed Description

DP83TC811 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 dp83tc811_driver.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   NIC_TRACE_LEVEL

Definition at line 32 of file dp83tc811_driver.c.

Function Documentation

◆ dp83tc811DisableIrq()

void dp83tc811DisableIrq ( NetInterface interface)

Disable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 159 of file dp83tc811_driver.c.

◆ dp83tc811DumpPhyReg()

void dp83tc811DumpPhyReg ( NetInterface interface)

Dump PHY registers for debugging purpose.

Parameters
[in]interfaceUnderlying network interface

Definition at line 239 of file dp83tc811_driver.c.

◆ dp83tc811EnableIrq()

void dp83tc811EnableIrq ( NetInterface interface)

Enable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 144 of file dp83tc811_driver.c.

◆ dp83tc811EventHandler()

void dp83tc811EventHandler ( NetInterface interface)

DP83TC811 event handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 174 of file dp83tc811_driver.c.

◆ dp83tc811Init()

error_t dp83tc811Init ( NetInterface interface)

DP83TC811 PHY transceiver initialization.

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 62 of file dp83tc811_driver.c.

◆ dp83tc811ReadMmd1Reg()

uint16_t dp83tc811ReadMmd1Reg ( NetInterface interface,
uint16_t  address 
)

Read MMD1 extended register.

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

Definition at line 340 of file dp83tc811_driver.c.

◆ dp83tc811ReadMmdReg()

uint16_t dp83tc811ReadMmdReg ( NetInterface interface,
uint16_t  address 
)

Read MMD extended register.

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

Definition at line 289 of file dp83tc811_driver.c.

◆ dp83tc811ReadPhyReg()

uint16_t dp83tc811ReadPhyReg ( NetInterface interface,
uint8_t  address 
)

Read PHY register.

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

Definition at line 226 of file dp83tc811_driver.c.

◆ dp83tc811Tick()

void dp83tc811Tick ( NetInterface interface)

DP83TC811 timer handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 106 of file dp83tc811_driver.c.

◆ dp83tc811WriteMmd1Reg()

void dp83tc811WriteMmd1Reg ( NetInterface interface,
uint16_t  address,
uint16_t  data 
)

Write MMD1 extended register.

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

Definition at line 314 of file dp83tc811_driver.c.

◆ dp83tc811WriteMmdReg()

void dp83tc811WriteMmdReg ( NetInterface interface,
uint16_t  address,
uint16_t  data 
)

Write MMD extended register.

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

Definition at line 263 of file dp83tc811_driver.c.

◆ dp83tc811WritePhyReg()

void dp83tc811WritePhyReg ( 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 210 of file dp83tc811_driver.c.

Variable Documentation

◆ dp83tc811PhyDriver

const PhyDriver dp83tc811PhyDriver
Initial value:

DP83TC811 Ethernet PHY driver.

Definition at line 44 of file dp83tc811_driver.c.

void dp83tc811Tick(NetInterface *interface)
DP83TC811 timer handler.
void dp83tc811EventHandler(NetInterface *interface)
DP83TC811 event handler.
void dp83tc811DisableIrq(NetInterface *interface)
Disable interrupts.
error_t dp83tc811Init(NetInterface *interface)
DP83TC811 PHY transceiver initialization.
void dp83tc811EnableIrq(NetInterface *interface)
Enable interrupts.