Skip to content

Commit

Permalink
Add an example for reading SYSCONF
Browse files Browse the repository at this point in the history
  • Loading branch information
linkmauve committed Apr 22, 2023
1 parent 74baf83 commit a49503f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/bin/sysconf.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//! This is an example of how to read the Wii system settings using Luma.
#![no_std]

extern crate alloc;
extern crate luma_core;
extern crate luma_runtime;

use core::fmt::Write;
use luma_core::println;
use luma_core::sysconf;

fn main() {
let sysconf = sysconf::read_and_parse().unwrap();
println!("Aspect ratio {:?}", sysconf.aspect_ratio());
println!("{:?}", sysconf.refresh_rate());
println!("{:?}", sysconf.progressive());

loop {}
}

0 comments on commit a49503f

Please sign in to comment.