diff --git a/src/device.rs b/src/device.rs index 29f20a1..92d9a1f 100644 --- a/src/device.rs +++ b/src/device.rs @@ -1,7 +1,4 @@ -use crate::inactive_device::InactiveDevice; -use crate::uninitialized_device::UninitializedDevice; use bit_field::BitArray; -use bus::{ActiveBus, ActiveFourWire, ActiveThreeWire, FourWire, ThreeWire}; use embedded_hal::digital::v2::OutputPin; use crate::bus::{Bus, FourWire, ThreeWire}; diff --git a/src/host/dhcp.rs b/src/host/dhcp.rs index 521a831..f792736 100644 --- a/src/host/dhcp.rs +++ b/src/host/dhcp.rs @@ -4,7 +4,7 @@ use crate::MacAddress; pub struct Dhcp { // settings: HostConfig, - // current: HostConfig, +// current: HostConfig, } impl Dhcp { diff --git a/src/lib.rs b/src/lib.rs index 3819cca..160f9bc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,23 +1,7 @@ #![no_std] #![allow(unused)] #![deny(broken_intra_doc_links)] - #[macro_use(block)] -extern crate nb; - -/// MAC address struct. Represents a MAC address as a u8 array of length 6. Can be instantiated with `MacAddress::new` -#[derive(Copy, Clone, PartialOrd, PartialEq, Default, Debug)] -pub struct MacAddress { - pub address: [u8; 6], -} - -impl MacAddress { - pub fn new(n0: u8, n1: u8, n2: u8, n3: u8, n4: u8, n5: u8) -> Self { - MacAddress { - address: [n0, n1, n2, n3, n4, n5], - } - } -} /// Settings for wake on LAN. Allows the W5500 to optionally emit an interrupt upon receiving a packet #[repr(u8)] @@ -82,6 +66,6 @@ mod udp; mod uninitialized_device; pub use device::Device; -pub use host::{Dhcp,HostConfig,Manual}; +pub use host::{Dhcp, HostConfig, Manual}; pub use net::MacAddress; pub use uninitialized_device::UninitializedDevice; diff --git a/src/uninitialized_device.rs b/src/uninitialized_device.rs index 3774192..0fdc643 100644 --- a/src/uninitialized_device.rs +++ b/src/uninitialized_device.rs @@ -1,12 +1,12 @@ +use embedded_hal::blocking::spi::{Transfer, Write}; +use embedded_hal::digital::v2::OutputPin; +use embedded_nal::Ipv4Addr; + use crate::bus::{Bus, FourWire, ThreeWire}; use crate::device::Device; use crate::host::{Dhcp, Host, Manual}; use crate::register; use crate::{MacAddress, Mode}; -use embedded_hal::blocking::spi::{Transfer, Write}; -use embedded_hal::digital::v2::OutputPin; -use embedded_nal::Ipv4Addr; -use register; pub struct UninitializedDevice { bus: SpiBus,