#edid #liboptic #edid-decode

no-std liboptic_edid

Parses EDIDs from raw bytes (in 100% Rust)

1 unstable release

0.1.0 Nov 10, 2024

#301 in Embedded development

MPL-2.0 license

150KB
3.5K SLoC

liboptic_edid

A library crate to parse EDID information.

Currently, this uses EDID v1.4 and does not account for any incompatbilities with earlier versions. However, after running against around 100k EDIDs, there are only about 5% failing to parse, and no panics.

Usage

The only significant type in the library is Edid. Call Edid::new() with your EDID in bytes to get it parsed!

use liboptic_edid::Edid;

// grab the edid file from disk
let data = std::fs::read("tests/assets/dell_s2417dg.raw.input")?;

// and load it into the parser
let parsed_edid = Edid::new(&data)?;
assert_eq!(parsed_edid.checksum, 0x51);

Compatibility

This crate is #![no_std] but still depends on alloc while pisserror does. When I get around to fixing that, that requirement will be dropped. :)


lib.rs:

liboptic_edid

A library crate to parse EDID information.

Currently, this uses EDID v1.4 and does not account for any incompatbilities with earlier versions. However, after running against around 100k EDIDs, there are only about 5% failing to parse, and no panics.

Usage

The only significant type in the library is Edid. Call Edid::new() with your EDID in bytes to get it parsed!

use liboptic_edid::Edid;

// grab the edid file from disk
let data = std::fs::read("tests/assets/dell_s2417dg.raw.input")?;

// and load it into the parser
let parsed_edid = Edid::new(&data)?;
assert_eq!(parsed_edid.checksum, 0x51);
#

Compatibility

This crate is #![no_std] but still depends on alloc while pisserror does. When I get around to fixing that, that requirement will be dropped. :)

Dependencies

~2.3–3MB
~64K SLoC