Controller Class for Micrel Managed Switch. More...
#include <DspPhyMicrelKS8995.h>
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 () |
Public Member Functions inherited from tcDspNetPhy | |
virtual teNetPhyType | GetPhyType (unsigned int anPhyAddr=0xFFFFFFFF) |
unsigned int | PhyProbe () |
virtual unsigned short | GetMIIRegister (unsigned int anRegAddr, unsigned int anPhyAddr=0xFFFFFFFF) |
virtual int | SetMIIRegister (unsigned int anRegAddr, unsigned int anValue, unsigned int anPhyAddr=0xFFFFFFFF) |
Protected Attributes | |
MityDSP::tcDspSpi * | mpSpi |
pointer to the SPI interface on the chip | |
Protected Attributes inherited from tcDspNetPhy | |
unsigned int * | mpBaseAddr |
pointer to the tcNetDrvr class address | |
unsigned int | mnPhyAddr |
the PHY address being controlled | |
LCK_Handle | mhMutex |
used for serialization |
Additional Inherited Members | |
Static Public Member Functions inherited from tcDspNetPhy | |
static tcDspNetPhy * | GetSpecificPhy (void *apAddress) |
Static Public Attributes inherited from tcDspNetPhy | |
static unsigned int | mnTicksPerMSec = CLK_countspms() / CLK_getprd() |
Conversion from low res clock ticks to msecs. | |
Protected Member Functions inherited from tcDspNetPhy | |
tcDspNetPhy (void *apAddress) | |
~tcDspNetPhy () |
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.
tcDspPhyMicrelKS8995::tcDspPhyMicrelKS8995 | ( | void * | apAddress | ) |
tcDspPhyMicrelKS8995::tcDspPhyMicrelKS8995 | ( | void * | apAddress, |
MityDSP::tcDspSpi * | apSpi | ||
) |
[in] | apAddress | pointer to MityDSP EMAC core base address |
[in] | apSpi | pointer to SPI management Device (may be NULL) |
|
virtual |
Destructor. Typically not reached.
|
virtual |
Initialize the PHY. This will issue the SPI command on the management interface to take the part out of isolation mode.
Reimplemented from tcDspNetPhy.
|
inlinevirtual |
Reimplemented from tcDspNetPhy.
|
virtual |
This routine returns whether or not the ethernet link is up. Register.
Reimplemented from tcDspNetPhy.
|
virtual |
Reads the status of one of the 5 phy ports
[in] | arPhyStatus | |
[in] | anPhyAddr | for the Micrel Switch, can range from 1 (default) to 5 |
Reimplemented from tcDspNetPhy.
void tcDspPhyMicrelKS8995::SetSpi | ( | MityDSP::tcDspSpi * | apSpi | ) |
Sets the management SPI interface and configures the clocking modes.
[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 | ( | ) |
|
protected |
pointer to the SPI interface on the chip