File nut/dev/phy.c


Included Files


Preprocessor definitions

#define PHPRINTF( args, ... )

#define PHY_BMCR 0x00

#define PHY_BMSR 0x01

#define PHY_ID1 0x02

#define PHY_ID2 0x03

#define PHY_ANAR 0x04

#define PHY_ANLP 0x05

#define PHY_ANER 0x06

#define PHY_ANTR 0x07

#define PHY_BMCR_RES 0x8000

#define PHY_BMCR_LOOP 0x4000

#define PHY_BMCR_SPEED 0x2000

#define PHY_BMCR_ANEG 0x1000

#define PHY_BMCR_PDWN 0x0800

#define PHY_BMCR_ISO 0x0400

#define PHY_BMCR_ANST 0x0200

#define PHY_BMCR_DUPX 0x0100

#define PHYSET_COLTEST 0x0080

#define PHY_BMSR_CT4 0x8000

#define PHY_BMSR_C100FD 0x4000

#define PHY_BMSR_C100HD 0x2000

#define PHY_BMSR_C10FD 0x1000

#define PHY_BMSR_C10HD 0x0800

#define PHY_BMSR_CPRE 0x0040

#define PHY_BMSR_CANEG 0x0008

#define PHY_BMSR_CEXT 0x0001

#define PHY_BMSR_CMSK 0xF849

#define PHY_BMSR_ANEG 0x0020

#define PHY_BMSR_RFLT 0x0010

#define PHY_BMSR_LNK 0x0004

#define PHY_BMSR_JAB 0x0002

#define PHY_BMSR_SMSK 0x0036

#define phyw( reg, val )

#define phyr( reg )

#define NutPhyGetStatus( void )


Typedef phy_bit_descr_t

typedef struct {...} phy_bit_descr_t
struct  
   {  
      uint8_t reg;  
      uint16_t mask;  
   }  

Typedef phy_status_descr_t

typedef struct {...} phy_status_descr_t
struct  
   {  
      uint32_t phy_oui;  
      phy_bit_descr_t phy_bit_descr[PHY_BIT_DESCR_MAX];  
   }  

Global Variable phydcb

PHYDCB* phydcb
Visible in:   nut/dev/phy.c
Used in: NutPhyCtl() nut/dev/phy.c
  NutRegisterPhy() nut/dev/phy.c

Global Variable phy_bit_descr_nr

enum {...} phy_bit_descr_nr
Visible in:   nut/dev/phy.c

Global Variable phy_status_descr

phy_status_descr_t phy_status_descr[]
Visible in:   nut/dev/phy.c
Used in: NutPhyCtl() nut/dev/phy.c
  NutRegisterPhy() nut/dev/phy.c

Global Function NutPhyCtl()

int NutPhyCtl ( uint16_t ctl, uint32_t* par )
Prototyped in: nut/include/dev/phy.h
Calls: NutDelay()
References Variables: phy_status_descr nut/dev/phy.c
  phydcb nut/dev/phy.c

Global Function NutRegisterPhy()

int NutRegisterPhy ( uint8_t mda, void (*mdiow)(uint8_t,uint16_t), uint16_t (*mdior)(uint8_t) )
Prototyped in: nut/include/dev/phy.h
Calls: NutHeapRootAlloc()
References Variables: phy_status_descr nut/dev/phy.c
  phydcb nut/dev/phy.c