#[non_exhaustive]pub enum EmacError {
Show 15 variants
Timeout,
DmaResetTimeout,
DmaError,
InvalidConfig,
InvalidPhyAddress,
InvalidLength,
FrameTooLarge,
NoDescriptorsAvailable,
DescriptorBusy,
NoFrameAvailable,
FrameError,
BufferTooSmall,
NotInitialized,
AlreadyInitialized,
TxFlushTimeout,
}Expand description
EMAC driver error.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Timeout
MDIO operation timed out (no PHY response within the SMI window).
DmaResetTimeout
DMA software reset (DMABUSMODE.SWR) did not self-clear within
the crate::reset::ResetController timeout. Distinct from
Self::Timeout so callers can tell SMI-bus errors apart from
DMA-controller stuckness.
DmaError
DMA descriptor or buffer error.
InvalidConfig
Invalid configuration (bad pin, clock, etc.).
InvalidPhyAddress
PHY address out of range (must be 0-31).
InvalidLength
Frame length is zero or otherwise invalid.
FrameTooLarge
Frame too large for available descriptors/buffers.
NoDescriptorsAvailable
No TX descriptors available (ring full).
DescriptorBusy
Descriptor is still owned by DMA.
NoFrameAvailable
No received frame available.
FrameError
Received frame has errors (CRC, overflow, etc.).
BufferTooSmall
Caller-provided buffer too small for the received frame.
NotInitialized
DMA engine not initialized.
AlreadyInitialized
init() was called twice.
TxFlushTimeout
stop() could not flush the TX FIFO within
TX_FIFO_FLUSH_TIMEOUT_US. Teardown still proceeded — the
driver state is back to crate::EmacState::Initialized and
MAC/DMA are quiesced — but at least one in-flight TX frame may
have been truncated on the wire. The caller decides whether
to treat this as a recoverable warning (sample, log,
start() again — the engine is ready) or as terminal: there
is no in-crate “re-init” path because crate::Emac::init is
one-shot, so a hard recovery means a peripheral / SoC reset
from the application layer.