Adapt UDP to W5100
This commit is contained in:
parent
4e9f7f4d22
commit
62e56052cf
16 changed files with 918 additions and 702 deletions
|
|
@ -40,7 +40,7 @@ where
|
|||
|
||||
let count = self.available().min(buf.len() as u16);
|
||||
self.bus
|
||||
.read_frame(self.sock.rx_buffer(), self.ptr, &mut buf[..count as _])?;
|
||||
.read_frame(self.ptr, &mut buf[..count as _])?;
|
||||
Ok(self.skip(count))
|
||||
}
|
||||
|
||||
|
|
@ -110,7 +110,7 @@ where
|
|||
|
||||
let count = buf.len() as u16;
|
||||
self.bus
|
||||
.write_frame(self.sock.tx_buffer(), self.ptr, &buf[..count as _])?;
|
||||
.write_frame(self.ptr, &buf[..count as _])?;
|
||||
self.ptr = self.ptr.wrapping_add(count);
|
||||
self.size -= count;
|
||||
Ok(count)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue