Skip to main content

ScdcClient

Trait ScdcClient 

Source
pub trait ScdcClient {
    type Error;

    // Required methods
    async fn read_flt_ready(&mut self) -> Result<bool, Self::Error>;
    async fn read_update_flags(&mut self) -> Result<UpdateFlags, Self::Error>;
    async fn clear_update_flags(
        &mut self,
        flags: ClearableUpdateFlags,
    ) -> Result<(), Self::Error>;
    async fn read_ltp_requests(&mut self) -> Result<LtpRequests, Self::Error>;
    async fn read_source_test_config(
        &mut self,
    ) -> Result<SourceTestConfig, Self::Error>;
    async fn write_config_0_defaults(&mut self) -> Result<(), Self::Error>;
    async fn write_frl_config(
        &mut self,
        config: FrlConfig,
    ) -> Result<(), Self::Error>;
    async fn read_ced(&mut self) -> Result<CedCounters, Self::Error>;
}
Expand description

Async typed SCDC interface required by the FRL training state machine.

This is the async counterpart to plumbob::ScdcClient: the same methods with the same meaning, each an async fn. See that trait for what implementations must guarantee, including where the poll interval belongs (inside the polled methods; an async implementation can await a timer there) and how to stop training early (“Stopping early”): for a deadline or a cancel signal, return one error of your own from a polled read and let every later call through. Training then ends through LTS:L, and train returns TrainingError::Scdc with that error; unlike a dropped train future, this leaves both ends in TMDS (unless exit_to_tmds_on_error is off or the sink sets FLT_no_timeout). Never fail a read made after LTS:L has begun (after a write_frl_config with NotSupported), until a write_frl_config with an FRL rate starts training again. culvert-async implements it for its Scdc<T>.

Required Associated Types§

Source

type Error

Error type returned by SCDC operations.

Required Methods§

Source

async fn read_flt_ready(&mut self) -> Result<bool, Self::Error>

Read FLT_ready (Status_Flags_0 bit 6).

Async counterpart to plumbob::ScdcClient::read_flt_ready.

Source

async fn read_update_flags(&mut self) -> Result<UpdateFlags, Self::Error>

Read the Update_0 flags the state machine uses.

Async counterpart to plumbob::ScdcClient::read_update_flags.

Source

async fn clear_update_flags( &mut self, flags: ClearableUpdateFlags, ) -> Result<(), Self::Error>

Clear the given Update_0 flags (write 1 to clear).

Async counterpart to plumbob::ScdcClient::clear_update_flags.

Source

async fn read_ltp_requests(&mut self) -> Result<LtpRequests, Self::Error>

Read the per-lane link training requests from Status_Flags_1/2.

Async counterpart to plumbob::ScdcClient::read_ltp_requests.

Source

async fn read_source_test_config( &mut self, ) -> Result<SourceTestConfig, Self::Error>

Read Source_Test_Configuration (0x35).

Async counterpart to plumbob::ScdcClient::read_source_test_config.

Source

async fn write_config_0_defaults(&mut self) -> Result<(), Self::Error>

Write Config_0 with read requests disabled and FLT_no_retrain clear.

Async counterpart to plumbob::ScdcClient::write_config_0_defaults.

Source

async fn write_frl_config( &mut self, config: FrlConfig, ) -> Result<(), Self::Error>

Write Config_1: the FRL rate and FFE levels.

Async counterpart to plumbob::ScdcClient::write_frl_config.

Source

async fn read_ced(&mut self) -> Result<CedCounters, Self::Error>

Read the per-lane character error counters, for diagnostics.

Async counterpart to plumbob::ScdcClient::read_ced.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§