Skip to main content

BringUpConfig

Struct BringUpConfig 

Source
#[non_exhaustive]
pub struct BringUpConfig { pub ratio_wait: Duration, pub scrambling_deadline: Duration, pub check_window: Duration, pub check_interval: Duration, pub clear_frl: ClearFrl, pub source_version: SourceVersionWrite, pub output_during_sink_write: OutputDuringSinkWrite, pub tmds_config_write: TmdsConfigWrite, pub on_tmds_config_failure: OnTmdsConfigFailure, pub tear_down_on_error: bool, pub tear_down: TearDownConfig, }
Expand description

Bring-up and quick-restore settings.

DEFAULT (also Default) holds the default of every field; the with_… setters change one each, as const fn, so firmware can fix its settings at compile time.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§ratio_wait: Duration

How long to wait after the sink’s TMDS_Config write before starting the output, so the sink can switch its clock ratio. Default 1 ms.

§scrambling_deadline: Duration

The longest time from the sink’s TMDS_Config write to scrambled output reaching the sink: to the output’s start, or with OutputDuringSinkWrite::Running to the scrambler coming on. The wait counts towards it. Later is a warning (DeadlineMissed), not a failure. Default 100 ms.

§check_window: Duration

How long the scrambling check reads Scrambling_Status, from the output’s start (from the scrambler coming on, with OutputDuringSinkWrite::Running and in the quick restore). Default 200 ms.

§check_interval: Duration

The time between two reads of the check, and the longest slice of the ratio wait between two reads of the cancel flag. Default 1 ms.

§clear_frl: ClearFrl

Which sinks get the FRL clear before a bring-up.

§source_version: SourceVersionWrite

When the source writes Source_Version.

§output_during_sink_write: OutputDuringSinkWrite

Whether the output is stopped while the sink’s TMDS_Config is written.

§tmds_config_write: TmdsConfigWrite

How TMDS_Config is written.

§on_tmds_config_failure: OnTmdsConfigFailure

What a failed TMDS_Config write does to the bring-up.

§tear_down_on_error: bool

Whether an error is followed by a tear-down, so no half-started output is left behind. Default true; off leaves both ends as the error left them.

§tear_down: TearDownConfig

The tear-down settings used after an error and when the bring-up is cancelled.

Implementations§

Source§

impl BringUpConfig

Source

pub const DEFAULT: BringUpConfig

Every field at its default.

Source

pub const fn validate(&self) -> Result<(), ConfigError>

Checks the timings for combinations that defeat their purpose; the procedures run with any values.

§Errors

ConfigError with every problem found: a scrambling deadline not longer than the ratio wait, which counts towards it, so every bring-up misses it; a check interval not shorter than the check window, so the check reads once; a check interval of 0, so the check reads back to back, as fast as the bus answers.

Source

pub const fn with_ratio_wait(self, ratio_wait: Duration) -> BringUpConfig

Sets ratio_wait.

Source

pub const fn with_scrambling_deadline( self, scrambling_deadline: Duration, ) -> BringUpConfig

Source

pub const fn with_check_window(self, check_window: Duration) -> BringUpConfig

Source

pub const fn with_check_interval( self, check_interval: Duration, ) -> BringUpConfig

Source

pub const fn with_clear_frl(self, clear_frl: ClearFrl) -> BringUpConfig

Sets clear_frl.

Source

pub const fn with_source_version( self, source_version: SourceVersionWrite, ) -> BringUpConfig

Source

pub const fn with_output_during_sink_write( self, output_during_sink_write: OutputDuringSinkWrite, ) -> BringUpConfig

Source

pub const fn with_tmds_config_write( self, tmds_config_write: TmdsConfigWrite, ) -> BringUpConfig

Source

pub const fn with_on_tmds_config_failure( self, on_tmds_config_failure: OnTmdsConfigFailure, ) -> BringUpConfig

Source

pub const fn with_tear_down_on_error( self, tear_down_on_error: bool, ) -> BringUpConfig

Source

pub const fn with_tear_down(self, tear_down: TearDownConfig) -> BringUpConfig

Sets tear_down.

Trait Implementations§

Source§

impl Clone for BringUpConfig

Source§

fn clone(&self) -> BringUpConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for BringUpConfig

Source§

impl Debug for BringUpConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for BringUpConfig

Source§

fn default() -> BringUpConfig

Returns the “default value” for a type. Read more
Source§

impl Eq for BringUpConfig

Source§

impl Hash for BringUpConfig

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for BringUpConfig

Source§

fn eq(&self, other: &BringUpConfig) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for BringUpConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.