fmt
This commit is contained in:
parent
daa1c00cc3
commit
b49f41c853
4 changed files with 6 additions and 25 deletions
|
|
@ -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};
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use crate::MacAddress;
|
|||
|
||||
pub struct Dhcp {
|
||||
// settings: HostConfig,
|
||||
// current: HostConfig,
|
||||
// current: HostConfig,
|
||||
}
|
||||
|
||||
impl Dhcp {
|
||||
|
|
|
|||
18
src/lib.rs
18
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;
|
||||
|
|
|
|||
|
|
@ -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<SpiBus: Bus> {
|
||||
bus: SpiBus,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue