Struct FrameTiming

Source
pub struct FrameTiming {
    pub horizontal_total_width: usize,
    pub horizontal_blank_front_porch: usize,
    pub horizontal_active_width: usize,
    pub vertical_total_height: usize,
    pub vertical_blank_front_porch: usize,
    pub vertical_active_height: usize,
    pub vsync_width: usize,
    pub hsync_width: usize,
    pub hsync_position: usize,
}
Available on crate feature unstable only.
Expand description

The timing numbers for the driver to follow.

Note: The names of the fields in this struct don’t match what you would typically find in an LCD’s datasheet. Carefully read the doc on each field to understand what to set it to.

Fields§

§horizontal_total_width: usize

The horizontal total width of a frame (in units of PCLK).

This should be greater than horizontal_blank_front_porch + horizontal_active_width.

Max is 4096 (12 bits).

§horizontal_blank_front_porch: usize

The horizontal blank front porch of a frame (in units of PCLK).

This is the number of PCLKs between the start of the line and the start of active data in the line.

Note: This includes hsync_width.

Max is 2048 (11 bits).

§horizontal_active_width: usize

The horizontal active width of a frame. i.e. The number of pixels in a line. This is typically the horizontal resolution of the screen.

Max is 4096 (12 bits).

§vertical_total_height: usize

The vertical total height of a frame (in units of lines).

This should be greater than vertical_blank_front_porch + vertical_active_height.

Max is 1024 (10 bits).

§vertical_blank_front_porch: usize

The vertical blank front porch height of a frame (in units of lines).

This is the number of (blank/invalid) lines before the start of the frame.

Note: This includes vsync_width.

Max is 256 (8 bits).

§vertical_active_height: usize

The vertical active height of a frame. i.e. The number of lines in a frame. This is typically the vertical resolution of the screen.

Max is 1024 (10 bits).

§vsync_width: usize

It is the width of LCD_VSYNC active pulse in a line (in units of lines).

Max is 128 (7 bits).

§hsync_width: usize

The width of LCD_HSYNC active pulse in a line (in units of PCLK).

This should be less than vertical_blank_front_porch, otherwise the hsync pulse will overlap with valid pixel data.

Max is 128 (7 bits).

§hsync_position: usize

It is the position of LCD_HSYNC active pulse in a line (in units of PCLK).

This should be less than horizontal_total_width.

Max is 128 (7 bits).

Trait Implementations§

Source§

impl Clone for FrameTiming

Source§

fn clone(&self) -> FrameTiming

Returns a copy of the value. Read more
1.0.0§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for FrameTiming

Source§

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

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

impl Default for FrameTiming

Source§

fn default() -> FrameTiming

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

impl PartialEq for FrameTiming

Source§

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

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

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 FrameTiming

Source§

impl StructuralPartialEq for FrameTiming

Auto Trait Implementations§

§

impl Freeze for FrameTiming

§

impl RefUnwindSafe for FrameTiming

§

impl Send for FrameTiming

§

impl Sync for FrameTiming

§

impl Unpin for FrameTiming

§

impl UnwindSafe for FrameTiming

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

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

§

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
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

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> Same for T

Source§

type Output = T

Should always be Self
§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.