mod bring_up;
mod check;
mod reconnect;
mod restore;
mod tear_down;
pub use bring_up::bring_up;
pub use reconnect::check_reconnect;
pub use restore::quick_restore;
pub use tear_down::tear_down;
use core::time::Duration;
use hdmi_hal::ddc::DdcError;
use hdmi_hal::phy::TmdsPhyConfig;
use hdmi_hal::time::Timestamp;
use crate::error::UpdateError;
use crate::types::{ScramblingStatus, SinkTmdsConfig, TmdsConfigReading};
#[allow(
async_fn_in_trait,
reason = "the core is driven by its own drivers; a Send bound for spawning belongs to the async companion's twin"
)]
pub trait TmdsIo {
type ScdcError: DdcError;
type PhyError: core::fmt::Debug;
async fn write_tmds_config(&mut self, config: SinkTmdsConfig) -> Result<(), Self::ScdcError>;
async fn update_tmds_config(
&mut self,
config: SinkTmdsConfig,
) -> Result<(), UpdateError<Self::ScdcError>>;
async fn read_tmds_config(&mut self) -> Result<TmdsConfigReading, Self::ScdcError>;
async fn read_scrambling_status(&mut self) -> Result<ScramblingStatus, Self::ScdcError>;
async fn read_sink_version(&mut self) -> Result<u8, Self::ScdcError>;
async fn write_source_version(&mut self, version: u8) -> Result<(), Self::ScdcError>;
async fn clear_frl_rate(&mut self) -> Result<(), Self::ScdcError>;
async fn clear_flt_update(&mut self) -> Result<bool, UpdateError<Self::ScdcError>>;
async fn configure(&mut self, config: TmdsPhyConfig) -> Result<(), Self::PhyError>;
async fn set_scrambling(&mut self, enabled: bool) -> Result<(), Self::PhyError>;
async fn start_output(&mut self) -> Result<(), Self::PhyError>;
async fn stop_output(&mut self) -> Result<(), Self::PhyError>;
fn now(&self) -> Timestamp;
async fn delay(&mut self, duration: Duration);
fn cancelled(&self) -> bool;
}
#[cfg(test)]
pub(crate) mod test_io;