Skip to content

Commit 3261bc6

Browse files
authored
Merge pull request #47 from icalder/feat/update-embassy-net-0.6.0
Add support for embassy-net v0.6.0
2 parents 5a4adf4 + f7bd1f8 commit 3261bc6

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

sntpc/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ defmt = ["dep:defmt", "embassy-net/defmt"]
3434
log = { version = "~0.4", optional = true }
3535
chrono = { version = "~0.4", default-features = false, optional = true }
3636
miniloop = { version = "~0.3", optional = true }
37-
embassy-net = { version = "0.5.0", features = ["udp", "proto-ipv4", "proto-ipv6", "medium-ip"], optional = true }
37+
embassy-net = { version = ">=0.5,<0.7", features = ["udp", "proto-ipv4", "proto-ipv6", "medium-ip"], optional = true }
3838
tokio = { version = "1", features = ["net"], optional = true }
3939
defmt = { version = "0.3", optional = true }
4040
cfg-if = "~1"

sntpc/src/types.rs

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ pub(crate) const SECONDS_FRAC_MASK: u64 = 0xffff_ffff;
3838
/// SNTP library result type
3939
pub type Result<T> = core::result::Result<T, Error>;
4040

41+
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
4142
pub(crate) struct NtpPacket {
4243
pub(crate) li_vn_mode: u8,
4344
pub(crate) stratum: u8,
@@ -58,6 +59,7 @@ cfg_if! {
5859

5960
use core::str;
6061

62+
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
6163
pub(crate) struct DebugNtpPacket<'a> {
6264
packet: &'a NtpPacket,
6365
client_recv_timestamp: u64,

0 commit comments

Comments
 (0)