embassy-net-wiznet

Crates

git

Versions

default

Flavors

embassy_net_wiznet

Function 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,
) -> Result<(Device<'a>, Runner<'a, C, SPI, INT, RST>), InitError<SPI::Error>>
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.