Crate w5500_ll[][src]

Expand description

Platform agnostic rust driver for the Wiznet W5500 SPI internet offload chip.

This is a low-level (ll) crate. The scope of this crate is:

  1. Register accessors.
  2. Networking data types.

Higher level functionality (such as socket operations) should be built on-top of what is provided here.

Example

Reading the VERSIONR register (a constant value).

use w5500_ll::{blocking::vdm::W5500, Registers};

let mut w5500 = W5500::new(spi, pin);
let version: u8 = w5500.version()?;
assert_eq!(version, 0x04);

Feature Flags

All features are disabled by default.

  • defmt: Enable formatting most types with defmt.
  • embedded-hal: Enables the blocking module which contains implementations of the Registers trait using the embedded-hal traits.
  • std: Enables conversion between std::net and w5500_ll::net types. This is for testing purposes only, the std flag will not work on embedded systems because it uses the standard library.

Modules

Blocking implementations of the Registers trait using the embedded-hal blocking SPI traits.

Networking data types.

Helpers and functions relating to W5500 SPI transfers.

Structs

Interrupt and interrupt mask register (IR and IMR).

Mode register (MR).

PHY configuration register (PHYCFGR).

Socket Interrupt Register (Sn_IR).

Socket Interrupt Mask Register (Sn_IMR).

Socket Mode Register (Sn_MR).

Enums

RX and TX buffer sizes.

PHY duplex status.

PHY link status.

PHY operation mode.

Socket protocol.

W5500 common register addresses.

W5500 socket numbers.

W5500 socket register addresses.

Socket commands.

Socket status.

PHY speed status.

Constants

Common register block address offset.

Array of all sockets.

Value of the W5500 VERSIONR register.

Traits

W5500 register setters and getters.

Functions

Reset the W5500 using the reset pin.