Embassy
embassy-net-wiznet

Crates

git

Versions

default

Flavors

Function embassy_net_wiznet::new

source ·
pub async fn new<'a, const N_RX: usize, const N_TX: usize, C: Chip, SPI: SpiDevice, INT: Wait, RST: OutputPin>(
    mac_addr: [u8; 6],
    state: &'a mut State<N_RX, N_TX>,
    spi_dev: SPI,
    int: INT,
    reset: RST
) -> (Device<'a>, Runner<'a, C, SPI, INT, RST>)
Expand description

Create a Wiznet ethernet chip driver for embassy-net.

This returns two structs:

  • a Device that you must pass to the embassy-net stack.
  • a Runner. You must call .run() on it in a background task.