Skip to content

Commit

Permalink
Allow using is_sta_enabled and is_ap_enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Oct 22, 2023
1 parent 0c6d8a1 commit 1baec64
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions esp-wifi/src/wifi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1059,13 +1059,11 @@ impl<'d> WifiController<'d> {
Ok(())
}

#[allow(unused)]
fn is_sta_enabled(&self) -> Result<bool, WifiError> {
pub fn is_sta_enabled(&self) -> Result<bool, WifiError> {
WifiMode::try_from(&self.config).map(|m| m.is_sta())
}

#[allow(unused)]
fn is_ap_enabled(&self) -> Result<bool, WifiError> {
pub fn is_ap_enabled(&self) -> Result<bool, WifiError> {
WifiMode::try_from(&self.config).map(|m| m.is_ap())
}

Expand Down

0 comments on commit 1baec64

Please sign in to comment.