Crate w5500_ll[−][src]
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:
- Register accessors.
- 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 formattingIpv4Addr
andSocketAddrV4
withdefmt
.embedded-hal
: Enables theblocking
module which contains implementations of theRegisters
trait using theembedded-hal
traits.std
: Enables conversion betweenstd::net
andw5500_ll::net
types. This is for testing purposes only, thestd
flag will not work on embedded systems because it uses the standard library.
Related Crates
- w5500-hl - Higher level socket operations.
- w5500-regsim - Register simulation using
std::net
.
Modules
blocking | embedded-hal Blocking implementations of the |
net | Networking data types. |
reg | W5500 register addresses. |
spi | Helpers and functions relating to W5500 SPI transfers. |
Structs
Interrupt | Interrupt and interrupt mask register (IR and IMR). |
Mode | Mode register (MR). |
PhyCfg | PHY configuration register (PHYCFGR). |
SocketInterrupt | Socket Interrupt Register (Sn_IR). |
SocketInterruptMask | Socket Interrupt Mask Register (Sn_IMR). |
SocketMode | Socket Mode Register (Sn_MR). |
Enums
BufferSize | RX and TX buffer sizes. |
DuplexStatus | PHY duplex status. |
LinkStatus | PHY link status. |
OperationMode | PHY operation mode. |
Protocol | Socket protocol. |
Socket | W5500 sockets. |
SocketCommand | Socket commands. |
SocketStatus | Socket status. |
SpeedStatus | PHY speed status. |
Constants
COMMON_BLOCK_OFFSET | Common register block address offset. |
SOCKETS | Array of all sockets. |
VERSION | Value of the W5500 VERSIONR register. |
Traits
Registers | W5500 register setters and getters. |
Functions
reset | embedded-hal Reset the W5500 using the reset pin. |