Mark ClockSources as #[non_exhaustive] (#2912)

This commit is contained in:
Dániel Buga 2025-01-08 20:07:25 +01:00 committed by GitHub
parent 8a7f8361a6
commit 9f553b1b0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 0 deletions

View File

@ -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)

View File

@ -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,

View File

@ -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)]