From 3e453a336c33dce00b69d1957c86b083a3007419 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Fri, 21 Apr 2023 18:10:15 +0200 Subject: [PATCH] Add an example shutting down the Wii This is done using the /dev/stm/immediate device, see https://wiibrew.org/wiki//dev/stm/immediate --- src/bin/ios.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/bin/ios.rs diff --git a/src/bin/ios.rs b/src/bin/ios.rs new file mode 100644 index 0000000..8667851 --- /dev/null +++ b/src/bin/ios.rs @@ -0,0 +1,14 @@ +//! This is an example of how to shutdown the Wii using Luma. + +#![no_std] + +extern crate luma_core; +extern crate luma_runtime; + +use luma_core::ios; + +fn main() { + let fd = ios::open("/dev/stm/immediate\0", ios::Mode::None).unwrap(); + ios::ioctl(fd, 0x2003, &[], &[]).unwrap(); + loop {} +}