Skip to content

Commit

Permalink
Remove async feature
Browse files Browse the repository at this point in the history
  • Loading branch information
MathiasKoch committed Feb 23, 2024
1 parent 25e398a commit 89dfd1d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 22 deletions.
26 changes: 11 additions & 15 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ defmt = { version = "^0.3", optional = true }

futures-util = { version = "0.3.29", default-features = false }

embassy-futures = { version = "0.1", optional = true }
embassy-futures = { version = "0.1" }

embedded-hal = "1.0.0"
embedded-nal = "0.8"
embedded-nal-async = { version = "0.7", optional = true }
embedded-nal-async = { version = "0.7" }

embassy-at-cmux = { path = "../embassy/embassy-at-cmux", optional = true }
embassy-net-ppp = { version = "0.1", optional = true }
Expand All @@ -52,30 +52,31 @@ atat = { version = "*", features = ["heapless"] }


[features]
default = ["socket-udp", "socket-tcp", "async", "ppp"]
default = ["socket-udp", "socket-tcp", "ppp"]

ppp = ["dep:embassy-at-cmux", "dep:embassy-net-ppp", "dep:embassy-net"]
internal-network-stack = ["dep:ublox-sockets"]
ppp = ["dep:embassy-at-cmux", "dep:embassy-net-ppp", "dep:embassy-net"]

async = ["dep:embedded-nal-async", "dep:embassy-futures"]
automatic-apn = []
upsd-context-activation = []

socket-tcp = ["ublox-sockets?/socket-tcp", "embassy-net?/tcp"]
socket-udp = ["ublox-sockets?/socket-udp", "embassy-net?/udp"]

defmt = [
"dep:defmt",
"ublox-sockets?/defmt",
"atat/defmt",
"heapless/defmt-03",
"embassy-time/defmt",
"embassy-sync/defmt",
"embassy-futures?/defmt",
"embassy-futures/defmt",
"ublox-sockets?/defmt",
"embassy-net-ppp?/defmt",
"embassy-net?/defmt",
"embassy-at-cmux?/defmt",
]

log = ["dep:log", "ublox-sockets?/log", "atat/log"]

automatic-apn = []

lara-r2 = []
lara-r6 = []
leon-g1 = []
Expand All @@ -90,11 +91,6 @@ toby-l2 = []
toby-r2 = []
toby-l4 = []

upsd-context-activation = []

socket-tcp = ["ublox-sockets?/socket-tcp", "embassy-net?/tcp"]
socket-udp = ["ublox-sockets?/socket-udp", "embassy-net?/udp"]

[workspace]
members = []
default-members = ["."]
Expand Down
2 changes: 1 addition & 1 deletion examples/embassy-rp2040-example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ panic-probe = { version = "0.3.1", features = ["print-defmt"] }
static_cell = { version = "2.0", features = []}

atat = { version = "0.21.0", features = ["derive", "bytes", "defmt"] }
ublox-cellular-rs = {version = "0.4.0", path = "../..", features = ["lara-r6", "defmt", "async"]}
ublox-cellular-rs = {version = "0.4.0", path = "../..", features = ["lara-r6", "defmt"]}

[features]
ppp = ["ublox-cellular-rs/ppp"]
Expand Down
2 changes: 1 addition & 1 deletion examples/embassy-stm32-example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ panic-probe = { version = "0.3.1", features = ["print-defmt"] }
static_cell = { version = "2.0", features = []}

atat = { version = "0.21.0", features = ["derive", "bytes", "defmt"] }
ublox-cellular-rs = {version = "0.4.0", path = "../..", features = ["sara-r5", "defmt", "async"]}
ublox-cellular-rs = {version = "0.4.0", path = "../..", features = ["sara-r5", "defmt"]}

[patch.crates-io]
ublox-sockets = { git = "https://github.com/BlackbirdHQ/ublox-sockets", branch = "feature/async-borrowed-sockets" }
Expand Down
6 changes: 1 addition & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#![cfg_attr(not(test), no_std)]
#![cfg_attr(feature = "async", allow(incomplete_features))]
// #![cfg_attr(feature = "async", feature(generic_const_exprs))]
// #![cfg_attr(feature = "async", feature(async_fn_in_trait))]
// #![cfg_attr(feature = "async", feature(type_alias_impl_trait))]
#![allow(async_fn_in_trait)]

#[cfg(all(feature = "ppp", feature = "internal-network-stack"))]
compile_error!("You may not enable both `ppp` and `internal-network-stack` features.");
Expand All @@ -15,5 +12,4 @@ pub mod config;
pub mod error;
mod module_timing;

#[cfg(feature = "async")]
pub mod asynch;

0 comments on commit 89dfd1d

Please sign in to comment.