1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! Linux userspace [`hdmi-hal`] backend backed by `/dev/i2c-N` via the
//! [`i2c-dev`] kernel interface.
//!
//! This crate is the **development, validation, and diagnostic backend** for
//! the HDMI stack — not the production path. It lets you run the full FRL link
//! training stack ([`culvert`], [`plumbob`]) against a real HDMI sink from
//! userspace, without a kernel module.
//!
//! # Quick start
//!
//! ```no_run
//! use hdmi_hal_i2c_dev::{connector_ddc_adapter, I2cDevTransport, StubPhy};
//!
//! // Resolve the DDC adapter for a named connector and open the transport.
//! let path = connector_ddc_adapter("card0-HDMI-A-1")?;
//! let transport = I2cDevTransport::open(path)?;
//!
//! // StubPhy accepts all PHY calls and forwards them to a callback.
//! // Use `|_| {}` for a no-op, or a closure for logging or test assertions.
//! let phy = StubPhy::new(|call| eprintln!("{call:?}"));
//!
//! // Pass transport and phy to culvert / plumbob as you would any other backend.
//! # Ok::<(), hdmi_hal_i2c_dev::I2cDevError>(())
//! ```
//!
//! # Privileges
//!
//! The calling process needs read/write permission on the `/dev/i2c-N` device
//! node. On most Linux desktop systems this means membership in the `i2c`
//! group, or running as root.
//!
//! # `amdgpu` limitation
//!
//! The `amdgpu` DDC adapter collapses all I²C errors to `EIO`. On that
//! hardware, [`I2cTransactionError::kind`] is always
//! [`I2cErrorKind::Unknown`]`{ errno: EIO }` regardless of the actual bus
//! condition. See `doc/architecture.md` for details.
//!
//! [`hdmi-hal`]: https://crates.io/crates/hdmi-hal
//! [`i2c-dev`]: https://www.kernel.org/doc/Documentation/i2c/dev-interface
//! [`culvert`]: https://crates.io/crates/culvert
//! [`plumbob`]: https://crates.io/crates/plumbob
pub use connector_ddc_adapter;
pub use ;
pub use ;
pub use I2cDevTransport;