Skip to content

Commit

Permalink
update embedded-update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulf Lilleengen committed Oct 6, 2023
1 parent 653156e commit 4859555
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 14 deletions.
11 changes: 6 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "embedded-update"
version = "0.11.0"
version = "0.12.0"
edition = "2021"
resolver = "2"
description = "Firmware updates for embedded devices supporting multiple update services"
Expand All @@ -19,11 +19,12 @@ exclude = [".github"]
heapless = "0.7"
serde = { version = "1", features = ["derive"], default-features = false }
postcard = { version = "1.0", default-features = false, optional = true }
embedded-io = { version = "0.4.0", default-features = false, features = ["async"], optional = true }
embedded-io-async = { version = "0.6", optional = true }
embedded-io = "0.6"

defmt = { version = "0.3", optional = true }
log = { version = "0.4", optional = true }
embedded-hal-async = {version = "=0.2.0-alpha.1", optional = true }
embedded-hal-async = {version = "1.0.0-rc.1", optional = true }
futures = { version = "0.3", default-features = false, optional = true }
rand_core = { version = "0.6", default-features = false, optional = true }
serde_cbor = { version = "0.11", default-features = false, optional = true }
Expand All @@ -32,12 +33,12 @@ serde_cbor = { version = "0.11", default-features = false, optional = true }
env_logger = "0.9"
tokio = { version = "1", features = ["full"] }
serde_cbor = { version = "0.11", features = ["std"] }
embedded-io = { version = "0.4.0", default-features = false, features = ["async", "std", "tokio", "log"] }
embedded-io-adapters = { version = "0.6.0", features = ["std", "futures-03", "tokio-1"] }
log = "0.4"
rand = "0.8"

[features]
default = ["nightly"]
nightly = ["embedded-hal-async", "futures", "postcard", "embedded-io"]
nightly = ["embedded-hal-async", "futures", "postcard", "embedded-io-async"]
defmt = ["dep:defmt"]
std = []
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Before upgrading check that everything is available on all tier1 targets here:
# https://rust-lang.github.io/rustup-components-history
[toolchain]
channel = "nightly-2023-04-18"
channel = "nightly-2023-10-02"
components = ["clippy"]
2 changes: 1 addition & 1 deletion src/device/serial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use {
protocol::*,
traits::{FirmwareDevice, FirmwareStatus},
},
embedded_io::asynch::{Read, Write},
embedded_io_async::{Read, Write},
heapless::Vec,
postcard::{from_bytes, to_slice},
};
Expand Down
4 changes: 1 addition & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#![no_std]
#![cfg_attr(not(test), no_std)]
#![cfg_attr(feature = "nightly", feature(async_fn_in_trait))]
#![cfg_attr(feature = "nightly", feature(impl_trait_projections))]
#![cfg_attr(feature = "nightly", allow(incomplete_features))]
#![doc = include_str!("../README.md")]
#![deny(missing_docs)]

Expand Down
2 changes: 1 addition & 1 deletion src/service/serial.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use {
embedded_io::asynch::{Read, Write},
embedded_io_async::{Read, Write},
postcard::{from_bytes, to_slice},
};

Expand Down
6 changes: 3 additions & 3 deletions tests/serial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ impl Link {
}
}

impl embedded_io::Io for Link {
impl embedded_io::ErrorType for Link {
type Error = std::io::Error;
}

impl embedded_io::asynch::Read for Link {
impl embedded_io_async::Read for Link {
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
if let Some(m) = self.rx.recv().await {
let to_copy = core::cmp::min(m.len(), buf.len());
Expand All @@ -72,7 +72,7 @@ impl embedded_io::asynch::Read for Link {
}
}

impl embedded_io::asynch::Write for Link {
impl embedded_io_async::Write for Link {
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
for chunk in buf.chunks(1024) {
let mut b = [0; 1024];
Expand Down

0 comments on commit 4859555

Please sign in to comment.