You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pubstructMcuhwc(());implMcuhwc{pubfnnew() -> ctru::Result<Mcuhwc>{unsafe{
ctru::error::ResultCode(ctru_sys::mcuHwcInit())?;Ok(Mcuhwc(()))}}pubfnbatt(&self) -> u8{letmut out = 0u8;unsafe{let _ = ctru_sys::MCUHWC_GetBatteryLevel(&mut out);}
out
}}implDropforMcuhwc{fndrop(&mutself){unsafe{
ctru_sys::mcuHwcExit();}}}
I don't know what the values are between, but I'm pretty sure you can treat it as a percentage (as in, 88u8 is 88% battery)
There's also a function in ctru_sys to get the Charging State, but you can implement that yourself, right? I believe in you, programmer!
The text was updated successfully, but these errors were encountered:
I don't know what the values are between, but I'm pretty sure you can treat it as a percentage (as in, 88u8 is 88% battery)
There's also a function in
ctru_sys
to get the Charging State, but you can implement that yourself, right? I believe in you, programmer!The text was updated successfully, but these errors were encountered: