diff --git a/esp-hal/src/i2c/master/mod.rs b/esp-hal/src/i2c/master/mod.rs index 2eb957b1f6..e8f47e3171 100644 --- a/esp-hal/src/i2c/master/mod.rs +++ b/esp-hal/src/i2c/master/mod.rs @@ -137,7 +137,12 @@ impl core::error::Error for ConfigError {} impl core::fmt::Display for ConfigError { fn fmt(&self, _f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - Ok(()) + match self { + ConfigError::InvalidFrequency => write!( + f, + "Provided bus frequency is invalid for the current configuration" + ), + } } }