Skip to content

Commit

Permalink
Rename ETQD, bump date
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Dec 22, 2024
1 parent 1c485f1 commit ab8ca3f
Show file tree
Hide file tree
Showing 28 changed files with 49 additions and 61 deletions.
2 changes: 1 addition & 1 deletion .github/ci/doc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ docserver-builder -i ./embassy-stm32-wpan -o webroot/crates/embassy-stm32-wpan/g

docserver-builder -i ./embassy-time -o webroot/crates/embassy-time/git.zup
docserver-builder -i ./embassy-time-driver -o webroot/crates/embassy-time-driver/git.zup
docserver-builder -i ./embassy-time-queue-driver -o webroot/crates/embassy-time-queue-driver/git.zup
docserver-builder -i ./embassy-time-queue-utils -o webroot/crates/embassy-time-queue-utils/git.zup

docserver-builder -i ./embassy-usb -o webroot/crates/embassy-usb/git.zup
docserver-builder -i ./embassy-usb-dfu -o webroot/crates/embassy-usb-dfu/git.zup
Expand Down
2 changes: 1 addition & 1 deletion .github/ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ cargo test --manifest-path ./embassy-futures/Cargo.toml
cargo test --manifest-path ./embassy-sync/Cargo.toml
cargo test --manifest-path ./embassy-embedded-hal/Cargo.toml
cargo test --manifest-path ./embassy-hal-internal/Cargo.toml
cargo test --manifest-path ./embassy-time/Cargo.toml --features mock-driver,embassy-time-queue-driver/generic-queue-8
cargo test --manifest-path ./embassy-time/Cargo.toml --features mock-driver,embassy-time-queue-utils/generic-queue-8
cargo test --manifest-path ./embassy-time-driver/Cargo.toml

cargo test --manifest-path ./embassy-boot/Cargo.toml
Expand Down
4 changes: 2 additions & 2 deletions ci-xtensa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ cargo batch \
--- build --release --manifest-path embassy-executor/Cargo.toml --target xtensa-esp32-none-elf --features arch-spin,executor-thread \
--- build --release --manifest-path embassy-sync/Cargo.toml --target xtensa-esp32s2-none-elf --features defmt \
--- build --release --manifest-path embassy-time/Cargo.toml --target xtensa-esp32s2-none-elf --features defmt,defmt-timestamp-uptime,mock-driver \
--- build --release --manifest-path embassy-time-queue-driver/Cargo.toml --target xtensa-esp32s2-none-elf \
--- build --release --manifest-path embassy-time-queue-driver/Cargo.toml --target xtensa-esp32s2-none-elf --features generic-queue-8 \
--- build --release --manifest-path embassy-time-queue-utils/Cargo.toml --target xtensa-esp32s2-none-elf \
--- build --release --manifest-path embassy-time-queue-utils/Cargo.toml --target xtensa-esp32s2-none-elf --features generic-queue-8 \
--- build --release --manifest-path embassy-net/Cargo.toml --target xtensa-esp32-none-elf --features defmt,tcp,udp,dns,proto-ipv4,medium-ethernet,packet-trace \
--- build --release --manifest-path embassy-net/Cargo.toml --target xtensa-esp32-none-elf --features defmt,tcp,udp,dns,proto-ipv4,multicast,medium-ethernet \
--- build --release --manifest-path embassy-net/Cargo.toml --target xtensa-esp32-none-elf --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet \
Expand Down
4 changes: 2 additions & 2 deletions ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ cargo batch \
--- build --release --manifest-path embassy-executor/Cargo.toml --target riscv32imac-unknown-none-elf --features arch-riscv32,executor-thread \
--- 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-queue-driver/Cargo.toml --target thumbv6m-none-eabi \
--- build --release --manifest-path embassy-time-queue-driver/Cargo.toml --target thumbv6m-none-eabi --features generic-queue-8 \
--- 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 \
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,multicast,medium-ethernet \
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet \
Expand Down
6 changes: 3 additions & 3 deletions docs/pages/faq.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ Example:
[source,toml]
----
[patch.crates-io]
embassy-time-queue-driver = { git = "https://github.com/embassy-rs/embassy.git", rev = "e5fdd35" }
embassy-time-driver = { git = "https://github.com/embassy-rs/embassy.git", rev = "e5fdd35" }
# embassy-time = { git = "https://github.com/embassy-rs/embassy.git", rev = "e5fdd35" }
embassy-time-queue-utils = { git = "https://github.com/embassy-rs/embassy.git", rev = "7f8af8a" }
embassy-time-driver = { git = "https://github.com/embassy-rs/embassy.git", rev = "7f8af8a" }
# embassy-time = { git = "https://github.com/embassy-rs/embassy.git", rev = "7f8af8a" }
----

Note that the git revision should match any other embassy patches or git dependencies that you are using!
Expand Down
2 changes: 1 addition & 1 deletion embassy-executor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.7.0 - 2024-12-18
## 0.7.0 - 2024-12-22

- embassy-executor no longer provides an `embassy-time-queue-driver` implementation
- Added `TaskRef::executor` to obtain a reference to a task's executor
Expand Down
4 changes: 2 additions & 2 deletions embassy-nrf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ _nrf52 = ["_ppi"]
_nrf51 = ["_ppi"]
_nrf91 = []

_time-driver = ["dep:embassy-time-driver", "embassy-time-driver?/tick-hz-32_768", "dep:embassy-time-queue-driver"]
_time-driver = ["dep:embassy-time-driver", "embassy-time-driver?/tick-hz-32_768", "dep:embassy-time-queue-utils"]

# trustzone state.
_s = []
Expand All @@ -135,7 +135,7 @@ _nrf52832_anomaly_109 = []

[dependencies]
embassy-time-driver = { version = "0.2", path = "../embassy-time-driver", optional = true }
embassy-time-queue-driver = { version = "0.2", path = "../embassy-time-queue-driver", optional = true }
embassy-time-queue-utils = { version = "0.1", path = "../embassy-time-queue-utils", optional = true }
embassy-time = { version = "0.4.0", path = "../embassy-time", optional = true }
embassy-sync = { version = "0.6.1", path = "../embassy-sync" }
embassy-hal-internal = {version = "0.2.0", path = "../embassy-hal-internal", features = ["cortex-m", "prio-bits-3"] }
Expand Down
2 changes: 1 addition & 1 deletion embassy-nrf/src/time_driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use critical_section::CriticalSection;
use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex;
use embassy_sync::blocking_mutex::CriticalSectionMutex as Mutex;
use embassy_time_driver::Driver;
use embassy_time_queue_driver::Queue;
use embassy_time_queue_utils::Queue;

use crate::interrupt::InterruptExt;
use crate::{interrupt, pac};
Expand Down
4 changes: 2 additions & 2 deletions embassy-rp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ critical-section-impl = ["critical-section/restore-state-u8"]
unstable-pac = []

## Enable the timer for use with `embassy-time` with a 1MHz tick rate.
time-driver = ["dep:embassy-time-driver", "embassy-time-driver?/tick-hz-1_000_000", "dep:embassy-time-queue-driver"]
time-driver = ["dep:embassy-time-driver", "embassy-time-driver?/tick-hz-1_000_000", "dep:embassy-time-queue-utils"]

## Enable ROM function cache. This will store the address of a ROM function when first used, improving performance of subsequent calls.
rom-func-cache = []
Expand Down Expand Up @@ -110,7 +110,7 @@ binary-info = ["rt", "dep:rp-binary-info", "rp-binary-info?/binary-info"]
[dependencies]
embassy-sync = { version = "0.6.1", path = "../embassy-sync" }
embassy-time-driver = { version = "0.2", path = "../embassy-time-driver", optional = true }
embassy-time-queue-driver = { version = "0.2", path = "../embassy-time-queue-driver", optional = true }
embassy-time-queue-utils = { version = "0.1", path = "../embassy-time-queue-utils", optional = true }
embassy-time = { version = "0.4.0", path = "../embassy-time" }
embassy-futures = { version = "0.1.0", path = "../embassy-futures" }
embassy-hal-internal = {version = "0.2.0", path = "../embassy-hal-internal", features = ["cortex-m", "prio-bits-2"] }
Expand Down
2 changes: 1 addition & 1 deletion embassy-rp/src/time_driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use critical_section::CriticalSection;
use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex;
use embassy_sync::blocking_mutex::Mutex;
use embassy_time_driver::Driver;
use embassy_time_queue_driver::Queue;
use embassy_time_queue_utils::Queue;
#[cfg(feature = "rp2040")]
use pac::TIMER;
#[cfg(feature = "_rp235x")]
Expand Down
4 changes: 2 additions & 2 deletions embassy-stm32/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ rustdoc-args = ["--cfg", "docsrs"]
embassy-sync = { version = "0.6.1", path = "../embassy-sync" }
embassy-time = { version = "0.4.0", path = "../embassy-time", optional = true }
embassy-time-driver = { version = "0.2", path = "../embassy-time-driver", optional = true }
embassy-time-queue-driver = { version = "0.2", path = "../embassy-time-queue-driver", optional = true }
embassy-time-queue-utils = { version = "0.1", path = "../embassy-time-queue-utils", optional = true }
embassy-futures = { version = "0.1.0", path = "../embassy-futures" }
embassy-hal-internal = {version = "0.2.0", path = "../embassy-hal-internal", features = ["cortex-m", "prio-bits-4"] }
embassy-embedded-hal = {version = "0.2.0", path = "../embassy-embedded-hal", default-features = false }
Expand Down Expand Up @@ -150,7 +150,7 @@ time = ["dep:embassy-time", "embassy-embedded-hal/time"]

# Features starting with `_` are for internal use only. They're not intended
# to be enabled by other crates, and are not covered by semver guarantees.
_time-driver = ["dep:embassy-time-driver", "time", "dep:embassy-time-queue-driver"]
_time-driver = ["dep:embassy-time-driver", "time", "dep:embassy-time-queue-utils"]

## Use any time driver
time-driver-any = ["_time-driver"]
Expand Down
2 changes: 1 addition & 1 deletion embassy-stm32/src/time_driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use critical_section::CriticalSection;
use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex;
use embassy_sync::blocking_mutex::Mutex;
use embassy_time_driver::{Driver, TICK_HZ};
use embassy_time_queue_driver::Queue;
use embassy_time_queue_utils::Queue;
use stm32_metapac::timer::{regs, TimGp16};

use crate::interrupt::typelevel::Interrupt;
Expand Down
2 changes: 1 addition & 1 deletion embassy-time-driver/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.2.0 - 2024-12-18
## 0.2.0 - 2024-12-22

- The `allocate_alarm`, `set_alarm_callback`, `set_alarm` functions have been removed.
- `schedule_wake` has been added to the `Driver` trait.
Expand Down
2 changes: 1 addition & 1 deletion embassy-time-driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
//! use core::cell::RefCell;
//! use core::task::Waker;
//!
//! use embassy_time_queue_driver::Queue;
//! use embassy_time_queue_utils::Queue;
//! use embassy_time_driver::Driver;
//!
//! struct MyDriver {
Expand Down
8 changes: 0 additions & 8 deletions embassy-time-queue-driver/README.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
# Changelog for embassy-time-queue-driver
# Changelog for embassy-time-queue-utils

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.2.0 - 2024-12-18

- Added `generic-queue-N` features.
- Added `embassy_time_queue_driver::Queue` struct which uses integrated or a generic storage (configured using `generic-queue-N`).

## 0.1.0 - 2024-01-11

Initial release
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "embassy-time-queue-driver"
version = "0.2.0"
name = "embassy-time-queue-utils"
version = "0.1.0"
edition = "2021"
description = "Timer queue driver trait for embassy-time"
repository = "https://github.com/embassy-rs/embassy"
documentation = "https://docs.embassy.dev/embassy-time-queue-driver"
documentation = "https://docs.embassy.dev/embassy-time-queue-utils"
readme = "README.md"
license = "MIT OR Apache-2.0"
categories = [
Expand Down Expand Up @@ -53,6 +53,6 @@ generic-queue-128 = ["_generic-queue"]
_generic-queue = []

[package.metadata.embassy_docs]
src_base = "https://github.com/embassy-rs/embassy/blob/embassy-time-queue-driver-v$VERSION/embassy-time-queue-driver/src/"
src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-time-queue-driver/src/"
src_base = "https://github.com/embassy-rs/embassy/blob/embassy-time-queue-utils-v$VERSION/embassy-time-queue-utils/src/"
src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-time-queue-utils/src/"
target = "x86_64-unknown-linux-gnu"
8 changes: 8 additions & 0 deletions embassy-time-queue-utils/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# embassy-time-queue-utils

This crate contains timer queues to help implementing an [`embassy-time-driver`](https://crates.io/crates/embassy-time-driver).

As a HAL user, you should not need to depend on this crate.

As a HAL implementer, you need to depend on this crate if you want to implement a time driver,
but how you should do so is documented in `embassy-time-driver`.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@
#![doc = include_str!("../README.md")]
#![warn(missing_docs)]

//! This crate is an implementation detail of `embassy-time-driver`.
//!
//! As a HAL user, you should not need to depend on this crate directly.
//!
//! As a HAL implementer, you need to depend on this crate if you want to implement a time driver,
//! but how you should do so is documented in `embassy-time-driver`.
#[cfg(feature = "_generic-queue")]
pub mod queue_generic;
#[cfg(not(feature = "_generic-queue"))]
Expand Down
2 changes: 1 addition & 1 deletion embassy-time/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.4.0 - 2024-12-18
## 0.4.0 - 2024-12-22

- embassy-time no longer provides an `embassy-time-queue-driver` implementation

Expand Down
18 changes: 9 additions & 9 deletions embassy-time/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ target = "x86_64-unknown-linux-gnu"
features = ["defmt", "std"]

[features]
std = ["tick-hz-1_000_000", "critical-section/std", "dep:embassy-time-queue-driver"]
wasm = ["dep:wasm-bindgen", "dep:js-sys", "dep:wasm-timer", "tick-hz-1_000_000", "dep:embassy-time-queue-driver"]
std = ["tick-hz-1_000_000", "critical-section/std", "dep:embassy-time-queue-utils"]
wasm = ["dep:wasm-bindgen", "dep:js-sys", "dep:wasm-timer", "tick-hz-1_000_000", "dep:embassy-time-queue-utils"]

## Display the time since startup next to defmt log messages.
## At most 1 `defmt-timestamp-uptime-*` feature can be used.
Expand All @@ -40,7 +40,7 @@ defmt-timestamp-uptime-tms = ["defmt"]
defmt-timestamp-uptime-tus = ["defmt"]

## Create a `MockDriver` that can be manually advanced for testing purposes.
mock-driver = ["tick-hz-1_000_000", "dep:embassy-time-queue-driver"]
mock-driver = ["tick-hz-1_000_000", "dep:embassy-time-queue-utils"]

#! ### Generic Queue

Expand All @@ -57,15 +57,15 @@ mock-driver = ["tick-hz-1_000_000", "dep:embassy-time-queue-driver"]
#! end user to pick.

## Generic Queue with 8 timers
generic-queue-8 = ["embassy-time-queue-driver/generic-queue-8"]
generic-queue-8 = ["embassy-time-queue-utils/generic-queue-8"]
## Generic Queue with 16 timers
generic-queue-16 = ["embassy-time-queue-driver/generic-queue-16"]
generic-queue-16 = ["embassy-time-queue-utils/generic-queue-16"]
## Generic Queue with 32 timers
generic-queue-32 = ["embassy-time-queue-driver/generic-queue-32"]
generic-queue-32 = ["embassy-time-queue-utils/generic-queue-32"]
## Generic Queue with 64 timers
generic-queue-64 = ["embassy-time-queue-driver/generic-queue-64"]
generic-queue-64 = ["embassy-time-queue-utils/generic-queue-64"]
## Generic Queue with 128 timers
generic-queue-128 = ["embassy-time-queue-driver/generic-queue-128"]
generic-queue-128 = ["embassy-time-queue-utils/generic-queue-128"]

#! ### Tick Rate
#!
Expand Down Expand Up @@ -409,7 +409,7 @@ tick-hz-5_242_880_000 = ["embassy-time-driver/tick-hz-5_242_880_000"]

[dependencies]
embassy-time-driver = { version = "0.2", path = "../embassy-time-driver" }
embassy-time-queue-driver = { version = "0.2", path = "../embassy-time-queue-driver", optional = true}
embassy-time-queue-utils = { version = "0.1", path = "../embassy-time-queue-utils", optional = true}

defmt = { version = "0.3", optional = true }
log = { version = "0.4.14", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion embassy-time/src/driver_mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use core::task::Waker;

use critical_section::Mutex as CsMutex;
use embassy_time_driver::Driver;
use embassy_time_queue_driver::Queue;
use embassy_time_queue_utils::Queue;

use crate::{Duration, Instant};

Expand Down
2 changes: 1 addition & 1 deletion embassy-time/src/driver_std.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::thread;
use std::time::{Duration as StdDuration, Instant as StdInstant};

use embassy_time_driver::Driver;
use embassy_time_queue_driver::Queue;
use embassy_time_queue_utils::Queue;

struct TimeDriver {
signaler: Signaler,
Expand Down
2 changes: 1 addition & 1 deletion embassy-time/src/driver_wasm.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::sync::Mutex;

use embassy_time_driver::Driver;
use embassy_time_queue_driver::Queue;
use embassy_time_queue_utils::Queue;
use wasm_bindgen::prelude::*;
use wasm_timer::Instant as StdInstant;

Expand Down
2 changes: 1 addition & 1 deletion examples/nrf52840-rtic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ rtic = { version = "2", features = ["thumbv7-backend"] }
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] }
embassy-time = { version = "0.4.0", path = "../../embassy-time", features = [ "defmt", "defmt-timestamp-uptime"] }
embassy-time-queue-driver = { version = "0.2", path = "../../embassy-time-queue-driver", features = ["generic-queue-8"] }
embassy-time-queue-utils = { version = "0.1", path = "../../embassy-time-queue-utils", features = ["generic-queue-8"] }
embassy-nrf = { version = "0.2.0", path = "../../embassy-nrf", features = [ "defmt", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] }

defmt = "0.3"
Expand Down

0 comments on commit ab8ca3f

Please sign in to comment.