MCPcopy Create free account
hub / github.com/chyyuu/os_kernel_lab / main

Function main

user/src/bin/inputdev_event.rs:10–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8
9#[no_mangle]
10pub fn main() -> i32 {
11 println!("Input device event test");
12 loop {
13 if let Some(event) = event_get() {
14 if let Some(decoder_type) = event.decode() {
15 println!("{:?}", decoder_type);
16 if let DecodeType::Key(key, keytype) = decoder_type {
17 if key == Key::Enter && keytype == KeyType::Press {
18 break;
19 }
20 }
21 }
22 }
23 }
24 0
25}

Callers

nothing calls this directly

Calls 2

event_getFunction · 0.85
decodeMethod · 0.80

Tested by

no test coverage detected