Skip to content

Commit

Permalink
update dependencies to new embassy release
Browse files Browse the repository at this point in the history
  • Loading branch information
tarfu committed Jan 22, 2024
1 parent b6bfa7c commit 5c9a206
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions examples/embassy-stm32-example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }


Expand Down
20 changes: 10 additions & 10 deletions examples/embassy-stm32-example/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@ const URC_CAPACITY: usize = 2;
const URC_SUBSCRIBERS: usize = 2;

struct MyCelullarConfig {
reset_pin: Option<Output<'static, AnyPin>>,
reset_pin: Option<Output<'static, >>,
// reset_pin: Option<NoPin>,
power_pin: Option<ReverseOutputPin<Output<'static, AnyPin>>>,
power_pin: Option<ReverseOutputPin<Output<'static, >>>,
// power_pin: Option<NoPin>,
vint_pin: Option<Input<'static, AnyPin>>,
vint_pin: Option<Input<'static, >>,
// vint_pin: Option<NoPin>
}

impl CellularConfig for MyCelullarConfig {
type ResetPin = Output<'static, AnyPin>;
type ResetPin = Output<'static, >;
// type ResetPin = NoPin;
type PowerPin = ReverseOutputPin<Output<'static, AnyPin>>;
type PowerPin = ReverseOutputPin<Output<'static, >>;
// type PowerPin = NoPin;
type VintPin = Input<'static, AnyPin>;
type VintPin = Input<'static, >;
// type VintPin = NoPin;

const FLOW_CONTROL: bool = false;
Expand Down Expand Up @@ -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<INGRESS_BUF_SIZE> = ResponseSlot::new();
Expand Down Expand Up @@ -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;
Expand Down
6 changes: 5 additions & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ pub enum OperatorFormat {
#[derive(Debug, Clone)]
pub enum Apn {
None,
Given{ name: String<64>, username: Option<String<64>>, password: Option<String<64>>},
Given {
name: String<64>,
username: Option<String<64>>,
password: Option<String<64>>,
},
#[cfg(any(feature = "automatic-apn"))]
Automatic,
}
Expand Down

0 comments on commit 5c9a206

Please sign in to comment.