From 6982e47d075e9859fd6635402c2f42a1141609c9 Mon Sep 17 00:00:00 2001 From: James Munns Date: Tue, 21 Jan 2025 20:18:42 +0100 Subject: [PATCH 1/4] Update version for release --- embedded-hal-bus/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embedded-hal-bus/Cargo.toml b/embedded-hal-bus/Cargo.toml index 605f01b8..7f404e3d 100644 --- a/embedded-hal-bus/Cargo.toml +++ b/embedded-hal-bus/Cargo.toml @@ -12,7 +12,7 @@ license = "MIT OR Apache-2.0" name = "embedded-hal-bus" readme = "README.md" repository = "https://github.com/rust-embedded/embedded-hal" -version = "0.2.0" +version = "0.3.0" [features] # Enable shared bus implementations using `std::sync::Mutex` From df0880458fb942856d6fde14a80530f8db3eff4c Mon Sep 17 00:00:00 2001 From: James Munns Date: Tue, 21 Jan 2025 20:23:08 +0100 Subject: [PATCH 2/4] Fix clippy errors --- embedded-hal-bus/src/i2c/mutex.rs | 4 ++-- embedded-hal-bus/src/spi/mutex.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/embedded-hal-bus/src/i2c/mutex.rs b/embedded-hal-bus/src/i2c/mutex.rs index ef4a9f51..1fc1b438 100644 --- a/embedded-hal-bus/src/i2c/mutex.rs +++ b/embedded-hal-bus/src/i2c/mutex.rs @@ -19,14 +19,14 @@ impl<'a, T> MutexDevice<'a, T> { } } -impl<'a, T> ErrorType for MutexDevice<'a, T> +impl ErrorType for MutexDevice<'_, T> where T: I2c, { type Error = T::Error; } -impl<'a, T> I2c for MutexDevice<'a, T> +impl I2c for MutexDevice<'_, T> where T: I2c, { diff --git a/embedded-hal-bus/src/spi/mutex.rs b/embedded-hal-bus/src/spi/mutex.rs index 83fe85d8..e3afc71e 100644 --- a/embedded-hal-bus/src/spi/mutex.rs +++ b/embedded-hal-bus/src/spi/mutex.rs @@ -70,7 +70,7 @@ impl<'a, BUS, CS> MutexDevice<'a, BUS, CS, super::NoDelay> { } } -impl<'a, BUS, CS, D> ErrorType for MutexDevice<'a, BUS, CS, D> +impl ErrorType for MutexDevice<'_, BUS, CS, D> where BUS: ErrorType, CS: OutputPin, @@ -78,7 +78,7 @@ where type Error = DeviceError; } -impl<'a, Word: Copy + 'static, BUS, CS, D> SpiDevice for MutexDevice<'a, BUS, CS, D> +impl SpiDevice for MutexDevice<'_, BUS, CS, D> where BUS: SpiBus, CS: OutputPin, From 0c481ea805b31078d5cc7b40a8c6fd753a9e16b5 Mon Sep 17 00:00:00 2001 From: James Munns Date: Tue, 21 Jan 2025 20:32:26 +0100 Subject: [PATCH 3/4] Update changelog --- embedded-hal-bus/CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/embedded-hal-bus/CHANGELOG.md b/embedded-hal-bus/CHANGELOG.md index d9009d9c..6f166633 100644 --- a/embedded-hal-bus/CHANGELOG.md +++ b/embedded-hal-bus/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +- Your change here! + +## [v0.3.0] - 2025-01-21 + - Added the `alloc` feature. - Added a new `RcDevice` for I2C and SPI, a reference-counting equivalent to `RefCellDevice`. - Migrated `std` feature-gated `std::error::Error` implementations to `core::error::Error` @@ -64,7 +68,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). First release to crates.io -[Unreleased]: https://github.com/rust-embedded/embedded-hal/compare/embedded-hal-bus-v0.2.0...HEAD +[Unreleased]: https://github.com/rust-embedded/embedded-hal/compare/embedded-hal-bus-v0.3.0...HEAD +[v0.3.0]: https://github.com/rust-embedded/embedded-hal/compare/embedded-hal-bus-v0.2.0...embedded-hal-bus-v0.3.0 [v0.2.0]: https://github.com/rust-embedded/embedded-hal/compare/embedded-hal-bus-v0.1.0...embedded-hal-bus-v0.2.0 [v0.1.0]: https://github.com/rust-embedded/embedded-hal/compare/embedded-hal-bus-v0.1.0-rc.3...embedded-hal-bus-v0.1.0 [v0.1.0-rc.3]: https://github.com/rust-embedded/embedded-hal/compare/embedded-hal-bus-v0.1.0-rc.2...embedded-hal-bus-v0.1.0-rc.3 From 10f15095e62b9659b8082a118c2e20d031463f2a Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Tue, 21 Jan 2025 22:45:16 +0100 Subject: [PATCH 4/4] bus: add `portable-atomic` feature to changelog. --- embedded-hal-bus/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/embedded-hal-bus/CHANGELOG.md b/embedded-hal-bus/CHANGELOG.md index 6f166633..a3680bc2 100644 --- a/embedded-hal-bus/CHANGELOG.md +++ b/embedded-hal-bus/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [v0.3.0] - 2025-01-21 +- `AtomicDevice` now requires enabling feature `portable-atomic` on `thumbv6m-none-eabi` and other targets that don't have atomic CAS. - Added the `alloc` feature. - Added a new `RcDevice` for I2C and SPI, a reference-counting equivalent to `RefCellDevice`. - Migrated `std` feature-gated `std::error::Error` implementations to `core::error::Error`