From e536a38c0850b4e3b1684e0bf085b6df1c07adff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Tue, 8 Apr 2025 13:50:17 +0200 Subject: [PATCH] Implement Format on i2c::master::Operation (#3348) --- esp-hal/CHANGELOG.md | 1 + esp-hal/src/i2c/master/mod.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/esp-hal/CHANGELOG.md b/esp-hal/CHANGELOG.md index 29c37deba..966ddbf54 100644 --- a/esp-hal/CHANGELOG.md +++ b/esp-hal/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `PeripheralInput::connect_input_to_peripheral` and `PeripheralOuptut::{connect_peripheral_to_output, disconnect_from_peripheral_output}` (#3302) - `ESP_HAL_CONFIG_CRITICAL_SECTION_IMPL` to allow opting out of the default `critical-section` implementation (#3293) - All peripheral singletons (`GpioPin<...>`, `SPIn`, ...) now have a lifetime, as well as `steal`, `reborrow` and `clone_unchecked` methods (#3305) +- `i2c::master::Operation` now implements `defmt::Format` (#3348) ### Changed diff --git a/esp-hal/src/i2c/master/mod.rs b/esp-hal/src/i2c/master/mod.rs index 05357a270..17e1f659d 100644 --- a/esp-hal/src/i2c/master/mod.rs +++ b/esp-hal/src/i2c/master/mod.rs @@ -299,6 +299,7 @@ enum OpKind { /// /// Several operations can be combined as part of a transaction. #[derive(Debug, PartialEq, Eq, Hash, strum::Display)] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] pub enum Operation<'a> { /// Write data from the provided buffer. Write(&'a [u8]),