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
46
47
48
49
50
//! The LAN9514 spelling of [`crate::ethernet`].
//!
//! That module used to be this one, and was named for the only chip it
//! could drive. It is now generic over
//! [`EthernetAsync`](rpi_hal::usb::ethernet::EthernetAsync) and serves a
//! Pi 3B+'s LAN7800 as well, so the name became wrong — but boards are
//! written against it, and renaming a module is not worth making every one
//! of them edit an import.
//!
//! Everything here is an alias or a one-line forward. New code should use
//! [`crate::ethernet`] directly; nothing is deprecated, because there is
//! nothing wrong with naming your chip when you know it.
use Timer;
use Channel;
use Lan9514;
pub use crate;
/// The packet queues, under the older name — see
/// [`ethernet::EthernetState`](crate::ethernet::EthernetState).
pub type Lan9514State<const N_RX: usize, const N_TX: usize> =
crateEthernetState;
/// The `embassy_net_driver::Driver` half — see
/// [`ethernet::EthernetDriver`](crate::ethernet::EthernetDriver).
pub type Lan9514Driver<'d> = crateEthernetDriver;
/// The task half, fixed to the LAN9514 — see
/// [`ethernet::EthernetRunner`](crate::ethernet::EthernetRunner).
pub type Lan9514Runner<'d, 'c> = crateEthernetRunner;
/// Wraps a LAN9514 as an `embassy-net` device — see
/// [`ethernet::new`](crate::ethernet::new), which this forwards to.
///
/// **`lan9514` must *not* be started**: the runner brings it up itself.
/// That changed when this module became a forward — callers used to call
/// `start` first — and it is the reason [`EthernetConfig`] carries the MAC and the
/// multicast setting rather than those being programmed beforehand. See
/// [`ethernet::new`](crate::ethernet::new) for why the bring-up moved.