API driver for KSZ8081RNA PHY component.
Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.
#include "ethernet_phy.h"
#include "pio.h"
#include "gmac.h"
#include "conf_eth.h"
#include "board.h"
Macros | |
#define | ETH_PHY_MAX_ADDR 31 |
#define | ETH_PHY_RETRY_MAX 1000000 |
#define | ETH_PHY_TIMEOUT 10 |
Functions | |
uint8_t | ethernet_phy_auto_negotiate (Gmac *p_gmac, uint8_t uc_phy_addr) |
Issue an auto negotiation of the PHY. More... | |
static uint8_t | ethernet_phy_find_valid (Gmac *p_gmac, uint8_t uc_phy_addr, uint8_t uc_start_addr) |
Find a valid PHY Address ( from addrStart to 31 ). More... | |
uint8_t | ethernet_phy_init (Gmac *p_gmac, uint8_t uc_phy_addr, uint32_t mck) |
Perform a HW initialization to the PHY and set up clocks. More... | |
uint8_t | ethernet_phy_reset (Gmac *p_gmac, uint8_t uc_phy_addr) |
Issue a SW reset to reset all registers of the PHY. More... | |
uint8_t | ethernet_phy_set_link (Gmac *p_gmac, uint8_t uc_phy_addr, uint8_t uc_apply_setting_flag) |
Get the Link & speed settings, and automatically set up the GMAC with the settings. More... | |