|
Nexus Embedded Platform 1.0.0
Statically assembled reusable embedded mechanisms
|
Caller-owned untagged Ethernet II frames and receive loans. More...
Go to the source code of this file.
Data Structures | |
| struct | nx_eth_tx_request_t |
| Caller-owned immutable contiguous frame, excluding its hardware FCS. More... | |
| struct | nx_eth_link_t |
| Observed PHY fact, supplied explicitly by the external link owner. More... | |
| struct | nx_eth_rx_frame_t |
| Complete immutable frame; release requires this exact incarnation. More... | |
| struct | nx_eth_state_t |
| Latched facts survive receive backpressure and failed wake hints. More... | |
| struct | nx_eth_ops_t |
| struct | nx_eth_port_t |
Macros | |
| #define | NX_ETH_FRAME_MIN 14U |
| #define | NX_ETH_FRAME_MAX 1514U |
| #define | NX_ETH_RX_STORAGE_MIN 1518U |
| #define | NX_ETH_RX_CRC 1U |
| #define | NX_ETH_RX_LENGTH 2U |
| #define | NX_ETH_RX_FRAGMENT 4U |
| #define | NX_ETH_RX_UNSUPPORTED 8U |
| #define | NX_ETH_RX_DMA_ERROR 16U |
| #define | NX_ETH_RX_BACKPRESSURE 32U |
Functions | |
| nx_result_t | nx_eth_tx_prepare (nx_eth_tx_request_t *request, const void *data, size_t length, nx_time_us_t deadline) |
| Prepare an initialized, unborrowed request and its immutable frame. | |
| nx_result_t | nx_eth_port_submit (const nx_eth_port_t *port, nx_eth_tx_request_t *request) |
| Admit one frame into caller-owned hardware descriptors. | |
| nx_result_t | nx_eth_port_cancel (const nx_eth_port_t *port, nx_eth_tx_request_t *request) |
| Close TX admission and drain the shared TX engine without replay. | |
| nx_result_t | nx_eth_port_service (const nx_eth_port_t *port) |
| Task-owner bounded progress; no worker, lock, pool or wait. | |
| nx_result_t | nx_eth_port_acquire (const nx_eth_port_t *port, nx_eth_rx_frame_t *frame) |
| Task-consumer complete-frame loan; EMPTY creates no borrow. | |
| nx_result_t | nx_eth_port_release (const nx_eth_port_t *port, const nx_eth_rx_frame_t *frame) |
| Final consumer access; stale, foreign and double releases reject. | |
| nx_result_t | nx_eth_port_state (const nx_eth_port_t *port, nx_eth_state_t *state) |
| Copy latched instance/link/error facts; output is not retained. | |
| nx_result_t | nx_eth_port_apply_link (const nx_eth_port_t *port, const nx_eth_link_t *link) |
| Apply external PHY observations, not auto-negotiate or invent link. | |
| nx_result_t | nx_eth_port_stop (const nx_eth_port_t *port) |
| Close admission and withdraw MAC/DMA/IRQ sources with readback. | |
| nx_result_t | nx_eth_port_attach_wake (const nx_eth_port_t *port, const nx_irq_wake_t *wake, uint8_t syscall_ceiling) |
| Bind an optional borrowed hint after actual IRQ-policy validation. | |
Caller-owned untagged Ethernet II frames and receive loans.
Definition in file ethernet.h.
| #define NX_ETH_FRAME_MAX 1514U |
Definition at line 14 of file ethernet.h.
| #define NX_ETH_FRAME_MIN 14U |
Definition at line 13 of file ethernet.h.
| #define NX_ETH_RX_BACKPRESSURE 32U |
Definition at line 21 of file ethernet.h.
| #define NX_ETH_RX_CRC 1U |
Definition at line 16 of file ethernet.h.
| #define NX_ETH_RX_DMA_ERROR 16U |
Definition at line 20 of file ethernet.h.
| #define NX_ETH_RX_FRAGMENT 4U |
Definition at line 18 of file ethernet.h.
| #define NX_ETH_RX_LENGTH 2U |
Definition at line 17 of file ethernet.h.
| #define NX_ETH_RX_STORAGE_MIN 1518U |
Definition at line 15 of file ethernet.h.
| #define NX_ETH_RX_UNSUPPORTED 8U |
Definition at line 19 of file ethernet.h.
| nx_result_t nx_eth_port_acquire | ( | const nx_eth_port_t * | port, |
| nx_eth_rx_frame_t * | frame ) |
Task-consumer complete-frame loan; EMPTY creates no borrow.
| [in] | port | Stable started instance and one consumer. |
| [out] | frame | Exact immutable frame loan, not output storage borrow. |
| nx_result_t nx_eth_port_apply_link | ( | const nx_eth_port_t * | port, |
| const nx_eth_link_t * | link ) |
Apply external PHY observations, not auto-negotiate or invent link.
| [in] | port | Serialized task-owner face. |
| [in] | link | Observed up/speed/duplex fact, never a guess. |
| nx_result_t nx_eth_port_attach_wake | ( | const nx_eth_port_t * | port, |
| const nx_irq_wake_t * | wake, | ||
| uint8_t | syscall_ceiling ) |
Bind an optional borrowed hint after actual IRQ-policy validation.
| [in] | port | Started serialized task-owner face. |
| [in] | wake | Borrowed IRQ hint; NULL requests detach. |
| [in] | syscall_ceiling | Exact configured unshifted syscall ceiling. |
| nx_result_t nx_eth_port_cancel | ( | const nx_eth_port_t * | port, |
| nx_eth_tx_request_t * | request ) |
Close TX admission and drain the shared TX engine without replay.
| [in] | port | Serialized task-owner face. |
| [in,out] | request | Live request accepted by this instance. |
| nx_result_t nx_eth_port_release | ( | const nx_eth_port_t * | port, |
| const nx_eth_rx_frame_t * | frame ) |
Final consumer access; stale, foreign and double releases reject.
| [in] | port | The same provider identity as acquisition. |
| [in] | frame | Exact acquired token after final consumer access. |
| nx_result_t nx_eth_port_service | ( | const nx_eth_port_t * | port | ) |
Task-owner bounded progress; no worker, lock, pool or wait.
| [in] | port | Serialized task-owner face and live storage. |
| nx_result_t nx_eth_port_state | ( | const nx_eth_port_t * | port, |
| nx_eth_state_t * | state ) |
Copy latched instance/link/error facts; output is not retained.
| [in] | port | Stable private instance. |
| [out] | state | Unretained output, separate from all provider storage. |
| nx_result_t nx_eth_port_stop | ( | const nx_eth_port_t * | port | ) |
Close admission and withdraw MAC/DMA/IRQ sources with readback.
| [in] | port | Live face and all storage, including held loans. |
| nx_result_t nx_eth_port_submit | ( | const nx_eth_port_t * | port, |
| nx_eth_tx_request_t * | request ) |
Admit one frame into caller-owned hardware descriptors.
| [in] | port | Stable face and live private assembly. |
| [in,out] | request | Prepared storage borrowed on acceptance. |
| nx_result_t nx_eth_tx_prepare | ( | nx_eth_tx_request_t * | request, |
| const void * | data, | ||
| size_t | length, | ||
| nx_time_us_t | deadline ) |
Prepare an initialized, unborrowed request and its immutable frame.
| [in,out] | request | Initialized READY or consumed SETTLED storage. |
| [in] | data | Immutable contiguous Ethernet II frame. |
| [in] | length | Bytes excluding FCS, from 14 through 1514. |
| [in] | deadline | Absolute provider-clock deadline or NEVER. |