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]
|
[dependencies]
|
||||||
byteorder = { version = "1.3.4", default-features = false }
|
byteorder = { version = "1.3.4", default-features = false }
|
||||||
embedded-hal = "1"
|
embedded-hal = "1"
|
||||||
embedded-nal = "0.8.0"
|
embedded-nal = "0.9.0"
|
||||||
bit_field = "0.10"
|
bit_field = "0.10"
|
||||||
derive-try-from-primitive = "1"
|
derive-try-from-primitive = "1"
|
||||||
nb = "1.0.0"
|
nb = "1.0.0"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
|
use core::net::Ipv4Addr;
|
||||||
|
|
||||||
use crate::bus::Bus;
|
use crate::bus::Bus;
|
||||||
use crate::host::{Host, HostConfig};
|
use crate::host::{Host, HostConfig};
|
||||||
use crate::MacAddress;
|
use crate::MacAddress;
|
||||||
use embedded_nal::Ipv4Addr;
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
use core::net::Ipv4Addr;
|
||||||
|
|
||||||
mod dhcp;
|
mod dhcp;
|
||||||
mod manual;
|
mod manual;
|
||||||
|
|
||||||
|
|
@ -6,7 +8,6 @@ pub use self::manual::Manual;
|
||||||
use crate::bus::Bus;
|
use crate::bus::Bus;
|
||||||
use crate::register;
|
use crate::register;
|
||||||
use crate::MacAddress;
|
use crate::MacAddress;
|
||||||
use embedded_nal::Ipv4Addr;
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
// TODO remove some of these constructs and use equivalents available from embedded-nal
|
// 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`.
|
/// MAC address struct. Can be instantiated with `MacAddress::new`.
|
||||||
///
|
///
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
use core::net::Ipv4Addr;
|
||||||
|
|
||||||
use crate::bus::Bus;
|
use crate::bus::Bus;
|
||||||
use crate::register::socketn;
|
use crate::register::socketn;
|
||||||
use embedded_nal::Ipv4Addr;
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
#[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::{
|
use crate::{
|
||||||
bus::Bus,
|
bus::Bus,
|
||||||
device::{Device, State},
|
device::{Device, State},
|
||||||
|
|
@ -5,12 +12,6 @@ use crate::{
|
||||||
socket::Socket,
|
socket::Socket,
|
||||||
};
|
};
|
||||||
|
|
||||||
use embedded_nal::{
|
|
||||||
nb, IpAddr, Ipv4Addr, SocketAddr, SocketAddrV4, TcpClientStack, TcpError, TcpErrorKind,
|
|
||||||
};
|
|
||||||
|
|
||||||
use core::convert::TryFrom;
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||||
pub enum TcpSocketError<E: core::fmt::Debug> {
|
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::{
|
use crate::{
|
||||||
bus::Bus,
|
bus::Bus,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
|
use core::net::Ipv4Addr;
|
||||||
|
|
||||||
use embedded_hal::spi::SpiDevice;
|
use embedded_hal::spi::SpiDevice;
|
||||||
use embedded_nal::Ipv4Addr;
|
|
||||||
|
|
||||||
use crate::bus::{Bus, FourWire, ThreeWire};
|
use crate::bus::{Bus, FourWire, ThreeWire};
|
||||||
use crate::device::{Device, DeviceState};
|
use crate::device::{Device, DeviceState};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue