Skip to content

Commit 9645cec

Browse files
authored
Misc updates (#319)
- Switch to OS timer - Update Cargo.lock - Audit new dependencies - Fix examples
1 parent 865bfd4 commit 9645cec

13 files changed

Lines changed: 171 additions & 47 deletions

File tree

Cargo.lock

Lines changed: 27 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ embassy-imxrt = { git = "https://github.com/OpenDevicePartnership/embassy-imxrt"
3737
embassy-sync = { git = "https://github.com/embassy-rs/embassy" }
3838
embassy-time = { git = "https://github.com/embassy-rs/embassy" }
3939
embassy-time-driver = { git = "https://github.com/embassy-rs/embassy" }
40-
embedded-batteries-async = { git = "https://github.com/OpenDevicePartnership/embedded-batteries" }
40+
embedded-batteries-async = "0.1.0"
4141
embedded-cfu-protocol = { git = "https://github.com/OpenDevicePartnership/embedded-cfu" }
4242
embedded-hal = "1.0"
4343
embedded-hal-async = "1.0"

embedded-service/src/power/policy/charger.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@ pub enum PsuState {
4040
Detached,
4141
}
4242

43+
impl From<bool> for PsuState {
44+
fn from(value: bool) -> Self {
45+
match value {
46+
true => PsuState::Attached,
47+
false => PsuState::Detached,
48+
}
49+
}
50+
}
51+
4352
/// Data for a device request
4453
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
4554
#[cfg_attr(feature = "defmt", derive(defmt::Format))]

espi-service/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ log = { workspace = true, optional = true }
1414
embassy-time.workspace = true
1515
embassy-sync.workspace = true
1616
embassy-imxrt = { workspace = true, features = [
17-
"time-driver",
17+
"time-driver-os-timer",
1818
"time",
1919
"mimxrt633s",
2020
] }

examples/rt633/Cargo.lock

Lines changed: 31 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/rt633/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ defmt-rtt = "0.4.0"
1717
panic-probe = { version = "0.3.1", features = ["print-defmt"] }
1818
embassy-imxrt = { git = "https://github.com/OpenDevicePartnership/embassy-imxrt", features = [
1919
"defmt",
20-
"time-driver",
20+
"time-driver-os-timer",
2121
"time",
2222
"mimxrt633s",
2323
"unstable-pac",
@@ -46,7 +46,7 @@ rand = { version = "0.8.5", default-features = false }
4646
espi-service = { path = "../../espi-service", features = ["defmt"] }
4747
embedded-services = { path = "../../embedded-service", features = ["defmt"] }
4848

49-
embedded-batteries-async = { git = "https://github.com/OpenDevicePartnership/embedded-batteries", features = [
49+
embedded-batteries-async = { version = "0.1.0", features = [
5050
"defmt",
5151
] }
5252
bq25773 = { git = "https://github.com/OpenDevicePartnership/bq25773" }

0 commit comments

Comments
 (0)