5.2. Intel Pro/1000 - emllI8254x

The parameters to the Intel Pro/1000 Link Layer are setup-specific. The function “CreateLinkParmsFromCmdLinei8254x” in EcSelectLinkLayer.cpp demonstrates how to initialize the Link Layer instance.

Public Members

Common link parameters. Signature must be set to EC_LINK_PARMS_SIGNATURE_I8254X

Receive buffer count, 0: default to 96

Recevie buffer size for a single Ethernet frame. 0: buffer optimized for standard Ethernet frame.

Transmit buffer count, 0: default to 96

Transmit buffer size for a single Ethernet frame. 0: buffer optimized for standard Ethernet frame.

Disable locks

Timeout [ms] for auto negotiation

Use buffers from DMA (EC_FALSE) or from heap for receive. AllocSend is not supported, when EC_TRUE.

NICs equipped with 82577, 82579 or 82567 may need HardCodedPhySettings. This must be set after emInitMaster(), before using the NIC, e.g.:

dwRes = emInitMaster(&oInitParms);
if (dwRes != EC_E_NOERROR)
{
    dwRetVal = dwRes;
    LogError("ERROR EtherCAT-Master! %s (0x%x)", emGetText(dwRes), dwRes);
    goto Exit;
}
{
    EC_T_IOCTLPARMS oIoCtlParms = {0};
    oIoCtlParms.pbyInBuf        = (EC_T_BYTE*)EC_NULL + 0x20103;
    oIoCtlParms.dwInBufSize     = sizeof(EC_T_DWORD);
    emIoControl(EC_IOCTL_LINKLAYER_MAIN + EC_LINKIOCTL_FORCELINKMODE, &oIoCtlParms);
    OsSleep(1000);
}