-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prelude improvements/fixes #860
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Just a small thing, regarding CI, there are a few unused import
warnings in some examples.
Thanks for the heads up! Will get those errors resolved before the next release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Would it be possible to convert the wonky examples (that were previously held back by the prelude)? I think it's just e.g diff --git a/esp32-hal/examples/embassy_serial.rs b/esp32-hal/examples/embassy_serial.rs
index 40d1031..c5dfe23 100644
--- a/esp32-hal/examples/embassy_serial.rs
+++ b/esp32-hal/examples/embassy_serial.rs
@@ -29,13 +29,10 @@ const AT_CMD: u8 = 0x04;
#[embassy_executor::task]
async fn writer(mut tx: UartTx<'static, UART0>) {
esp_println::println!("writing...");
- embedded_io_async::Write::write(
- &mut tx,
- b"Hello async serial. Enter something ended with EOT (CTRL-D).\r\n",
- )
- .await
- .unwrap();
- embedded_io_async::Write::flush(&mut tx).await.unwrap();
+ tx.write(b"Hello async serial. Enter something ended with EOT (CTRL-D).\r\n")
+ .await
+ .unwrap();
+ tx.flush().await.unwrap();
}
#[embassy_executor::task]
@@ -47,7 +44,7 @@ async fn reader(mut rx: UartRx<'static, UART0>) {
let mut rbuf: Vec<u8, MAX_BUFFER_SIZE> = Vec::new();
let mut offset = 0;
- while let Ok(len) = embedded_io_async::Read::read(&mut rx, &mut rbuf[offset..]).await {
+ while let Ok(len) = rx.read(&mut rbuf[offset..]).await {
offset += len;
if offset == 0 {
rbuf.truncate(0);
|
Oh yes of course, I had forgotten about those. Will get that resolved and rebase this branch! |
Actually it looks like I will need to hold off on fixing these until I remove the I have rebased to resolve the merge conflicts, though. |
42b1955
to
75ab337
Compare
As discussed previously with @bjoernQ and @MabezDev:
spi::master
/spi::slave
modulesembedded-hal-async
trait re-exportseh
module, and in turn the[email protected]
trait re-exportsI will deal with
embedded-hal
in a following PR, then I think we should be okay here.