Make internals private (#4029)

* Make internals private

* CHANGELOG.md
This commit is contained in:
Björn Quentin 2025-09-02 17:57:36 +02:00 committed by GitHub
parent 01a01ba99e
commit a337554ea1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 28 additions and 22 deletions

View File

@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Removed ### Removed
- `scan_with_config_sync_max`, `scan_with_config_sync_max`, `scan_n`, and `scan_n_async` functions (#3963) - `scan_with_config_sync_max`, `scan_with_config_sync_max`, `scan_n`, and `scan_n_async` functions (#3963)
- `AtomicWifiState` and `WifiDeviceMode` are not available anymore (#4029)
## [v0.15.0] - 2025-07-16 ## [v0.15.0] - 2025-07-16

View File

@ -1786,7 +1786,7 @@ mod private {
/// Wi-Fi device operational modes. /// Wi-Fi device operational modes.
#[derive(Debug, Clone, Copy)] #[derive(Debug, Clone, Copy)]
pub enum WifiDeviceMode { enum WifiDeviceMode {
/// Station mode. /// Station mode.
Sta, Sta,
/// Access Point mode. /// Access Point mode.

View File

@ -1,31 +1,36 @@
use core::sync::atomic::Ordering; use core::sync::atomic::Ordering;
use portable_atomic_enum::atomic_enum; use private::AtomicWifiState;
pub use private::WifiState;
use super::WifiEvent; use super::WifiEvent;
/// Wi-Fi interface state. mod private {
#[atomic_enum] use portable_atomic_enum::atomic_enum;
#[derive(PartialEq, Debug)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[non_exhaustive]
pub enum WifiState {
/// Station started.
StaStarted,
/// Station connected.
StaConnected,
/// Station disconnected.
StaDisconnected,
/// Station stopped
StaStopped,
/// Access point started. /// Wi-Fi interface state.
ApStarted, #[atomic_enum]
/// Access point stopped. #[derive(PartialEq, Debug)]
ApStopped, #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[non_exhaustive]
pub enum WifiState {
/// Station started.
StaStarted,
/// Station connected.
StaConnected,
/// Station disconnected.
StaDisconnected,
/// Station stopped
StaStopped,
/// Invalid Wi-Fi state. /// Access point started.
Invalid, ApStarted,
/// Access point stopped.
ApStopped,
/// Invalid Wi-Fi state.
Invalid,
}
} }
impl From<WifiEvent> for WifiState { impl From<WifiEvent> for WifiState {