NcmEthDeviceAdapter class final
#include <hal/usb/ncm_eth_device_adapter.hpp>
Ethernet-device adapter over TinyUSB NCM backend.
The adapter exposes USB NCM as a generic Ethernet-like L2 device for net::.
Base classes
- class prf::net::eth::IEthernetDevice
- Abstraction of Ethernet-capable L2 device used by lwIP netif runtime.
Constructors, destructors, conversion operators
-
NcmEthDeviceAdapter(prf::
usb:: ncm:: INcmDevice& device) explicit - Wraps one TinyUSB NCM device instance as generic Ethernet backend.
Public functions
- auto dequeue_rx_frame(uint8_t* out, size_t out_capacity, size_t* out_size) -> bool override
- Dequeues one Ethernet frame received from USB host.
- auto enqueue_tx_frame(const uint8_t* frame, size_t frame_size) -> bool override
- Enqueues one Ethernet frame for USB NCM transmission.
- auto init() -> bool override
- Initializes TinyUSB NCM backend and snapshots local lwIP MAC identity.
- auto link_up() const -> bool override
- Returns host-link state as reported by TinyUSB NCM backend.
- auto mac_address() const -> const uint8_t* override
- Returns local lwIP MAC address used on PacketRF side.
- auto mtu_bytes() const -> size_t override
- Returns maximum Ethernet frame bytes without FCS (contract value 1514).
- auto ready() const -> bool override
- Returns true when TinyUSB network function is fully operational.
- void service() override
- Services USB stack and RX/TX queues.
-
void set_rx_wakeup_context(TaskHandle_
t task_handle) override - USB backend does not use task wake notifications.