diff --git a/esp-hal/CHANGELOG.md b/esp-hal/CHANGELOG.md index 89f7d23ec..da105a6e2 100644 --- a/esp-hal/CHANGELOG.md +++ b/esp-hal/CHANGELOG.md @@ -100,6 +100,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - SPI: Fix naming violations for `Mode` enum variants (#2902) - SPI: Fix naming violations for `Address` and `Command` enum variants (#2906) +- `ClockSource` enums are now `#[non_exhaustive]` (#2912) + ### Fixed - Xtensa devices now correctly enable the `esp-hal-procmacros/rtc-slow` feature (#2594) diff --git a/esp-hal/src/tsens.rs b/esp-hal/src/tsens.rs index 6fe5cfc46..41f7f3cb1 100644 --- a/esp-hal/src/tsens.rs +++ b/esp-hal/src/tsens.rs @@ -54,6 +54,7 @@ use crate::{ /// Clock source for the temperature sensor #[derive(Debug, Clone, Default, PartialEq, Eq, Copy, Hash)] #[cfg_attr(feature = "defmt", derive(defmt::Format))] +#[non_exhaustive] pub enum ClockSource { /// Use RC_FAST clock source RcFast, diff --git a/esp-hal/src/uart.rs b/esp-hal/src/uart.rs index e696fb1ef..287afd98d 100644 --- a/esp-hal/src/uart.rs +++ b/esp-hal/src/uart.rs @@ -313,6 +313,7 @@ impl embedded_io::Error for Error { /// UART clock source #[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] #[cfg_attr(feature = "defmt", derive(defmt::Format))] +#[non_exhaustive] pub enum ClockSource { /// APB_CLK clock source #[cfg_attr(not(any(esp32c6, esp32h2, lp_uart)), default)]