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

Explicit DP83848 identity, reset and observed link mechanism. More...

#include "nexus/io/ethernet.h"
#include "nexus/io/mdio.h"

Go to the source code of this file.

Data Structures

struct  nx_dp83848_mode_t
 External policy explicitly selects autonegotiation or fixed mode. More...
struct  nx_dp83848_t
 Caller-owned PHY state; no board address, reset GPIO or worker default. More...

Macros

#define NX_DP83848_TI_ID   UINT32_C(0x20005CA0)
#define NX_DP83848_NS_ID   UINT32_C(0x20005C90)
#define NX_DP83848_10_HALF   1U
#define NX_DP83848_10_FULL   2U
#define NX_DP83848_100_HALF   4U
#define NX_DP83848_100_FULL   8U

Functions

nx_result_t nx_dp83848_probe (nx_dp83848_t *phy, nx_time_us_t deadline)
 Read exact supported identity; mismatch never becomes a default PHY.
nx_result_t nx_dp83848_reset (nx_dp83848_t *phy, nx_time_us_t deadline)
 Bounded BMCR soft reset and observed self-clearing acknowledgement.
nx_result_t nx_dp83848_configure (nx_dp83848_t *phy, const nx_dp83848_mode_t *mode, nx_time_us_t deadline)
 Start explicit negotiation or fixed mode, never wait for fake link.
nx_result_t nx_dp83848_link (nx_dp83848_t *phy, nx_eth_link_t *link, nx_time_us_t deadline)
 Observe latch-low BMSR twice and DP83848 PHYSTS speed/duplex truth.

Detailed Description

Explicit DP83848 identity, reset and observed link mechanism.

Author
Nexus Team

Definition in file dp83848.h.

Macro Definition Documentation

◆ NX_DP83848_100_FULL

#define NX_DP83848_100_FULL   8U

Definition at line 18 of file dp83848.h.

◆ NX_DP83848_100_HALF

#define NX_DP83848_100_HALF   4U

Definition at line 17 of file dp83848.h.

◆ NX_DP83848_10_FULL

#define NX_DP83848_10_FULL   2U

Definition at line 16 of file dp83848.h.

◆ NX_DP83848_10_HALF

#define NX_DP83848_10_HALF   1U

Definition at line 15 of file dp83848.h.

◆ NX_DP83848_NS_ID

#define NX_DP83848_NS_ID   UINT32_C(0x20005C90)

Definition at line 14 of file dp83848.h.

◆ NX_DP83848_TI_ID

#define NX_DP83848_TI_ID   UINT32_C(0x20005CA0)

Definition at line 13 of file dp83848.h.

Function Documentation

◆ nx_dp83848_configure()

nx_result_t nx_dp83848_configure ( nx_dp83848_t * phy,
const nx_dp83848_mode_t * mode,
nx_time_us_t deadline )

Start explicit negotiation or fixed mode, never wait for fake link.

Parameters
[in,out]phyProved identity, kept live through operations.
[in]modeExplicit fixed mode or negotiation advertisement.
[in]deadlineFinite absolute MDIO clock deadline.
Returns
Success means configured registers; otherwise no configured truth.
Note
Task-only; identity must be proved. SUCCESS means registers configured, not autonegotiation complete. Failures retain configured=false.

◆ nx_dp83848_link()

nx_result_t nx_dp83848_link ( nx_dp83848_t * phy,
nx_eth_link_t * link,
nx_time_us_t deadline )

Observe latch-low BMSR twice and DP83848 PHYSTS speed/duplex truth.

Parameters
[in,out]phyProbed and configured caller-owned component.
[out]linkObserved value, separate from component storage.
[in]deadlineFinite absolute MDIO clock deadline.
Returns
Success copies observed link; other results preserve output.
Note
Task-only; output changes only on SUCCESS. up requires actual link and complete autonegotiation when selected. Protocol or remote fault does not invent speed/link. MAC application remains an external action.

◆ nx_dp83848_probe()

nx_result_t nx_dp83848_probe ( nx_dp83848_t * phy,
nx_time_us_t deadline )

Read exact supported identity; mismatch never becomes a default PHY.

Parameters
[in,out]phyExplicit MDIO face, address and expected supported model.
[in]deadlineFinite absolute MDIO clock deadline.
Returns
Success, UNSUPPORTED for identity mismatch, or MDIO error.

◆ nx_dp83848_reset()

nx_result_t nx_dp83848_reset ( nx_dp83848_t * phy,
nx_time_us_t deadline )

Bounded BMCR soft reset and observed self-clearing acknowledgement.

Parameters
[in,out]phyProved identity and caller-owned component state.
[in]deadlineFinite absolute MDIO clock deadline.
Returns
Success after real reset acknowledgement, or state/MDIO error.
Note
Task-only finite absolute deadline; reset restraps the device and clears configured truth. This is not a GPIO, power or strap proof.