ReadWritePhySettings Method - neoVI API

This method allows reading and writing the PHY settings from/to the hardware.

int _stdcall icsneoReadWritePHYSettings(void * hObject, PhyRegPkt_T *PHYSettings, size_t Size, size_t NumEntries);

Parameters

hObject

[in] Specifies the driver object created by OpenNeoDevice.

PHYSettings

[out] This is the address of the first element of an array of PhyRegPkt_T structures. This array will be loaded by the application software with entries to be read or written from/to the hardware.

iSize

[in] Specifies the size of the structure PhyRegPkt_T used by the application. This is to make sure the structure used in the application and the DLL is same to avoid any buffer overrun.

iNumEntries

[in] Specifies the number of PHY Entries to be read or written.

Return Values

Returns 1 if successful, 0 if an error occurred. GetLastAPIError must be called to obtain the specific error.

Remarks

This function call sends the PHY Entries to be read or written from/to the hardware.

Examples

PhySettings.clause22.phyAddrOrPort = 0x6;
PhySettings.clause.regAddr = 0x2;
PhySettings.clause.pageOrDevice = 1;
PhySettings.WriteEnable = 0;
PhySettings.Enabled = 1; //if not enabled, this entry of read/write operation will be ignored even if it is passed in.
PhySettings.Clause45Enable = 0; //Set this to 1 if the application is sending Clause45 type of Entries.

icsneoReadWritePHYSettings(handle, &PhySettings, sizeof(PhyRegPkt_t), 1);

Last updated