Zephyr Project API  3.4.0
A Scalable Open Source RTOS
mdio_adin2111.h File Reference
#include <stdint.h>
#include <zephyr/device.h>

Go to the source code of this file.

Functions

int adin2111_mdio_c45_read (const struct device *dev, uint8_t prtad, uint8_t devad, uint16_t regad, uint16_t *data)
 Read from MDIO Bus using Clause 45 access. More...
 
int adin2111_mdio_c45_write (const struct device *dev, uint8_t prtad, uint8_t devad, uint16_t regad, uint16_t data)
 Write to MDIO bus using Clause 45 access. More...
 

Function Documentation

◆ adin2111_mdio_c45_read()

int adin2111_mdio_c45_read ( const struct device dev,
uint8_t  prtad,
uint8_t  devad,
uint16_t  regad,
uint16_t data 
)

Read from MDIO Bus using Clause 45 access.

Note
The caller is responsible for device lock. Shall not be called from ISR.
Parameters
[in]devMDIO device.
[in]prtadPort address.
[in]devadDevice address.
[in]regadRegister address.
[out]dataPointer to receive read data.
Return values
0If successful.
-EIOGeneral input / output error.
-ETIMEDOUTIf transaction timedout on the bus.
<0Error, a negative errno code.

◆ adin2111_mdio_c45_write()

int adin2111_mdio_c45_write ( const struct device dev,
uint8_t  prtad,
uint8_t  devad,
uint16_t  regad,
uint16_t  data 
)

Write to MDIO bus using Clause 45 access.

Note
The caller is responsible for device lock. Shall not be called from ISR.
Parameters
[in]devMDIO device.
[in]prtadPort address.
[in]devadDevice address.
[in]regadRegister address.
[in]dataData to write.
Return values
0If successful.
-EIOGeneral input / output error.
-ETIMEDOUTIf transaction timedout on the bus.
<0Error, a negative errno code.