diff --git a/Cargo.toml b/Cargo.toml index 22ebb70..73ad664 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ nb = "^1" serde = { version = "^1", default-features = false, features = ["derive"] } #ublox-sockets = { version = "0.5", optional = true } ublox-sockets = { git = "https://github.com/BlackbirdHQ/ublox-sockets", branch = "feature/async-borrowed-sockets", optional = true } -embassy-time = "0.2" +embassy-time = "0.3" embassy-sync = "0.5" no-std-net = { version = "^0.6", features = ["serde"] } @@ -47,7 +47,7 @@ embedded-io-async = "0.6" [features] default = ["socket-udp", "socket-tcp", "async", "ublox-sockets"] -async = ["dep:embedded-nal-async", "dep:embassy-futures", "ublox-sockets?/async"] +async = ["dep:embedded-nal-async", "dep:embassy-futures"] defmt = [ "dep:defmt", diff --git a/examples/embassy-stm32-example/Cargo.toml b/examples/embassy-stm32-example/Cargo.toml index ffc067e..f34e1f1 100644 --- a/examples/embassy-stm32-example/Cargo.toml +++ b/examples/embassy-stm32-example/Cargo.toml @@ -6,8 +6,8 @@ edition = "2021" # Example for the STM32H747I-DISCO board with SARA-R5 modem attached to UART8 [dependencies] embassy-stm32 = { version = "0.1.0", features = ["defmt", "stm32h747xi-cm7", "time-driver-any", "exti", "memory-x", "unstable-pac"] } -embassy-executor = { version = "0.4.0", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } -embassy-time = { version = "0.2", features = ["defmt", "defmt-timestamp-uptime"] } +embassy-executor = { version = "0.5.0", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } +embassy-time = { version = "0.3", features = ["defmt", "defmt-timestamp-uptime"] } embassy-sync = { version = "0.5", features = ["defmt"] } diff --git a/examples/embassy-stm32-example/src/main.rs b/examples/embassy-stm32-example/src/main.rs index 5068f64..17adfdb 100644 --- a/examples/embassy-stm32-example/src/main.rs +++ b/examples/embassy-stm32-example/src/main.rs @@ -42,20 +42,20 @@ const URC_CAPACITY: usize = 2; const URC_SUBSCRIBERS: usize = 2; struct MyCelullarConfig { - reset_pin: Option>, + reset_pin: Option>, // reset_pin: Option, - power_pin: Option>>, + power_pin: Option>>, // power_pin: Option, - vint_pin: Option>, + vint_pin: Option>, // vint_pin: Option } impl CellularConfig for MyCelullarConfig { - type ResetPin = Output<'static, AnyPin>; + type ResetPin = Output<'static, >; // type ResetPin = NoPin; - type PowerPin = ReverseOutputPin>; + type PowerPin = ReverseOutputPin>; // type PowerPin = NoPin; - type VintPin = Input<'static, AnyPin>; + type VintPin = Input<'static, >; // type VintPin = NoPin; const FLOW_CONTROL: bool = false; @@ -134,14 +134,14 @@ async fn main_task(spawner: Spawner) { // let power = Output::new(p.PJ4, Level::High, Speed::VeryHigh).degrade(); // let reset = Output::new(p.PF8, Level::High, Speed::VeryHigh).degrade(); let celullar_config = MyCelullarConfig { - reset_pin: Some(Output::new(p.PF8, Level::High, Speed::Low).degrade()), + reset_pin: Some(Output::new(p.PF8, Level::High, Speed::Low)), power_pin: Some(ReverseOutputPin( - Output::new(p.PJ4, Level::Low, Speed::Low).degrade(), + Output::new(p.PJ4, Level::Low, Speed::Low), )), // reset_pin: Some(OutputOpenDrain::new(p.PF8, Level::High, Speed::Low, Pull::None).degrade()), // power_pin: Some(OutputOpenDrain::new(p.PJ4, Level::High, Speed::Low, Pull::None).degrade()), // power_pin: None, - vint_pin: Some(Input::new(p.PJ3, Pull::Down).degrade()), + vint_pin: Some(Input::new(p.PJ3, Pull::Down)), }; static RES_SLOT: ResponseSlot = ResponseSlot::new(); @@ -247,7 +247,7 @@ async fn cellular_task( #[embassy_executor::task(pool_size = 3)] async fn blinky(mut led: AnyPin){ - let mut output = Output::new(led, Level::High, Speed::Low).degrade(); + let mut output = Output::new(led, Level::High, Speed::Low); loop { output.set_high(); Timer::after(Duration::from_millis(1000)).await; diff --git a/src/config.rs b/src/config.rs index 1904b49..30f2522 100644 --- a/src/config.rs +++ b/src/config.rs @@ -93,7 +93,11 @@ pub enum OperatorFormat { #[derive(Debug, Clone)] pub enum Apn { None, - Given{ name: String<64>, username: Option>, password: Option>}, + Given { + name: String<64>, + username: Option>, + password: Option>, + }, #[cfg(any(feature = "automatic-apn"))] Automatic, }