EtherNet/IP™ Adapter3.02.00

◆ EI_API_ADP_setIntfConfig()

uint32_t EI_API_ADP_setIntfConfig ( T *  pAdp_p,
uint8_t  intfId_p,
EI_API_ADP_UIntfConf_t  intfConf_p 
)

Set the adapter Ethernet interface configuration (Instance Attribute ID: 6).

This function can be used to set the current adapter Ethernet interface configuration.

Parameters
[in]pAdp_pPointer to the adapter.
[in]intfId_pInterface ID.
intfConf_pNew interface configuration.
Returns
ei_api_adp_error_t Error code.
Return values
EI_API_ADP_OKSuccess.
EI_API_ADP_ERRORGeneral error.
Example
#include <api/EI_API.h>
EI_API_ADP_T* pEI_API_ADP = NULL;
ei_api_adp_error_t errCode;
uint8_t numInterfaces = 1;
ei_api_adp_intf_conf intfConf;
pEI_API_ADP = EI_API_ADP_new(numInterfaces);
// set all bits at once
intfConf.all = 0x00;
// or alternatively
//intfConf.bit.ETHIntfActive = 0;
//intfConf.bit.ETHIntfAutoNeg = 0;
//intfConf.bit.ETHIntfFDuplex = 0;
//intfConf.bit.ETHIntf100MB = 0;
for (int i = 0; i < 2; i++)
{
errCode = EI_API_ADP_setIntfConfig(pEI_API_ADP, i, intfConf);
}
See also
EI_API_ADP_getIntfConfig, ei_api_adp_intf_conf
EI_API_ADP_setIntfConfig
ETHIP_API uint32_t EI_API_ADP_setIntfConfig(T *adp, uint8_t intfId, EI_API_ADP_UIntfConf_t intfConfig)
Set the adapter Ethernet interface configuration (Instance Attribute ID: 6).
Definition: EI_API_ADP_stub.c:4574
EI_API_ADP_new
ETHIP_API T * EI_API_ADP_new(uint8_t numInterfaces_p)
Create a new EtherNet/IP adapter.
Definition: EI_API_ADP_stub.c:256