Refactoring device state management
This commit is contained in:
parent
1c07b969a1
commit
ec57a2f6f1
4 changed files with 108 additions and 45 deletions
|
|
@ -1,4 +1,9 @@
|
|||
use crate::{bus::Bus, device::Device, host::Host, register::socketn, socket::Socket};
|
||||
use crate::{
|
||||
bus::Bus,
|
||||
device::{Device, State},
|
||||
register::socketn,
|
||||
socket::Socket,
|
||||
};
|
||||
|
||||
use embedded_nal::{nb, IpAddr, Ipv4Addr, SocketAddr, SocketAddrV4, TcpClientStack};
|
||||
|
||||
|
|
@ -200,7 +205,7 @@ impl TcpSocket {
|
|||
}
|
||||
}
|
||||
|
||||
impl<SpiBus: Bus, HostImpl: Host> TcpClientStack for Device<SpiBus, HostImpl> {
|
||||
impl<SpiBus: Bus, StateImpl: State> TcpClientStack for Device<SpiBus, StateImpl> {
|
||||
type TcpSocket = TcpSocket;
|
||||
type Error = TcpSocketError<SpiBus::Error>;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue