Skip to main content

culvert_async/
lib.rs

1//! Async typed access to the HDMI 2.1 SCDC (Status and Control Data Channel) register map.
2//!
3//! `culvert-async` is the async companion to [`culvert`]: [`culvert::Scdc`]'s methods as
4//! `async fn`s over an [`hdmi_hal_async::scdc::ScdcTransport`]. The register map is
5//! culvert's [`culvert::codec`]; this crate only performs the reads and writes, so the sync
6//! and async clients always agree.
7//!
8//! All register types and error types are re-exported from `culvert` so that callers do not
9//! need to depend on both crates, and the transport trait and its `Send` twin from
10//! `hdmi-hal-async`. culvert's I/O-free encoders and decoders, [`culvert::codec`], are not
11//! re-exported: code that needs them depends on culvert.
12//!
13//! # Features
14//!
15//! - **`plumbob-async`** — implements `plumbob_async::ScdcClient` for [`Scdc<T>`], connecting
16//!   culvert-async to the async FRL link training state machine.
17
18#![no_std]
19#![cfg_attr(docsrs, feature(doc_cfg))]
20#![forbid(unsafe_code)]
21#![deny(missing_docs)]
22
23mod client;
24
25pub use client::Scdc;
26pub use culvert::{
27    CedCount, CedCounters, CedReading, CedWarning, ClearableUpdateFlags, Config0, FfeLevels,
28    FrlConfig, FrlRate, HdmiLanes, LtpReq, LtpRequests, ProtocolError, ReadModifyWriteError,
29    RsCorrectionCount, ScdcError, ScramblerStatus, SourceTestConfig, StatusFlags, TmdsConfig,
30    TmdsConfigReading, UpdateFlags,
31};
32/// The async transport `Scdc<T>` is generic over, re-exported from `hdmi-hal-async`.
33pub use hdmi_hal_async::scdc::ScdcTransport;
34/// The transport's `Send` twin, re-exported from `hdmi-hal-async`: bound generic code by it
35/// to spawn work through `Scdc<T>` on a multi-threaded executor.
36pub use hdmi_hal_async::scdc::SendScdcTransport;
37
38// Compiles and runs the README's examples as doctests.
39#[cfg(doctest)]
40#[doc = include_str!("../README.md")]
41struct ReadmeDoctests;