Struct CvtTimings

Source
pub struct CvtTimings {
Show 20 fields pub pixel_clock: f64, pub h_total: u32, pub h_active: u32, pub h_blank: u32, pub h_front_porch: u32, pub h_sync: u32, pub h_back_porch: u32, pub h_sync_polarity: bool, pub h_freq: f64, pub h_period: f64, pub v_total: u32, pub v_active: u32, pub v_blank: u32, pub v_front_porch: u32, pub v_sync: u32, pub v_back_porch: u32, pub v_sync_polarity: bool, pub v_freq: f64, pub v_period: f64, pub interlaced: bool,
}
Expand description

Represents CVT timings.

To better understand CVT timings, read the README of this crate

Fields§

§pixel_clock: f64

The pixel clock (MHz)

§h_total: u32

Total width to scan (Pixels)

§h_active: u32

Active width section to scan (Pixels)

§h_blank: u32

Blanking width section to scan (Pixels)

§h_front_porch: u32

Front Porch width section to scan (Pixels)

§h_sync: u32

Horizontal Sync (Pixels)

§h_back_porch: u32

Back Porch width section to scan (Pixels)

§h_sync_polarity: bool

Polarity of the horizontal sync scan (+/-)

§h_freq: f64

Horizontal scan frequency (KHz)

This represents how many times per second a horizontal scan is performed

§h_period: f64

Horizontal scan period (us)

This represents the amount of time a horizontal scan takes

§v_total: u32

Total height to scan (Pixels)

§v_active: u32

Active height section to scan (Pixels)

§v_blank: u32

Blanking height section to scan (Pixels)

§v_front_porch: u32

Front Porch height section to scan (Pixels)

§v_sync: u32

Vertical Sync (Pixels)

§v_back_porch: u32

Back Porch height section to scan (Pixels)

§v_sync_polarity: bool

Polarity of the vertical sync scan (+/-)

§v_freq: f64

Vertical scan frequency (KHz)

This represents how many times per second a vertical scan is performed

§v_period: f64

Vertical scan period (us)

This represents the amount of time a vertical scan takes

§interlaced: bool

Whether the video stream is interlaced or not

Implementations§

Source§

impl CvtTimings

Source

pub fn generate( h_pixels: u32, v_pixels: u32, refresh_rate: f64, blanking_mode: BlankingMode, margins: bool, interlaced: bool, ) -> Self

Generates CVT timings according to the input given.

Source

pub fn generate_modeline(&self) -> String

Trait Implementations§

Source§

impl Clone for CvtTimings

Source§

fn clone(&self) -> CvtTimings

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for CvtTimings

Source§

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

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

impl PartialEq for CvtTimings

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for CvtTimings

Source§

impl StructuralPartialEq for CvtTimings

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.