sync_channel rework #52 #53
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "pca006132/zynq-rs:sync"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
The channels are now basically static.
Now uses macro to construct the sync_channel, cannot think of a better way.
WIP: sync_channel rework #52to sync_channel rework #52Tested in experiments, seems working.
@ -9,6 +10,7 @@ pub mod regs;
pub mod cache;
pub mod mmu;
pub mod mutex;
#[macro_use]
IMO the regular
use
statements are better thanmacro_use
.@ -215,3 +217,3 @@
// match stream.send((0..=255).cycle().take(CHUNK_SIZE)).await {
match stream.send_slice(&tx_data[..]).await {
Ok(len) => stats_tx.borrow_mut().1 += tx_data.len(), //CHUNK_SIZE,
Ok(_) => stats_tx.borrow_mut().1 += tx_data.len(), //CHUNK_SIZE,
unrelated change
@ -226,2 +154,4 @@
}
}
#[macro_export]
https://doc.rust-lang.org/edition-guide/rust-2018/macros/macro-changes.html
Apart from those nitpicks LGTM.
Fixed.