// DM9601.cpp: implementation of the DM9601 class.
//
// Copyright (c) 2000-2007 Davicom Inc.  All rights reserved.
// 
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "DM9601.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

DM9601::~DM9601()
{

}

DM9601::DM9601(NIC_DRIVER_OBJECT *pUpper,PVOID pVoid) : DM9USB(pUpper,pVoid)
{

}

DWORD DM9601::GetDriverChipID(void) 
{ 
	return DM9601_CHIP_ID; 
}

LPCTSTR	DM9601::GetDriverVersion(void)
{
	return DM9601_DRIVER_VERSION;
}

LPCTSTR	DM9601::GetReleaseDate(void)
{
	return DM9601_RELEASE_DATE;
}


extern "C" WORD GetUsbProductId()
{
	return ((DM9601_CHIP_ID>>16) & 0xFFFF); 
}

extern "C" WORD GetUsbVendorId()
{
	return (DM9601_CHIP_ID & 0xFFFF); 
}

extern "C" WORD GetUsbReleaseNumber()
{
	return 0x0101; 
}


extern "C" void USBDriverSetting(USB_DRIVER_SETTINGS * pUsbDriverSettings)
{
	pUsbDriverSettings->dwCount				= sizeof(USB_DRIVER_SETTINGS);
	pUsbDriverSettings->dwVendorId			= GetUsbVendorId();			//0x0A46
	pUsbDriverSettings->dwProductId			= GetUsbProductId();		//0x9601;
	pUsbDriverSettings->dwReleaseNumber		= GetUsbReleaseNumber();	//0x0101;
	pUsbDriverSettings->dwDeviceClass		= USB_NO_INFO;//USB_DEVICE_CLASS_COMMUNICATIONS;
	pUsbDriverSettings->dwDeviceSubClass	= USB_NO_INFO;
	pUsbDriverSettings->dwDeviceProtocol	= USB_NO_INFO;
	pUsbDriverSettings->dwInterfaceClass	= USB_NO_INFO;//USB_DEVICE_CLASS_COMMUNICATIONS;
	pUsbDriverSettings->dwInterfaceSubClass	= USB_NO_INFO;//0x06;	// Ethernet model
	pUsbDriverSettings->dwInterfaceProtocol	= USB_NO_INFO;//0x00;	// no class specific	
}

