Skip to content

Commit 412dcfb

Browse files
committed
Add an example for reading SYSCONF
1 parent 8d292c2 commit 412dcfb

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/bin/sysconf.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//! This is an example of how to read the Wii system settings using Luma.
2+
3+
#![no_std]
4+
5+
extern crate alloc;
6+
extern crate luma_core;
7+
extern crate luma_runtime;
8+
9+
use core::fmt::Write;
10+
use luma_core::println;
11+
use luma_core::sysconf;
12+
13+
fn main() {
14+
let sysconf = sysconf::read_and_parse().unwrap();
15+
println!("Aspect ratio {}", sysconf.aspect_ratio());
16+
println!("{} Hz", sysconf.refresh_rate());
17+
println!("{}", sysconf.progressive());
18+
19+
loop {}
20+
}

0 commit comments

Comments
 (0)