From b00de39af82dee0c0e46ae504b5790ed2d61178f Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Tue, 29 Jul 2025 13:31:54 +0200 Subject: [PATCH] Fix build of embassy-time with std+defmt. --- .github/ci/book.sh | 1 - ci.sh | 1 + embassy-time/src/driver_std.rs | 3 --- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/ci/book.sh b/.github/ci/book.sh index dada4b348..6c300bf09 100755 --- a/.github/ci/book.sh +++ b/.github/ci/book.sh @@ -18,4 +18,3 @@ kubectl exec $POD -- mkdir -p /usr/share/nginx/html kubectl cp book.tar $POD:/usr/share/nginx/html/ kubectl exec $POD -- find /usr/share/nginx/html kubectl exec $POD -- tar -C /usr/share/nginx/html -xvf /usr/share/nginx/html/book.tar -3 diff --git a/ci.sh b/ci.sh index 1208086a6..bb918b186 100755 --- a/ci.sh +++ b/ci.sh @@ -44,6 +44,7 @@ cargo batch \ --- build --release --manifest-path embassy-embedded-hal/Cargo.toml --target thumbv7em-none-eabi --features time \ --- build --release --manifest-path embassy-sync/Cargo.toml --target thumbv6m-none-eabi --features defmt \ --- build --release --manifest-path embassy-time/Cargo.toml --target thumbv6m-none-eabi --features defmt,defmt-timestamp-uptime,mock-driver \ + --- build --release --manifest-path embassy-time/Cargo.toml --features defmt,std \ --- build --release --manifest-path embassy-time-queue-utils/Cargo.toml --target thumbv6m-none-eabi \ --- build --release --manifest-path embassy-time-queue-utils/Cargo.toml --target thumbv6m-none-eabi --features generic-queue-8 \ --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,medium-ethernet,packet-trace \ diff --git a/embassy-time/src/driver_std.rs b/embassy-time/src/driver_std.rs index a77eed75e..0cdb8f4ac 100644 --- a/embassy-time/src/driver_std.rs +++ b/embassy-time/src/driver_std.rs @@ -6,14 +6,12 @@ use embassy_time_driver::Driver; use embassy_time_queue_utils::Queue; #[derive(Debug)] -#[cfg_attr(feature = "defmt", derive(defmt::Format))] struct TimeDriver { signaler: Signaler, inner: Mutex, } #[derive(Debug)] -#[cfg_attr(feature = "defmt", derive(defmt::Format))] struct Inner { zero_instant: Option, queue: Queue, @@ -69,7 +67,6 @@ fn alarm_thread() { } #[derive(Debug)] -#[cfg_attr(feature = "defmt", derive(defmt::Format))] struct Signaler { mutex: Mutex, condvar: Condvar,