Moved register addresses into register modules, fixed borrow error
This commit is contained in:
parent
b82bb92ead
commit
65a9552816
4 changed files with 86 additions and 37 deletions
|
|
@ -16,7 +16,7 @@ impl<'a, SocketImpl: Socket> InactiveUdpSocket<'a, SocketImpl> {
|
|||
|
||||
pub fn activate<SpiBus: ActiveBus, NetworkImpl: Network>(self, w5500: W5500<SpiBus, NetworkImpl>) -> Result<UdpSocket<'a, SpiBus, NetworkImpl, SocketImpl>, ForeignSocketError> {
|
||||
let (bus, network, sockets) = w5500.release();
|
||||
if self.socket.is_owned_by(sockets) {
|
||||
if self.socket.is_owned_by(&sockets) {
|
||||
Ok(UdpSocket::new(bus, network, sockets, self.socket))
|
||||
} else {
|
||||
Err(ForeignSocketError {})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue