Skip to content

Commit

Permalink
Try parsing EDID
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdavidmackenzie committed Jul 28, 2023
1 parent 6c952f7 commit 865e40c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 21 deletions.
19 changes: 11 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ categories = ["hardware-support", "os::macos-apis"]
edition = "2021"

[dependencies]
core-foundation = "^0.9.1"
core-foundation-sys = "^0.8.1"
core-graphics = "^0.22.1"
ddc = "^0.2.0"
io-kit-sys = "0.1.0"
mach = "^0.3.2"
thiserror = "^1"
edid = "0.3.0"
core-foundation = "0.9"
core-foundation-sys = "0.8"
core-graphics = "0.23"
ddc = "0.2"
io-kit-sys = "0.3"
mach = "0.3"
thiserror = "1"

[dev-dependencies]
edid-rs = "0.1"
nom = "*"

[badges]
maintenance = { status = "actively-developed" }
20 changes: 7 additions & 13 deletions examples/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,14 @@ fn main() {
println!("\tCurrent input: {:04x}", input.value());
}

/*
match edid::parse(data: &[u8]) {
nom::IResult::Done(remaining, parsed) => {
assert_eq!(remaining.len(), 0);
assert_eq!(&parsed, expected);
},
nom::IResult::Error(err) => {
panic!(format!("{}", err));
},
nom::IResult::Incomplete(_) => {
panic!("Incomplete");
},
if let Some(data) = monitor.edid() {
let mut cursor = std::io::Cursor::new(&data);
let mut reader = edid_rs::Reader::new(&mut cursor);
match edid_rs::EDID::parse(&mut reader) {
Ok(edid) => println!("\tEDID Info: {:?}", edid),
_ => println!("\tCould not parse provided EDID information"),
}
}
*/
}
}
}

0 comments on commit 865e40c

Please sign in to comment.