eth: doc
This commit is contained in:
parent
b4bcc6cf5c
commit
b33ccf83ba
|
@ -81,6 +81,8 @@ impl DescList {
|
||||||
entry.word1.write(
|
entry.word1.write(
|
||||||
DescWord1::zeroed()
|
DescWord1::zeroed()
|
||||||
);
|
);
|
||||||
|
// Flush buffer from cache, to be filled by the peripheral
|
||||||
|
// before next read
|
||||||
dcci_slice(&buffer[..]);
|
dcci_slice(&buffer[..]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,6 +131,8 @@ pub struct PktRef<'a> {
|
||||||
|
|
||||||
impl<'a> Drop for PktRef<'a> {
|
impl<'a> Drop for PktRef<'a> {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
|
// Flush buffer from cache, to be filled by the peripheral
|
||||||
|
// before next read
|
||||||
dcci_slice(self.buffer);
|
dcci_slice(self.buffer);
|
||||||
|
|
||||||
self.entry.word0.modify(|_, w| w.used(false));
|
self.entry.word0.modify(|_, w| w.used(false));
|
||||||
|
|
|
@ -124,12 +124,13 @@ pub struct PktRef<'a> {
|
||||||
|
|
||||||
impl<'a> Drop for PktRef<'a> {
|
impl<'a> Drop for PktRef<'a> {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
|
// Write back all dirty cachelines of this buffer
|
||||||
dcc_slice(self.buffer);
|
dcc_slice(self.buffer);
|
||||||
|
|
||||||
self.entry.word1.modify(|_, w| w.used(false));
|
self.entry.word1.modify(|_, w| w.used(false));
|
||||||
if ! self.regs.tx_status.read().tx_go() {
|
if ! self.regs.tx_status.read().tx_go() {
|
||||||
self.regs.net_ctrl.modify(|_, w|
|
// Start TX if not already running
|
||||||
w.start_tx(true)
|
self.regs.net_ctrl.modify(|_, w| w.start_tx(true));
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue