sub_get_product_id

Top  Previous  Next
Got to SUB-20 page

Synopsis

int sub_mdio45( sub_handle hndl, int op, int prtad, int devad,

                                                         int data, int* content )

 

Generate IEEE 802.3 Clause 45 MDIO frame. Frame format is shown here: Clause 45 MDIO frame.

Parameters

op - operation code

 

SUB_MDIO45_ADDR

ADDRESS operation

SUB_MDIO45_WRITE

WRITE operation

SUB_MDIO45_PRIA

POST-READ-INCREMENT-ADDRESS operation

SUB_MDIO45_READ

READ operation

 

prtad - 5 bit port address

devad - 5 bit device address

data - 16 bit address or data for ADDRESS or WRITE operation

*content - 16 bit register content placeholder for READ or POST-READ-INCREMENT-ADDRESS operation

Return value

On success function returns 0. Otherwise error code.

Compatibility

FW version

0.2.1 or grater

Library version

0.1.12.12 or grater