pub struct Device<SpiBus: Bus, HostImpl: Host> { /* private fields */ }
Implementations§
source§impl<SpiBus: Bus, HostImpl: Host> Device<SpiBus, HostImpl>
impl<SpiBus: Bus, HostImpl: Host> Device<SpiBus, HostImpl>
pub fn reset(
self
) -> Result<UninitializedDevice<SpiBus>, ResetError<SpiBus::Error>>
pub fn gateway(&mut self) -> Result<Ipv4Addr, SpiBus::Error>
pub fn subnet_mask(&mut self) -> Result<Ipv4Addr, SpiBus::Error>
pub fn mac(&mut self) -> Result<MacAddress, SpiBus::Error>
pub fn ip(&mut self) -> Result<Ipv4Addr, SpiBus::Error>
pub fn phy_config(&mut self) -> Result<PhyConfig, SpiBus::Error>
pub fn version(&mut self) -> Result<u8, SpiBus::Error>
pub fn release(self) -> (SpiBus, HostImpl)
pub fn deactivate(self) -> (SpiBus, InactiveDevice<HostImpl>)
Trait Implementations§
source§impl<SpiBus: Bus, HostImpl: Host> TcpClientStack for Device<SpiBus, HostImpl>
impl<SpiBus: Bus, HostImpl: Host> TcpClientStack for Device<SpiBus, HostImpl>
§type Error = TcpSocketError<<SpiBus as Bus>::Error>
type Error = TcpSocketError<<SpiBus as Bus>::Error>
The type returned when we have an error
source§fn socket(&mut self) -> Result<TcpSocket, Self::Error>
fn socket(&mut self) -> Result<TcpSocket, Self::Error>
Open a socket for usage as a TCP client. Read more
source§fn connect(
&mut self,
socket: &mut Self::TcpSocket,
remote: SocketAddr
) -> Result<(), Self::Error>
fn connect(
&mut self,
socket: &mut Self::TcpSocket,
remote: SocketAddr
) -> Result<(), Self::Error>
Connect to the given remote host and port. Read more
source§fn is_connected(&mut self, socket: &Self::TcpSocket) -> Result<bool, Self::Error>
fn is_connected(&mut self, socket: &Self::TcpSocket) -> Result<bool, Self::Error>
Check if this socket is connected
source§fn send(
&mut self,
socket: &mut Self::TcpSocket,
buffer: &[u8]
) -> Result<usize, Self::Error>
fn send(
&mut self,
socket: &mut Self::TcpSocket,
buffer: &[u8]
) -> Result<usize, Self::Error>
Write to the stream. Read more
source§impl<SpiBus, HostImpl> UdpClientStack for Device<SpiBus, HostImpl>where
SpiBus: Bus,
HostImpl: Host,
impl<SpiBus, HostImpl> UdpClientStack for Device<SpiBus, HostImpl>where
SpiBus: Bus,
HostImpl: Host,
§type Error = UdpSocketError<<SpiBus as Bus>::Error>
type Error = UdpSocketError<<SpiBus as Bus>::Error>
The type returned when we have an error
source§fn socket(&mut self) -> Result<Self::UdpSocket, Self::Error>
fn socket(&mut self) -> Result<Self::UdpSocket, Self::Error>
Allocate a socket for further use.
source§fn connect(
&mut self,
socket: &mut Self::UdpSocket,
remote: SocketAddr
) -> Result<(), Self::Error>
fn connect(
&mut self,
socket: &mut Self::UdpSocket,
remote: SocketAddr
) -> Result<(), Self::Error>
Connect a UDP socket with a peer using a dynamically selected port. Read more
source§fn send(
&mut self,
socket: &mut Self::UdpSocket,
buffer: &[u8]
) -> Result<(), Self::Error>
fn send(
&mut self,
socket: &mut Self::UdpSocket,
buffer: &[u8]
) -> Result<(), Self::Error>
Send a datagram to the remote host. Read more