Update embedded-nal to 0.9. (#66)
This commit is contained in:
parent
a1a063b0c8
commit
ae29db2fd7
8 changed files with 23 additions and 14 deletions
|
|
@ -16,7 +16,7 @@ no-chip-version-assertion = []
|
|||
[dependencies]
|
||||
byteorder = { version = "1.3.4", default-features = false }
|
||||
embedded-hal = "1"
|
||||
embedded-nal = "0.8.0"
|
||||
embedded-nal = "0.9.0"
|
||||
bit_field = "0.10"
|
||||
derive-try-from-primitive = "1"
|
||||
nb = "1.0.0"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
use core::net::Ipv4Addr;
|
||||
|
||||
use crate::bus::Bus;
|
||||
use crate::host::{Host, HostConfig};
|
||||
use crate::MacAddress;
|
||||
use embedded_nal::Ipv4Addr;
|
||||
|
||||
#[derive(Debug)]
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
use core::net::Ipv4Addr;
|
||||
|
||||
mod dhcp;
|
||||
mod manual;
|
||||
|
||||
|
|
@ -6,7 +8,6 @@ pub use self::manual::Manual;
|
|||
use crate::bus::Bus;
|
||||
use crate::register;
|
||||
use crate::MacAddress;
|
||||
use embedded_nal::Ipv4Addr;
|
||||
|
||||
#[derive(Debug)]
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
// TODO remove some of these constructs and use equivalents available from embedded-nal
|
||||
|
||||
pub use embedded_nal::Ipv4Addr;
|
||||
pub use core::net::Ipv4Addr;
|
||||
|
||||
/// MAC address struct. Can be instantiated with `MacAddress::new`.
|
||||
///
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
use core::net::Ipv4Addr;
|
||||
|
||||
use crate::bus::Bus;
|
||||
use crate::register::socketn;
|
||||
use embedded_nal::Ipv4Addr;
|
||||
|
||||
#[derive(Debug)]
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
|
|
|
|||
13
src/tcp.rs
13
src/tcp.rs
|
|
@ -1,3 +1,10 @@
|
|||
use core::{
|
||||
convert::TryFrom,
|
||||
net::{IpAddr, Ipv4Addr, SocketAddr, SocketAddrV4},
|
||||
};
|
||||
|
||||
use embedded_nal::{nb, TcpClientStack, TcpError, TcpErrorKind};
|
||||
|
||||
use crate::{
|
||||
bus::Bus,
|
||||
device::{Device, State},
|
||||
|
|
@ -5,12 +12,6 @@ use crate::{
|
|||
socket::Socket,
|
||||
};
|
||||
|
||||
use embedded_nal::{
|
||||
nb, IpAddr, Ipv4Addr, SocketAddr, SocketAddrV4, TcpClientStack, TcpError, TcpErrorKind,
|
||||
};
|
||||
|
||||
use core::convert::TryFrom;
|
||||
|
||||
#[derive(Debug)]
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
pub enum TcpSocketError<E: core::fmt::Debug> {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
use core::{convert::TryFrom, fmt::Debug};
|
||||
use core::{
|
||||
convert::TryFrom,
|
||||
fmt::Debug,
|
||||
net::{IpAddr, Ipv4Addr, SocketAddr, SocketAddrV4},
|
||||
};
|
||||
|
||||
use embedded_nal::{nb, IpAddr, Ipv4Addr, SocketAddr, SocketAddrV4, UdpClientStack, UdpFullStack};
|
||||
use embedded_nal::{nb, UdpClientStack, UdpFullStack};
|
||||
|
||||
use crate::{
|
||||
bus::Bus,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
use core::net::Ipv4Addr;
|
||||
|
||||
use embedded_hal::spi::SpiDevice;
|
||||
use embedded_nal::Ipv4Addr;
|
||||
|
||||
use crate::bus::{Bus, FourWire, ThreeWire};
|
||||
use crate::device::{Device, DeviceState};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue