Conversation
Deploying ferrous-systems-rust-training with
|
| Latest commit: |
eff9248
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f16f2871.ferrous-systems-rust-training.pages.dev |
| Branch Preview URL: | https://asynch-uart.ferrous-systems-rust-training.pages.dev |
|
|
||
| use core::fmt::Write; | ||
| use qemu_aarch32v8r::uart::{CmsdkUart, MutexUart, UART0_ADDR}; | ||
| use qemu_aarch32v8r::uart::{Uart, MutexUart, UART0_ADDR}; |
There was a problem hiding this comment.
What was the reason for renaming CmsdkUart to just Uart? We have other examples in this folder which use a PL011 UART, which requires a different driver, so I don't want to lose the context here about which UART driver is which.
There was a problem hiding this comment.
I think the module was named cmsdk_uart, so I considered the CMSDK naming in the UART structure redundant. But I can revert the naming, so this is explicit in contexts where the module name is not visible.
There was a problem hiding this comment.
I reverted the naming.
|
|
||
| const MAX_WAKERS: usize = 5; | ||
|
|
||
| static TX_WAKERS: [AtomicWaker; 5] = [const { AtomicWaker::new() }; 5]; |
There was a problem hiding this comment.
I'd like to see every fn, static and const in this module documented.
|
|
||
| impl embedded_io_async::Write for TxAsynch { | ||
| /// It is very important that the data which is sent outlives the asynchronous futures | ||
| /// created with it. |
There was a problem hiding this comment.
Can we enforce this with lifetime annotations?
There was a problem hiding this comment.
I am not even sure if this is necessary and maybe the comment can be removed. If I create a future for the asynchronous write, instead of awaiting it, the data is borrowed and can not be modified.
|
Very cool to see this working, and all spelled out. Left some thoughts. |
Co-authored-by: Jonathan Pallant <jonathan.pallant@ferrous-systems.com>
No description provided.