|
|
@ -268,6 +268,34 @@ impl Ac { |
|
|
|
Ok(String::from_utf8(vec).unwrap()) |
|
|
|
Ok(String::from_utf8(vec).unwrap()) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
|
|
|
/// 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 { |
|
|
|
impl Drop for Ac { |
|
|
@ -288,5 +316,15 @@ pub enum SecurityMode { |
|
|
|
WPA_TKIP = 4, |
|
|
|
WPA_TKIP = 4, |
|
|
|
WPA2_TKIP = 5, |
|
|
|
WPA2_TKIP = 5, |
|
|
|
WPA_AES = 6, |
|
|
|
WPA_AES = 6, |
|
|
|
WPA2_AES = 7 |
|
|
|
WPA2_AES = 7, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
|
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] |
|
|
|
|
|
|
|
#[repr(u32)] |
|
|
|
|
|
|
|
pub enum NetworkSlot { |
|
|
|
|
|
|
|
First = 0, |
|
|
|
|
|
|
|
Second = 1, |
|
|
|
|
|
|
|
Third = 2 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
*/ |
|
|
|