MityDSP Documentation Index

tcDspPhyMicrelKS8995 Class Reference

Controller Class for Micrel Managed Switch. More...

#include <DspPhyMicrelKS8995.h>

Inheritance diagram for tcDspPhyMicrelKS8995:
tcDspNetPhy

List of all members.

Public Member Functions

 tcDspPhyMicrelKS8995 (void *apAddress)
 tcDspPhyMicrelKS8995 (void *apAddress, MityDSP::tcDspSpi *apSpi)
virtual ~tcDspPhyMicrelKS8995 ()
bool Initialize (void)
virtual const char * GetPhyName (void)
virtual bool LinkUp (unsigned int anPhyAddr=0xFFFFFFFF)
virtual bool GetPhyStatus (tsNetPhyStatus &arPhyStatus, unsigned int anPhyAddr=0xFFFFFFFF)
void SetSpi (MityDSP::tcDspSpi *apSpi)
void WriteSpiRegister (unsigned char anRegister, unsigned char anData)
bool ReadSpiRegister (unsigned char anRegister, unsigned char &anData)
bool SetVlanTableEntry (int anEntry, unsigned short anVID, char anPortMemberMask)
bool StartSwitch ()
bool SetTagInsertion (int anPort, bool abEnable)
bool SetTagRemoval (int anPort, bool abEnable)
bool SetPriorityEnable (int anPort, bool abEnable)
bool SetPortVlanMembership (int anPort, char anMembershipMask)
bool SetPortIngressVlanFilter (int anPort, bool abEnable)
bool SetPortDefaultVID (int anPort, unsigned short anVid)
bool EnableVlan ()

Protected Attributes

MityDSP::tcDspSpi * mpSpi
 pointer to the SPI interface on the chip

Detailed Description

Controller Class for Micrel Managed Switch.

This class provides PHY interface control over the Micrl KS8995 managed switch. This class includes methods to control the VLAN settings of the interface port.

This class requires access to a tcDspSpi interface which is connected to the management SPI port of the device.


Constructor & Destructor Documentation

tcDspPhyMicrelKS8995::tcDspPhyMicrelKS8995 ( void *  apAddress  ) 
tcDspPhyMicrelKS8995::tcDspPhyMicrelKS8995 ( void *  apAddress,
MityDSP::tcDspSpi *  apSpi 
)
Parameters:
[in] apAddress pointer to MityDSP EMAC core base address
[in] apSpi pointer to SPI management Device (may be NULL)
tcDspPhyMicrelKS8995::~tcDspPhyMicrelKS8995 (  )  [virtual]

Destructor. Typically not reached.


Member Function Documentation

bool tcDspPhyMicrelKS8995::Initialize ( void   )  [virtual]

Initialize the PHY. This will issue the SPI command on the management interface to take the part out of isolation mode.

Returns:
true

Reimplemented from tcDspNetPhy.

virtual const char* tcDspPhyMicrelKS8995::GetPhyName ( void   )  [inline, virtual]

Reimplemented from tcDspNetPhy.

bool tcDspPhyMicrelKS8995::LinkUp ( unsigned int  anPhyAddr = 0xFFFFFFFF  )  [virtual]

This routine returns whether or not the ethernet link is up. Register.

Returns:
Boolean indicating whether or not link is up.

Reimplemented from tcDspNetPhy.

bool tcDspPhyMicrelKS8995::GetPhyStatus ( tsNetPhyStatus arPhyStatus,
unsigned int  anPhyAddr = 0xFFFFFFFF 
) [virtual]

Reads the status of one of the 5 phy ports

Parameters:
[in] arPhyStatus 
[in] anPhyAddr for the Micrel Switch, can range from 1 (default) to 5
Returns:
true if the status was updated correctly

Reimplemented from tcDspNetPhy.

void tcDspPhyMicrelKS8995::SetSpi ( MityDSP::tcDspSpi *  apSpi  ) 

Sets the management SPI interface and configures the clocking modes.

Parameters:
[in] apSpi pointer to SPI management Device (may be NULL)
void tcDspPhyMicrelKS8995::WriteSpiRegister ( unsigned char  anRegister,
unsigned char  anData 
)
bool tcDspPhyMicrelKS8995::ReadSpiRegister ( unsigned char  anRegister,
unsigned char &  anData 
)
bool tcDspPhyMicrelKS8995::SetVlanTableEntry ( int  anEntry,
unsigned short  anVID,
char  anPortMemberMask 
)
bool tcDspPhyMicrelKS8995::StartSwitch (  ) 
bool tcDspPhyMicrelKS8995::SetTagInsertion ( int  anPort,
bool  abEnable 
)
bool tcDspPhyMicrelKS8995::SetTagRemoval ( int  anPort,
bool  abEnable 
)
bool tcDspPhyMicrelKS8995::SetPriorityEnable ( int  anPort,
bool  abEnable 
)
bool tcDspPhyMicrelKS8995::SetPortVlanMembership ( int  anPort,
char  anMembershipMask 
)
bool tcDspPhyMicrelKS8995::SetPortIngressVlanFilter ( int  anPort,
bool  abEnable 
)
bool tcDspPhyMicrelKS8995::SetPortDefaultVID ( int  anPort,
unsigned short  anVid 
)
bool tcDspPhyMicrelKS8995::EnableVlan (  ) 
Note:
VLan table must be set up prior to enabling the VLAN

Member Data Documentation

MityDSP::tcDspSpi* tcDspPhyMicrelKS8995::mpSpi [protected]

pointer to the SPI interface on the chip


  
Generated on Wed Mar 17 18:24:38 2010 for MityDSP Net by  Doxygen Version 1.6.1
Copyright © 2009, Critical Link LLC, All rights reserved.