阅读:1139回复:0
在psos下编pci网卡驱动程序遇了一点麻烦,希望大侠指点迷津
在psos下编写pci网卡(选用芯片davicom的dm9102a)的驱动程序,我是一个新手,遇到了一点麻烦。请教各位大侠,在AUI or MII连接的初始化过程中,到底是一个怎样的过程,需要设计到那些寄存器的读写?mii与aui到底是充当一个什么角色,发挥什么功能?以下程序里涉及到一些缺省媒体数据类型的数据结构定义,它们之间是怎么样的,我好糊涂,谢谢指点!*CompactFormat typedef struct
{UCHAR MediaCode; UCHAR GPPortData; USHORT Command; } CompactFormat; * Extended Format0 typedef struct {UCHAR Length; UCHAR Type; UCHAR BlockData[4]; } ExtendedFormat0; /* Extended Format1 typedef struct { UCHAR Length; UCHAR Type; UCHAR BlockData[40]; } ExtendedFormat1; //*InfoBlock typedef union InfoBlock { CompactFormat Compact; ExtendedFormat0 Extended0; ExtendedFormat1 Extended1; } InfoBlock; /*LeafInformation typedef struct { USHORT ConnType; UCHAR GPControl; UCHAR BlockCount; InfoBlock srInfoBlock; } InfoLeaf; //*MediaSettings typedef struct { UINT ValCSR6; UINT GPCount; UINT GPValue[MAX_GP_WRITES]; UINT GPResetLen; UINT GPResetValue[MAX_GP_WRITES]; } MediaSettingsType; /*MediaBlockInformation typedef struct { UINT ActiveMedia; UINT MediaFound; UINT GPMask; MediaSettingsType MediaArray[MAX_MEDIAS]; UINT DontSwitch; } MediaBlocksType; |
|