Skip to content

Commit

Permalink
Allow examples to compile using stable compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
rmja committed Jan 9, 2024
1 parent 1e9f258 commit 83190cc
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ opt-level = "s" # <-
overflow-checks = false # <-

[patch.crates-io]
embassy-executor = { version = "0.3", git = "https://github.com/embassy-rs/embassy", rev = "5f7cd82" }
embassy-rp = { version = "0.1", git = "https://github.com/embassy-rs/embassy", rev = "5f7cd82" }
embassy-time = { version = "0.2", git = "https://github.com/embassy-rs/embassy", rev = "5f7cd82" }
embassy-executor = { version = "0.4", git = "https://github.com/embassy-rs/embassy", rev = "49ee0564" }
embassy-rp = { version = "0.1", git = "https://github.com/embassy-rs/embassy", rev = "49ee0564" }
embassy-time = { version = "0.2", git = "https://github.com/embassy-rs/embassy", rev = "49ee0564" }
5 changes: 2 additions & 3 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ cortex-m = { version = "0.7.6", optional = true }
cortex-m-rt = { version = "0.7.3", optional = true }
defmt-rtt = { version = "0.4", optional = true }
panic-probe = { version = "0.3.0", features = ["print-defmt"], optional = true }
embassy-executor = { version = "0.3", features = [
embassy-executor = { version = "0.4", features = [
"defmt",
"nightly",
"arch-cortex-m",
"executor-thread",
"integrated-timers",
Expand All @@ -51,7 +50,7 @@ tokio = { version = "1.26", default-features = false, features = [
"macros",
], optional = true }
tokio-serial = { version = "5.4.4", optional = true }
static_cell = { version = "2", features = ["nightly"] }
static_cell = "2"
portable-atomic = "1.6.0"

[features]
Expand Down
3 changes: 0 additions & 3 deletions examples/rust-toolchain.toml

This file was deleted.

4 changes: 2 additions & 2 deletions examples/src/bin/embassy.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#![no_std]
#![no_main]
#![feature(type_alias_impl_trait)]

use atat::{
asynch::{AtatClient, Client},
Expand Down Expand Up @@ -49,7 +48,8 @@ async fn main(spawner: Spawner) {
&RES_SLOT,
&URC_CHANNEL,
);
let buf = static_cell::make_static!([0; 1024]);
static BUF: StaticCell<[u8; 1024]> = StaticCell::new();

Check failure on line 51 in examples/src/bin/embassy.rs

View workflow job for this annotation

GitHub Actions / Build (thumbv6m-none-eabi)

cannot find type `StaticCell` in this scope

Check failure on line 51 in examples/src/bin/embassy.rs

View workflow job for this annotation

GitHub Actions / Build (thumbv6m-none-eabi)

failed to resolve: use of undeclared type `StaticCell`

Check failure on line 51 in examples/src/bin/embassy.rs

View workflow job for this annotation

GitHub Actions / Build (thumbv6m-none-eabi, derive)

cannot find type `StaticCell` in this scope

Check failure on line 51 in examples/src/bin/embassy.rs

View workflow job for this annotation

GitHub Actions / Build (thumbv6m-none-eabi, derive)

failed to resolve: use of undeclared type `StaticCell`
let buf = BUF.init([0; 1024]);
let mut client = Client::new(writer, &RES_SLOT, buf, atat::Config::default());

spawner.spawn(ingress_task(ingress, reader)).unwrap();
Expand Down
5 changes: 3 additions & 2 deletions examples/src/bin/std-tokio.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#![feature(type_alias_impl_trait)]
use atat_examples::common;

use atat::{
asynch::{AtatClient, Client},
AtatIngress, Config, DefaultDigester, Ingress, ResponseSlot, UrcChannel,
};
use embedded_io_adapters::tokio_1::FromTokio;
use static_cell::StaticCell;
use std::process::exit;
use tokio_serial::SerialStream;

Expand All @@ -26,7 +26,8 @@ async fn main() -> ! {
&RES_SLOT,
&URC_CHANNEL,
);
let buf = static_cell::make_static!([0; 1024]);
static BUF: StaticCell<[u8; 1024]> = StaticCell::new();
let buf = BUF.init([0; 1024]);
let mut client = Client::new(FromTokio::new(writer), &RES_SLOT, buf, Config::default());

tokio::spawn(ingress_task(ingress, FromTokio::new(reader)));
Expand Down

0 comments on commit 83190cc

Please sign in to comment.