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 21, 2023
1 parent 8d292c2 commit 412dcfb
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!("{} Hz", sysconf.refresh_rate());
println!("{}", sysconf.progressive());

loop {}
}

0 comments on commit 412dcfb

Please sign in to comment.