Skip to content

Commit

Permalink
uncomment out load_network_slot
Browse files Browse the repository at this point in the history
  • Loading branch information
adryzz committed Feb 16, 2024
1 parent 0f5e42d commit 9878b47
Showing 1 changed file with 27 additions and 29 deletions.
56 changes: 27 additions & 29 deletions ctru-rs/src/services/ac.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,34 +271,33 @@ impl Ac {
Ok(String::from_utf8(vec)?)
}
}
/*
/// Load the selected network slot, if present.
///
/// Note: this method requires `ac:i` access
/// # Example
///
/// ```
/// # let _runner = test_runner::GdbRunner::default();
/// # use std::error::Error;
/// # fn main() -> Result<(), Box<dyn Error>> {
/// #
/// use ctru::services::ac::Ac;
///
/// let ac = Ac::new()?;
///
/// ac.load_network_slot(NetworkSlot::Second)?;
/// #
/// # Ok(())
/// # }
/// ```
#[doc(alias = "ACI_LoadNetworkSetting")]
pub fn load_network_slot(&self, slot: NetworkSlot) -> crate::Result<()> {
unsafe {
ResultCode(ctru_sys::ACI_LoadNetworkSetting(slot as u32))?;
Ok(())
}

/// Load the selected network slot, if present.
///
/// Note: this method requires `ac:i` access
/// # Example
///
/// ```
/// # let _runner = test_runner::GdbRunner::default();
/// # use std::error::Error;
/// # fn main() -> Result<(), Box<dyn Error>> {
/// #
/// use ctru::services::ac::Ac;
///
/// let ac = Ac::new()?;
///
/// ac.load_network_slot(NetworkSlot::Second)?;
/// #
/// # Ok(())
/// # }
/// ```
#[doc(alias = "ACI_LoadNetworkSetting")]
pub fn load_network_slot(&self, slot: NetworkSlot) -> crate::Result<()> {
unsafe {
ResultCode(ctru_sys::ACI_LoadNetworkSetting(slot as u32))?;
Ok(())
}
*/
}
}

impl Drop for Ac {
Expand Down Expand Up @@ -331,14 +330,13 @@ pub enum SecurityMode {
/// WPA2-AES authentication
WPA2_AES = ctru_sys::AC_WPA2_AES,
}
/*

#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
#[repr(u32)]
pub enum NetworkSlot {
First = 0,
Second = 1,
Third = 2,
}
*/

from_impl!(SecurityMode, ctru_sys::acSecurityMode);

0 comments on commit 9878b47

Please sign in to comment.