Skip to content

Commit

Permalink
Bump embassy-sync to 0.6 (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
MathiasKoch authored Jun 11, 2024
1 parent 3b3c1a1 commit d819259
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion atat/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ name = "atat"
embedded-io = "0.6.0"
embedded-io-async = "0.6.0"
futures = { version = "0.3", default-features = false }
embassy-sync = "0.5"
embassy-sync = "0.6"
embassy-time = "0.3"
heapless = { version = "^0.8", features = ["serde"] }
serde_at = { path = "../serde_at", version = "^0.22.0", optional = true }
Expand Down
6 changes: 3 additions & 3 deletions atat/src/ingress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub trait AtatIngress {

/// Read all bytes from the provided serial and ingest the read bytes into
/// the ingress from where they will be processed
async fn read_from(&mut self, serial: &mut impl embedded_io_async::Read) -> ! {
async fn read_from<R: embedded_io_async::Read>(&mut self, mut serial: R) -> ! {
use embedded_io::Error;
loop {
let buf = self.write_buf();
Expand Down Expand Up @@ -158,7 +158,7 @@ impl<
if let Some(urc) = Urc::parse(urc_line) {
debug!(
"Received URC/{} ({}/{}): {:?}",
self.urc_publisher.space(),
self.urc_publisher.free_capacity(),
swallowed,
self.pos,
LossyStr(urc_line)
Expand Down Expand Up @@ -242,7 +242,7 @@ impl<
if let Some(urc) = Urc::parse(urc_line) {
debug!(
"Received URC/{} ({}/{}): {:?}",
self.urc_publisher.space(),
self.urc_publisher.free_capacity(),
swallowed,
self.pos,
LossyStr(urc_line)
Expand Down
6 changes: 3 additions & 3 deletions atat/src/urc_channel.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex;
use embassy_sync::pubsub::{PubSubBehavior, PubSubChannel, Publisher, Subscriber};
use embassy_sync::pubsub::{PubSubChannel, Publisher, Subscriber};

use crate::AtatUrc;

Expand Down Expand Up @@ -31,7 +31,7 @@ impl<Urc: AtatUrc, const CAPACITY: usize, const SUBSCRIBERS: usize>
.map_err(|_| Error::MaximumSubscribersReached)
}

pub fn space(&self) -> usize {
self.0.space()
pub fn free_capacity(&self) -> usize {
self.0.free_capacity()
}
}

0 comments on commit d819259

Please sign in to comment.