From efb82b7b05785352d0003b565f15e73ca4e656a1 Mon Sep 17 00:00:00 2001 From: Anshul Gupta Date: Sat, 6 Jan 2024 22:52:08 -0800 Subject: [PATCH 1/4] Changes `make_channel!` macro to accept more types (#877) * Changes `make_channel!` macro to accept more types Changes `type` macro argument from `path` to `ty`, allowing more complex types like tuples, arrays, & pointers. See https://doc.rust-lang.org/reference/types.html#type-expressions. * Adds to `CHANGELOG.md` --- rtic-sync/CHANGELOG.md | 2 ++ rtic-sync/src/channel.rs | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/rtic-sync/CHANGELOG.md b/rtic-sync/CHANGELOG.md index ed10372177c9..0e5ab07adf89 100644 --- a/rtic-sync/CHANGELOG.md +++ b/rtic-sync/CHANGELOG.md @@ -13,6 +13,8 @@ For each category, _Added_, _Changed_, _Fixed_ add new entries at the top! ### Fixed +- `make_channel` now accepts `Type` expressions instead of only `TypePath` expressions. + ## v1.1.1 - 2023-12-04 ### Fixed diff --git a/rtic-sync/src/channel.rs b/rtic-sync/src/channel.rs index 89a23af99010..4f4f0c20badf 100644 --- a/rtic-sync/src/channel.rs +++ b/rtic-sync/src/channel.rs @@ -104,7 +104,7 @@ impl Channel { /// Creates a split channel with `'static` lifetime. #[macro_export] macro_rules! make_channel { - ($type:path, $size:expr) => {{ + ($type:ty, $size:expr) => {{ static mut CHANNEL: $crate::channel::Channel<$type, $size> = $crate::channel::Channel::new(); @@ -596,4 +596,9 @@ mod tests { make(); make(); } + + #[test] + fn tuple_channel() { + let _ = make_channel!((i32, u32), 10); + } } From af1b8e5d8b3974d87067d4224f4ef71177ca5c4d Mon Sep 17 00:00:00 2001 From: Andres Vahter Date: Wed, 10 Jan 2024 21:15:07 +0200 Subject: [PATCH 2/4] update to embedded-hal 1 (#879) * update to eh1 * changelogs about embedded-hal 1.0 --- rtic-monotonics/CHANGELOG.md | 4 ++++ rtic-monotonics/Cargo.toml | 4 ++-- rtic-sync/CHANGELOG.md | 2 ++ rtic-sync/Cargo.toml | 6 +++--- rtic-time/CHANGELOG.md | 2 ++ rtic-time/Cargo.toml | 4 ++-- 6 files changed, 15 insertions(+), 7 deletions(-) diff --git a/rtic-monotonics/CHANGELOG.md b/rtic-monotonics/CHANGELOG.md index 7fb311dd5e1a..ecef55377d23 100644 --- a/rtic-monotonics/CHANGELOG.md +++ b/rtic-monotonics/CHANGELOG.md @@ -7,6 +7,10 @@ For each category, *Added*, *Changed*, *Fixed* add new entries at the top! ## Unreleased +### Changed + +- Using `embedded-hal` 1.0. + ## v1.4.1 - 2023-12-06 ### Fixed diff --git a/rtic-monotonics/Cargo.toml b/rtic-monotonics/Cargo.toml index f85b3fe8516f..dc19ee9ac474 100644 --- a/rtic-monotonics/Cargo.toml +++ b/rtic-monotonics/Cargo.toml @@ -29,8 +29,8 @@ rustdoc-flags = ["--cfg", "docsrs"] [dependencies] rtic-time = { version = "1.1.0", path = "../rtic-time" } -embedded-hal = { version = "1.0.0-rc.2" } -embedded-hal-async = { version = "1.0.0-rc.2", optional = true } +embedded-hal = { version = "1.0" } +embedded-hal-async = { version = "1.0", optional = true } fugit = { version = "0.3.6" } atomic-polyfill = "1" cfg-if = "1.0.0" diff --git a/rtic-sync/CHANGELOG.md b/rtic-sync/CHANGELOG.md index 0e5ab07adf89..96714a4f2635 100644 --- a/rtic-sync/CHANGELOG.md +++ b/rtic-sync/CHANGELOG.md @@ -11,6 +11,8 @@ For each category, _Added_, _Changed_, _Fixed_ add new entries at the top! ### Changed +- Using `embedded-hal` 1.0. + ### Fixed - `make_channel` now accepts `Type` expressions instead of only `TypePath` expressions. diff --git a/rtic-sync/Cargo.toml b/rtic-sync/Cargo.toml index 292230cb70ff..429c33e91658 100644 --- a/rtic-sync/Cargo.toml +++ b/rtic-sync/Cargo.toml @@ -25,9 +25,9 @@ heapless = "0.8" critical-section = "1" rtic-common = { version = "1.0.0", path = "../rtic-common" } portable-atomic = { version = "1", default-features = false } -embedded-hal = { version = "1.0.0-rc.2", optional = true } -embedded-hal-async = { version = "1.0.0-rc.2", optional = true } -embedded-hal-bus = { version = "0.1.0-rc.2", optional = true, features = ["async"] } +embedded-hal = { version = "1.0", optional = true } +embedded-hal-async = { version = "1.0", optional = true } +embedded-hal-bus = { version = "0.1.0", optional = true, features = ["async"] } [dev-dependencies] tokio = { version = "1", features = ["rt", "macros", "time"] } diff --git a/rtic-time/CHANGELOG.md b/rtic-time/CHANGELOG.md index 9bce0a7f0968..e091762a1be4 100644 --- a/rtic-time/CHANGELOG.md +++ b/rtic-time/CHANGELOG.md @@ -11,6 +11,8 @@ For each category, *Added*, *Changed*, *Fixed* add new entries at the top! ### Changed +- Using `embedded-hal` 1.0. + ### Fixed ## v1.2.0 - 2023-12-06 diff --git a/rtic-time/Cargo.toml b/rtic-time/Cargo.toml index 67619a34a740..239ec783b3a5 100644 --- a/rtic-time/Cargo.toml +++ b/rtic-time/Cargo.toml @@ -23,8 +23,8 @@ futures-util = { version = "0.3.25", default-features = false } rtic-common = { version = "1.0.0", path = "../rtic-common" } [dev-dependencies] -embedded-hal = { version = "1.0.0-rc.2" } -embedded-hal-async = { version = "1.0.0-rc.2" } +embedded-hal = { version = "1.0" } +embedded-hal-async = { version = "1.0" } fugit = "0.3.7" parking_lot = "0.12" cassette = "0.2" From f69ecb05a95fd7c2906d060c1548291052dba6bd Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Wed, 10 Jan 2024 20:21:38 +0100 Subject: [PATCH 3/4] Upgrade everything to embedded-hal v1.0.0 (#880) --- rtic-monotonics/CHANGELOG.md | 2 ++ rtic-monotonics/Cargo.toml | 2 +- rtic-sync/CHANGELOG.md | 2 +- rtic-sync/Cargo.toml | 2 +- rtic-time/CHANGELOG.md | 8 ++++++-- rtic-time/Cargo.toml | 2 +- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/rtic-monotonics/CHANGELOG.md b/rtic-monotonics/CHANGELOG.md index ecef55377d23..609145a07616 100644 --- a/rtic-monotonics/CHANGELOG.md +++ b/rtic-monotonics/CHANGELOG.md @@ -7,6 +7,8 @@ For each category, *Added*, *Changed*, *Fixed* add new entries at the top! ## Unreleased +## v1.5.0 - 2024-01-10 + ### Changed - Using `embedded-hal` 1.0. diff --git a/rtic-monotonics/Cargo.toml b/rtic-monotonics/Cargo.toml index dc19ee9ac474..9d65e0f6a70f 100644 --- a/rtic-monotonics/Cargo.toml +++ b/rtic-monotonics/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rtic-monotonics" -version = "1.4.1" +version = "1.5.0" edition = "2021" authors = [ diff --git a/rtic-sync/CHANGELOG.md b/rtic-sync/CHANGELOG.md index 96714a4f2635..b0632c31fedb 100644 --- a/rtic-sync/CHANGELOG.md +++ b/rtic-sync/CHANGELOG.md @@ -7,7 +7,7 @@ For each category, _Added_, _Changed_, _Fixed_ add new entries at the top! ## [Unreleased] -### Added +## v1.2.0 - 2024-01-10 ### Changed diff --git a/rtic-sync/Cargo.toml b/rtic-sync/Cargo.toml index 429c33e91658..7df193d1e37b 100644 --- a/rtic-sync/Cargo.toml +++ b/rtic-sync/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rtic-sync" -version = "1.1.1" +version = "1.2.0" edition = "2021" authors = [ diff --git a/rtic-time/CHANGELOG.md b/rtic-time/CHANGELOG.md index e091762a1be4..b4a25d4b6d02 100644 --- a/rtic-time/CHANGELOG.md +++ b/rtic-time/CHANGELOG.md @@ -11,10 +11,14 @@ For each category, *Added*, *Changed*, *Fixed* add new entries at the top! ### Changed -- Using `embedded-hal` 1.0. - ### Fixed +## v1.3.0 - 2024-01-10 + +### Changed + +- Using `embedded-hal` 1.0. + ## v1.2.0 - 2023-12-06 ### Changed diff --git a/rtic-time/Cargo.toml b/rtic-time/Cargo.toml index 239ec783b3a5..4ad91cde314d 100644 --- a/rtic-time/Cargo.toml +++ b/rtic-time/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rtic-time" -version = "1.2.0" +version = "1.3.0" edition = "2021" authors = [ From 53a7bcab56ab342790ae4d15f0cd73d4e7db00f8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Jan 2024 20:30:27 +0100 Subject: [PATCH 4/4] Bump actions/upload-artifact from 3 to 4 (#868) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 58aaf7d04634..6754a56c587a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -301,7 +301,7 @@ jobs: tar -cf apidocs.tar apidocs - name: Store the API docs - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: apidocs path: apidocs.tar @@ -357,7 +357,7 @@ jobs: tar -cf book.tar bookroot - name: Store the Book + API docs - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: book path: book.tar @@ -433,7 +433,7 @@ jobs: tar -cf mdbookold.tar mdbookold - name: Store the old API docs - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: mdbookold path: mdbookold.tar @@ -616,7 +616,7 @@ jobs: tar -cf bookstodeploy.tar bookstodeploy - name: Store the books - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: bookstodeploy path: bookstodeploy.tar