1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// SPDX-FileCopyrightText: 2026 Roman Valls Guimera <brainstorm@nopcode.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
//! Generic network-provider hardware abstraction.
use Future;
use Stack;
use crateHalError;
/// A platform that can bring up a network interface.
///
/// This is the generic cut beneath [`crate::WifiHal`]: it says nothing about
/// what radio (if any) is attached and only promises to hand back an
/// [`embassy_net::Stack`] that is up and usable. Implementations may be
/// backed by built-in `WiFi`, an externally connected module (SDIO/SPI/USB
/// `WiFi`, ATWINC, cyw43, ESP-AT companion, CDC-NCM over USB), or a wired
/// Ethernet PHY.
///
/// Transport-specific configuration happens through the extended trait for
/// that transport (for `WiFi`, see [`crate::WifiHal::configure_ap`]). Call
/// those configuration methods first, then [`Self::bring_up`].
///
/// # Example
///
/// ```ignore
/// async fn start<N: NetworkProviderHal>(net: &mut N) -> Result<Stack<'static>, HalError> {
/// net.bring_up().await
/// }
/// ```