Nexus Embedded Platform 0.1.0
Statically assembled reusable embedded mechanisms
Loading...
Searching...
No Matches
dp83848.h
Go to the documentation of this file.
1
6#ifndef NEXUS_DP83848_H
7#define NEXUS_DP83848_H
8#include "nexus/io/ethernet.h"
9#include "nexus/io/mdio.h"
10#ifdef __cplusplus
11extern "C" {
12#endif
13#define NX_DP83848_TI_ID UINT32_C(0x20005CA0)
14#define NX_DP83848_NS_ID UINT32_C(0x20005C90)
15#define NX_DP83848_10_HALF 1U
16#define NX_DP83848_10_FULL 2U
17#define NX_DP83848_100_HALF 4U
18#define NX_DP83848_100_FULL 8U
20typedef struct {
24 uint16_t speed_mbps;
26
31typedef struct {
33 uint32_t expected_id;
34 uint8_t address;
35 bool probed;
39
64 const nx_dp83848_mode_t* mode,
65 nx_time_us_t deadline);
77 nx_time_us_t deadline);
78#ifdef __cplusplus
79}
80#endif
81#endif
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_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_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.
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.
Caller-owned untagged Ethernet II frames and receive loans.
Narrow Clause22 station management with absolute deadlines.
nx_result_t
Operation result; success at submission means admission only.
Definition status.h:21
External policy explicitly selects autonegotiation or fixed mode.
Definition dp83848.h:20
bool autonegotiation
Definition dp83848.h:22
uint8_t advertisement
Definition dp83848.h:21
uint16_t speed_mbps
Definition dp83848.h:24
Caller-owned PHY state; no board address, reset GPIO or worker default.
Definition dp83848.h:31
const nx_mdio_port_t * mdio
Definition dp83848.h:32
uint32_t expected_id
Definition dp83848.h:33
nx_dp83848_mode_t mode
Definition dp83848.h:37
uint8_t address
Definition dp83848.h:34
bool probed
Definition dp83848.h:35
bool configured
Definition dp83848.h:36
uint64_t nx_time_us_t
Microseconds in one boot/clock domain; no wall-clock semantics.
Definition time.h:20