tstDevPhy.cpp revision 627bf68711ac042ab548c6085bc0c7e5c8b91c41
/* $Id$ */
/** @file
* PHY MDIO unit tests.
*/
/*
* Copyright (C) 2007-2010 Oracle Corporation
*
* Oracle Corporation confidential
* All rights reserved
*/
#include "../DevE1000Phy.h"
/**
*/
private:
enum Op
{
WRITE_OP = 0x1,
READ_OP = 0x2
};
#define PHYADR_VAL (uint16_t)0
#define PREAMBLE_VAL 0xFFFFFFFF
enum BitWidths {
ST_BITS = 2,
OP_BITS = 2,
PHYADR_BITS = 5,
REGADR_BITS = 5,
TA_BITS = 2,
DATA_BITS = 16,
PREAMBLE_BITS = 32
};
// Helper methods
public:
void setUp()
{
}
void tearDown()
{
delete phy;
}
void testSize()
{
}
void testReadPID()
{
}
void testReadEPID()
{
}
void testWriteANA()
{
}
};
/**
* shiftOutBits - Shift data bits our to MDIO
**/
do {
mask >>= 1;
} while (mask);
}
/**
* shiftInBits - Shift data bits in from MDIO
**/
{
while (count--)
{
data <<= 1;
}
return data;
}
{
shiftInBits(1);
return u16Data;
}
{
}
// Create text test runner and run all tests.
{
}