Skip to content

Commit

Permalink
Add an example shutting down the Wii
Browse files Browse the repository at this point in the history
This is done using the /dev/stm/immediate device, see
https://wiibrew.org/wiki//dev/stm/immediate
  • Loading branch information
linkmauve committed Apr 21, 2023
1 parent ff45b89 commit 3e453a3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/bin/ios.rs
Original file line number Diff line number Diff line change
@@ -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 {}
}

0 comments on commit 3e453a3

Please sign in to comment.