libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
PHY KSZ8051MLL

Ethernet PHY STM32Fxx7 Drivers More...

Functions

enum phy_status phy_link_status (uint8_t phy)
 Get the current link status. More...
 
void phy_autoneg_force (uint8_t phy, enum phy_status mode)
 Force autonegotiation. More...
 
void phy_autoneg_enable (uint8_t phy)
 Enable the autonegotiation. More...
 

Detailed Description

Ethernet PHY STM32Fxx7 Drivers

Version
1.0.0
Author
© 2013 Frantisek Burian BuFra.nosp@m.n@se.nosp@m.znam..nosp@m.cz
Date
1 September 2013

LGPL License Terms libopencm3 License

Function Documentation

◆ phy_autoneg_enable()

void phy_autoneg_enable ( uint8_t  phy)

Enable the autonegotiation.

Enable the autonegotiation of the link speed and duplex mode

Parameters
[in]phyuint8_t phy ID of the PHY

Definition at line 86 of file phy_ksz80x1.c.

References eth_smi_bit_set(), PHY_REG_BCR, PHY_REG_BCR_AN, and PHY_REG_BCR_ANRST.

Here is the call graph for this function:

◆ phy_autoneg_force()

void phy_autoneg_force ( uint8_t  phy,
enum phy_status  mode 
)

Force autonegotiation.

Force the autonegotiation and set link speed and duplex mode of the link

Parameters
[in]phyuint8_t phy ID of the PHY
[in]modeenum phy_status Desired link status

Definition at line 62 of file phy_ksz80x1.c.

References eth_smi_bit_op(), LINK_FD_10000M, LINK_FD_1000M, LINK_FD_100M, LINK_FD_10M, LINK_HD_100M, PHY_REG_BCR, PHY_REG_BCR_100M, PHY_REG_BCR_AN, and PHY_REG_BCR_FD.

Here is the call graph for this function:

◆ phy_link_status()

enum phy_status phy_link_status ( uint8_t  phy)

Get the current link status.

Retrieve the link speed and duplex status of the link.

Parameters
[in]phyuint8_t phy ID of the PHY
Returns
phy_status Link status

Definition at line 49 of file phy_ksz80x1.c.

References eth_smi_read(), and KSZ80X1_CR1.

Here is the call graph for this function: