Struct stm32f4xx_hal::fsmc_lcd::Timing
source · [−]pub struct Timing { /* private fields */ }
Expand description
Timing configuration for reading or writing
A Timing
object can be created using Timing::default()
or Default::default()
.
The default timing uses access mode C and the slowest possible timings, for maximum compatibility.
If the LCD controller and wiring allow, you can reduce the times to make transactions faster.
All time fields are in units of HCLK cycles.
Implementations
sourceimpl Timing
impl Timing
sourcepub const BUS_TURNAROUND_MAX: u8 = 15u8
pub const BUS_TURNAROUND_MAX: u8 = 15u8
Maximum allowed value of the bus turnaround time
sourcepub const ADDRESS_HOLD_MIN: u8 = 1u8
pub const ADDRESS_HOLD_MIN: u8 = 1u8
Maximum allowed value of the address hold time
sourcepub const ADDRESS_HOLD_MAX: u8 = 15u8
pub const ADDRESS_HOLD_MAX: u8 = 15u8
Maximum allowed value of the address hold time
sourcepub const ADDRESS_SETUP_MAX: u8 = 15u8
pub const ADDRESS_SETUP_MAX: u8 = 15u8
Maximum allowed value of the address setup time
sourcepub fn access_mode(self, access_mode: AccessMode) -> Self
pub fn access_mode(self, access_mode: AccessMode) -> Self
Sets the access mode
sourcepub fn bus_turnaround(self, bus_turnaround: u8) -> Self
pub fn bus_turnaround(self, bus_turnaround: u8) -> Self
Sets the bus turnaround time, in units of HCLK cycles
This corresponds to the BUSTURN field of FSMC_BTR or FSMC_BWTR.
Panics
This function panics if bus_turnaround is greater than Timing::BUS_TURNAROUND_MAX.
sourcepub fn data(self, data: u8) -> Self
pub fn data(self, data: u8) -> Self
Sets the data phase time, in units of HCLK cycles
This corresponds to the DATAST field of FSMC_BTR or FSMC_BWTR.
Panics
This function panics if data is less than Timing::DATA_MIN.
sourcepub fn address_hold(self, address_hold: u8) -> Self
pub fn address_hold(self, address_hold: u8) -> Self
Sets the address hold phase time, in units of HCLK cycles
This corresponds to the ADDHLD field of FSMC_BTR or FSMC_BWTR.
Panics
This function panics if address_hold is less than Timing::ADDRESS_HOLD_MIN or greater than Timing::ADDRESS_HOLD_MAX.
sourcepub fn address_setup(self, address_setup: u8) -> Self
pub fn address_setup(self, address_setup: u8) -> Self
Sets the address setup phase time, in units of HCLK cycles
This corresponds to the ADDSET field of FSMC_BTR or FSMC_BWTR.
Panics
This function panics if address_setup is greater than Timing::ADDRESS_SETUP_MAX.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Timing
impl Send for Timing
impl Sync for Timing
impl Unpin for Timing
impl UnwindSafe for Timing
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more