Nexus Embedded Platform 1.0.0
Statically assembled reusable embedded mechanisms
Loading...
Searching...
No Matches
mdio.h File Reference

Narrow Clause22 station management with absolute deadlines. More...

#include "nexus/core/time.h"

Go to the source code of this file.

Data Structures

struct  nx_mdio_ops_t
struct  nx_mdio_port_t

Functions

nx_result_t nx_mdio_read (const nx_mdio_port_t *port, uint8_t address, uint8_t reg, uint16_t *value, nx_time_us_t deadline)
 Read one Clause22 PHY register without retaining output storage.
nx_result_t nx_mdio_write (const nx_mdio_port_t *port, uint8_t address, uint8_t reg, uint16_t value, nx_time_us_t deadline)
 Write one Clause22 PHY register, not a PHY-specific policy sequence.

Detailed Description

Narrow Clause22 station management with absolute deadlines.

Author
Nexus Team

Definition in file mdio.h.

Function Documentation

◆ nx_mdio_read()

nx_result_t nx_mdio_read ( const nx_mdio_port_t * port,
uint8_t address,
uint8_t reg,
uint16_t * value,
nx_time_us_t deadline )

Read one Clause22 PHY register without retaining output storage.

Parameters
[in]portStable face and caller-owned execution context.
[in]addressClause22 PHY address, from 0 through 31.
[in]regClause22 register address, from 0 through 31.
[out]valueWritten only after timely observed completion.
[in]deadlineFinite absolute provider-clock deadline.
Returns
Success, BUSY without a new command, or timeout/input/context error.
Note
Serialized privileged task, incoming masks clear; finite absolute deadline in the provider clock. Address and register are 0..31. BUSY rejects before new MMIO effects; timeout does not pretend busy cleared.

◆ nx_mdio_write()

nx_result_t nx_mdio_write ( const nx_mdio_port_t * port,
uint8_t address,
uint8_t reg,
uint16_t value,
nx_time_us_t deadline )

Write one Clause22 PHY register, not a PHY-specific policy sequence.

Parameters
[in]portStable face and caller-owned execution context.
[in]addressClause22 PHY address, from 0 through 31.
[in]regClause22 register address, from 0 through 31.
[in]valueExact 16-bit register value.
[in]deadlineFinite absolute provider-clock deadline.
Returns
Success, BUSY without a new command, or timeout/input/context error.
Note
Same task/deadline rules as read. No IRQ-masked busy wait or fallback.